Repository navigation
Description
Unit
Port libobs/graphics/graphics-samplerstate-lifecycle.c.h to obs-graphics: gs_samplerstate_create and gs_samplerstate_destroy. Phase 6 graphics API boundary, following the C-only characterization and verbatim extraction in #5128. This is the whole-file Rust swap, not another extraction or sampler conversion/binding port.
Phase and position
Use the existing Graphics category binary obs-tests-graphics; add modules, never another Rust test executable. Keep the public libobs C API/ABI and unchanged C++ OBS WebSocket plugin compatible.
Dependencies and existing tests
Implementation waits for #5128's prerequisite PR #5148 (#5148) to merge. The new immutable Tier 2 baseline is test/cmocka/test_samplerstate_lifecycle.c, its tests.d pointer, and the sorted native graph entry. Retain all assertions unchanged against both C-reference and hybrid libobs. Existing sampler conversion and sampler binding/default binding ports cover different entry points.
Mirror all four characterization cases in safe Rust Tier 1, committing and running RED before GREEN. Pin exact LOG_DEBUG diagnostics and counts, context validation before argument validation and dispatch, NULL-info rejection, context-required but otherwise silent NULL destruction, original device/info/opaque-handle identity, unmodified settings, NULL and non-NULL creation results, exact callback counts/order, repeated destruction forwarding, and no wrapper-side allocation/free or lifecycle tracking.
Notes and acceptance
Keep TLS/context validation and backend-table access C-owned behind a minimal private adapter; Rust contains the behavior decisions. Add any required real-adapter link-support fragments to every affected Rust-static consumer, never placeholder stubs. Check NULL before field-accessor adapters. Preserve all original read/callback ordering and signatures. No public-header, existing-C-test, WebSocket plugin or workflow changes.
Add original-C Tier 3 differential coverage through an oracle with renamed symbols, and demonstrate a mutation is detected. Move this entire C source to the reference-only ported group using per-unit source metadata; retain the original C oracle/reference baseline. Preserve all inventories and sorted groups/test graph. Run unchanged Tier 2 against both libraries, compare dynamic exports, run the whole native_build:: module, lint, and applicable Windows MSVC linkage. Tier 4 is inapplicable to these non-protocol wrappers.
Use soldr for every Rust command, uv for Python, and ./push for publication. No intentional behavior differences. No user-visible behavior change or features-ledger entry is expected. Refs #5128; do not auto-close the prerequisite via a PR body.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
zackees commentedon Nov 18, 2026
Claiming: sampler-state lifecycle Rust swap in pool slot obs-studio5.
First PR expected after local GREEN validation this session; Refs rust: Port graphics/graphics-samplerstate-lifecycle.c.h to obs-graphics #5149.
zackees commentedon Nov 19, 2026
Landed on master in #5164 (5fce766): the graphics sampler-state lifecycle entry points now run in safe Rust in obs-graphics, with the unchanged C characterization passing against the hybrid and a differential test against the oracle.