Skip to content

libobs: Characterize and extract graphics timer dispatch - #4545

Merged
zackees merged 2 commits into
masterfrom
test/extract-gstimer
Nov 10, 2026
Merged

zackees merged 2 commits into
masterfrom
test/extract-gstimer

Conversation

@zackees

@zackees zackees commented Nov 10, 2026

Copy link
Copy Markdown
Member

Refs #4522. Follow-up Rust swap: #4523, after this prerequisite lands.

What and why

Characterizes the actual public gs_timer_destroy, gs_timer_begin, gs_timer_end and gs_timer_get_data exports with GPU-free fake backend callbacks, then moves only their original bodies verbatim into libobs/graphics/timer-dispatch.c.h in sorted unity position. Scoped validation macros preserve context-before-NULL precedence, exact diagnostics, silent NULL commands and the timer-before-ticks guards in get_data.

The three characterization cases pin rejected-call output preservation, exact pointer forwarding, synchronous single dispatch, repeated/out-of-order commands, backend boolean/output-write combinations including writes on false, boundary tick values and backend-only destruction. The Rust source-profiler consumer is unchanged.

Characterization → extraction

  • Characterization: a9334b1. All three cases passed three times per library before extraction.
  • Extraction: 44150f9. The same cases passed three times per library after extraction. ldd confirmed hybrid and C-reference selection. All four bodies matched the originals byte-for-byte; dynamic exports matched at 1,767 symbols before/after and across libraries.
  • Unchanged test_source_profiler: all six cases passed three times per library with real OpenGL llvmpipe.
  • The single SOLDR_PORCELAIN=0 ./lint invocation passed, exit 0, lane lint: ok (279.7s); clang-format 22.1.3, gersemi 0.25.0 and git diff --check passed.
  • Test cost: the new C executable took at most 0.22 seconds per replay and starts no threads.

This is the testing-policy characterization/extraction prerequisite. Rust RED/GREEN, Tier 1 and original-C differential Tier 3 remain for #4523. Tier 4 is inapplicable. No full Tier 2 suite, Windows/macOS execution, hosted CI completion or Rust implementation is claimed. No existing C tests, public headers, WebSocket code, workflows, test graph or Rust native-test registry changed. No user-visible behavior change.

Evidence: .worker-pool/extract-gstimer/response.md and its before/after, source-profiler and lint artifacts.

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.

1 participant