Skip to content

obs-graphics: port timer dispatch to Rust (#4523) - #4557

Merged
zackees merged 2 commits into
masterfrom
port/4523-gs-timer
Nov 10, 2026
Merged

zackees merged 2 commits into
masterfrom
port/4523-gs-timer

Conversation

@zackees

@zackees zackees commented Nov 10, 2026

Copy link
Copy Markdown
Member

Fixes #4523. Extraction prerequisite #4545 has squash-merged. This PR replays only the timer swap's RED/GREEN pair onto master, preserving master's other oracle registrations and production C groups.

What and why

Port gs_timer_destroy, gs_timer_begin, gs_timer_end and gs_timer_get_data through a safe Rust core, thin ABI shims and real private callback/context adapters, with standalone Rust-static adapter support. Preserve context-before-NULL precedence, silent NULL commands, timer-before-ticks diagnostics, untouched rejected outputs, exact pointer forwarding, one synchronous callback, arbitrary command order, backend ownership and backend writes even when returning false. The Rust source-profiler consumer stays unchanged. Original C bodies remain unchanged in their reference-only group.

No intentional behavior differences, user-visible behavior change or new test executable. Existing C tests, public headers, workflows and websocket code are unchanged. Tier 4 is inapplicable.

RED → GREEN and validation

  • Original RED 2cde0fa: five safe-core/original-C differential cases failed at intended stubs (exit 101). Original GREEN e60c486 and restored GREEN: all five passed. Inverting the backend boolean failed original-C differential characterization; mutation removed.
  • Replayed RED 585d47e and GREEN 301cc94. Range-diff shows integration context adjustments only. Rebuilt-head focused command passed: OBS_PARITY_CASES=reduced soldr cargo test -p obs-graphics --test obs-tests-graphics timer_dispatch.
  • Rebuilt-head soldr cargo test -p obs-studio-rust --test obs-tests-app native_build:: exited 0. All 10 build-group checks passed; git diff --check passed.
  • Original worker: 276 application native_build contracts, 10 build-group checks, ported-source and metadata checks passed, retaining eight category binaries.
  • Original Tier 2: unchanged timer characterization passed against hybrid and C reference, with loader paths and export parity checked. Corrected source-profiler replay passed all six cases against each library without skips on OpenGL 4.5 llvmpipe; effect data was staged only in the build volume.

Test cost: original worker's 25 reduced-parity runs of five cases, longest combined wall time 0.06263 s, peak RSS 7,432 KiB, no test-owned threads.

Evidence: .worker-pool/stack-4523/response.md and .worker-pool/publish-swaps/response.md. Tier 2, mutation and cost figures are original-worker evidence, not rebuilt-head reruns. No full Tier 2 sweep, standalone staticlib sweep, Windows/macOS runtime, full workspace execution, new attestation or hosted-CI completion is claimed. PR CI remains the merge gate.

The single rebuilt-head SOLDR_PORCELAIN=0 ./lint invocation passed with exit 0; evidence artifact local-test-eBDhxR.log. Focused Rust command: local-test-kg28QI.log; native_build command: local-test-XcmqT0.log; build-group checks: local-test-7O0NrU.log (artifacts under /home/niteris/.clud/tmp/tool-output/local-test-private/).

@zackees

zackees commented Nov 10, 2026

Copy link
Copy Markdown
Member Author

Rebased onto origin/master 305b7bb, replacing acc3915 with cd5f14b. Conflicts resolved by retaining both oracle/test registrations and master's timer-range C include while removing only the ported timer production include. Range-diff confirms integration-context changes only. Listed HEAD..origin/port/4523-gs-timer before pushing with the explicit old-head lease; remote SHA verified and auto-merge re-armed with --match-head-commit.

Focused graphics timer tests: 5 passed. obs-studio-rust obs-tests-app native_build contracts: 277 passed. Build-group checks: 10 passed. git diff --check passed. Evidence: local-test-WjvNwG.log, local-test-mlcpOP.log, explicit app executable replay local-test-6cfizl.log, and local-test-2ErBr3.log under /home/niteris/.clud/tmp/tool-output/local-test-private/. The one requested final lint will run on the stacked #4562 branch, which includes this head; no separate lint invocation here. Hosted validation remains pending. Pool coordinator retains the merge handoff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

rust: Port graphics/timer-dispatch.c.h to obs-graphics

1 participant