You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rust: Port libobs/graphics/graphics-indexbuffer-queries.c.h to obs-graphics #5241
Phase 6 graphics follow-up to prerequisite #5235. Take this only after that characterization/extraction is verified merged. The prerequisite PR is #5240 (#5240).
Port only libobs/graphics/graphics-indexbuffer-queries.c.h (gs_indexbuffer_get_data and gs_indexbuffer_get_type) to obs-graphics, following the testing policy's extraction-first workflow. gs_indexbuffer_get_num_indices and indexbuffer maintenance are already ported and are outside this unit.
Mirror every frozen assertion from test/cmocka/test_graphics_indexbuffer_queries.c in the existing obs-tests-graphics category: context rejection before pointer validation and exact diagnostics; NULL data and the existing enum-cast-zero fallback; both declared index enum values; two original buffer identities; distinct and NULL successful data results; exactly one matching callback and no unrelated dispatch. Backend callbacks are mandatory; do not invent fallback behavior for a missing callback or platform-dependent defaults.
Commit RED safe-core tests before GREEN. Keep C-owned TLS/layout/diagnostics behind narrow real private adapters, checking NULL in Rust before any field projection. Preserve public C headers and the C characterization unchanged. Retain the original C as reference/oracle, add recorded-call differential coverage and a mutation check, move the source into a per-unit ported unity group/fragment and add export metadata.
Run Graphics category Tiers 1/3, unchanged C fixture against both C-reference and hybrid with exact dynamic symbol parity, the full native_build:: module, and a focused Linux Tier 2 build of EVERY standalone *_rust target. Any Rust-to-C adapter requires real linked source support in every static consumer; never use an aborting stub. Run Windows MSVC and Darwin link checks, running ci/cmocka_link_check.py --alias mac-arm64 separately if Windows fails. Explicitly cross-link the frozen C fixture too. If a future test replaces a global C function that Rust calls, prove Darwin binding with nm on the Mach-O, since Linux interposition does not establish Darwin two-level binding. Existing fixture fakes are export-table callbacks, not global replacements. Run full lint once before publishing and refresh shared-file conflicts with forced fetches/merge-tree.
No GPU, native host capability, or network-protocol behavior is involved. No new Rust test executable, existing-C-test edits, public-header edits, WebSocket changes or workflow files.
Claiming: gs-indexbuffer query Rust swap in pool slot obs-studio6, branch port/5241-indexbuffer-queries. 1. Commit failing safe-core mirrors of the frozen C characterization. 2. Implement the two getter shims using the real private graphics seam and shared demand-linked support archive, with original-C differential and mutation coverage. 3. Verify all requested Rust/native/Tier 2 and cross-link checks, refresh overlapping G-group conflicts, and publish subject to backpressure. First PR expected after verification in this worker session.
Activity
zackees commentedon Nov 19, 2026
Claiming: gs-indexbuffer query Rust swap in pool slot obs-studio6, branch port/5241-indexbuffer-queries. 1. Commit failing safe-core mirrors of the frozen C characterization. 2. Implement the two getter shims using the real private graphics seam and shared demand-linked support archive, with original-C differential and mutation coverage. 3. Verify all requested Rust/native/Tier 2 and cross-link checks, refresh overlapping G-group conflicts, and publish subject to backpressure. First PR expected after verification in this worker session.
zackees commentedon Nov 19, 2026
Landed on master in #5252 (db58dec): the index-buffer data/type queries now run in safe Rust in obs-graphics.