Skip to content

graphics: characterize and extract indexbuffer data/type queries (Refs #5235) - #5240

Merged
zackees merged 2 commits into
masterfrom
test/5235-graphics-indexbuffer-queries
Nov 19, 2026
Merged

zackees merged 2 commits into
masterfrom
test/5235-graphics-indexbuffer-queries

Conversation

@zackees

@zackees zackees commented Nov 19, 2026

Copy link
Copy Markdown
Member

Refs #5235.

The remaining index-buffer data/type wrappers share graphics.c.h with unrelated graphics code. This prerequisite freezes their behavior in a GPU-free C characterization and moves only gs_indexbuffer_get_data and gs_indexbuffer_get_type verbatim into graphics-indexbuffer-queries.c.h, using the same unity-local TLS and validators. The already ported count/maintenance APIs stay unchanged. The sorted existing graphics group, tests.d pointer and sorted canonical graph register the extraction and fixture, including SIMDe headers for ARM64.

The three cases cover context validation before pointer diagnostics, exact diagnostic labels/messages, NULL and enum-cast-zero fallback, both declared index types, two original buffer pointers, distinct and NULL backend data results, exactly one matching callback per successful query, and no unrelated dispatch. There are no host capability/default assumptions. Fake functions are callbacks installed in the real export table; no global C function is replaced, so the Darwin two-level fake-symbol binding hazard is inapplicable.

Original C passed 25 characterization repeats per library mode. RED commit 4dab22d then failed C compilation on the missing extraction seam; GREEN 24b2bd1 preserves both bodies byte-for-byte. The final extracted C-reference/hybrid build passed all four focused query/maintenance/create/planar suites 25 times per mode, built EVERY 64 standalone *_rust target, and retained identical 1,769 dynamic exports. The entire native_build:: module passed 320 tests. The sole clud-review reviewer found no issues and independently reran the new fixture against both libraries.

ci/windows_link_check.py passed: the Windows Rust category binaries and hybrid libobs plus all 55 configured *_rust fixtures on Windows MSVC x64 and Darwin ARM64 linked successfully. The new C fixture also explicitly compiled and linked on both targets. llvm-nm -m on its Darwin Mach-O reports both _gs_indexbuffer_get_data and _gs_indexbuffer_get_type as undefined external imports from obs; there are no interposed fake global functions. The 22 inventory/Windows-diagnostic checks passed, unity/graph ordering and source-set/module agreement were checked, and the single full SOLDR_PORCELAIN=0 ./lint passed in 301.5 seconds.

A final forced-fetch/merge-tree refresh found clean merges with current master and healthy overlapping #5142. #5155/#4655/#4124 already conflict with master. All temporary refs were deleted. Evidence and raw artifact pointers are retained in build_ci_audit/gs-index-buffer/.

This is behavior-neutral C work: no Rust, public headers, existing C tests, workflows or WebSocket plugin changes. Rust Tiers 1/3 belong to the separately filed follow-up; Tier 4 is inapplicable. Native Windows/macOS execution, the complete cmocka suite and real-GPU behavior were not verified locally. Hosted CI remains the merge gate.

Refs #5235. The GPU-free characterization passed original C in C-reference and hybrid modes, 25 repeats each. The extraction guard requires the missing graphics-indexbuffer-queries.c.h seam.
Keep the original validation macros, exact diagnostic labels and enum cast, and the same unity-local TLS/validator definitions. No Rust or public-header changes.

Ci-Attestation: {"at":1795094675,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["4dab22de463aa071892c945eff5ec8b40a6e2d3a"],"secs":190,"stamp":"dc41cf9be03b7fa3d44fa0c78ad21629","tree":"22bccd77001ac8936827740b03c4ae14b330437d","v":1,"via":"run"}
Ci-Attestation: {"at":1795094675,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["4dab22de463aa071892c945eff5ec8b40a6e2d3a"],"secs":190,"stamp":"629dc4cd2bcb6b032c87b8b2dce02406","tree":"22bccd77001ac8936827740b03c4ae14b330437d","v":1,"via":"run"}
Ci-Attestation: {"at":1795094675,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["4dab22de463aa071892c945eff5ec8b40a6e2d3a"],"secs":190,"stamp":"d603c49a38384db799fdb263f619315b","tree":"22bccd77001ac8936827740b03c4ae14b330437d","v":1,"via":"run"}
Ci-Attestation: {"at":1795094675,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["4dab22de463aa071892c945eff5ec8b40a6e2d3a"],"secs":190,"stamp":"1f98bd83297be7a56e0be97dae3308b2","tree":"22bccd77001ac8936827740b03c4ae14b330437d","v":1,"via":"run"}
Ci-Attestation: {"at":1795094482,"gate":"general/all/client-lint","host":"linux-x86_64","key":"27a3a2744190b8bafc6f571a9209675f824300fe25385d6adfc777c0cbdbf421","lane":"client-lint","parents":["4dab22de463aa071892c945eff5ec8b40a6e2d3a"],"secs":259,"stamp":"b4e45f53d346d4a2714bb18219c0c034","tree":"22bccd77001ac8936827740b03c4ae14b330437d","v":1,"via":"run"}
Ci-Attestation: {"at":1795094675,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["4dab22de463aa071892c945eff5ec8b40a6e2d3a"],"secs":190,"stamp":"c1d9122a39c242e74f8f9b37937b977b","tree":"22bccd77001ac8936827740b03c4ae14b330437d","v":1,"via":"run"}
Ci-Attestation: {"at":1795094483,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"27a3a2744190b8bafc6f571a9209675f824300fe25385d6adfc777c0cbdbf421","lane":"client-lint","parents":["4dab22de463aa071892c945eff5ec8b40a6e2d3a"],"secs":259,"stamp":"9ae6708c012a220359b1732864fca50b","tree":"22bccd77001ac8936827740b03c4ae14b330437d","v":1,"via":"run"}
Ci-Attestation: {"at":1795094483,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"27a3a2744190b8bafc6f571a9209675f824300fe25385d6adfc777c0cbdbf421","lane":"client-lint","parents":["4dab22de463aa071892c945eff5ec8b40a6e2d3a"],"secs":259,"stamp":"56ffb3939d24152b80845e49a2f2330b","tree":"22bccd77001ac8936827740b03c4ae14b330437d","v":1,"via":"run"}
Ci-Attestation: {"at":1795094483,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"27a3a2744190b8bafc6f571a9209675f824300fe25385d6adfc777c0cbdbf421","lane":"client-lint","parents":["4dab22de463aa071892c945eff5ec8b40a6e2d3a"],"secs":259,"stamp":"66186deacd71827927a26d37a3d99da8","tree":"22bccd77001ac8936827740b03c4ae14b330437d","v":1,"via":"run"}
Ci-Attestation: {"at":1795094483,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"27a3a2744190b8bafc6f571a9209675f824300fe25385d6adfc777c0cbdbf421","lane":"client-lint","parents":["4dab22de463aa071892c945eff5ec8b40a6e2d3a"],"secs":259,"stamp":"57fa552ee8f2f874ec82dc90728fd7bd","tree":"22bccd77001ac8936827740b03c4ae14b330437d","v":1,"via":"run"}
Ci-Attestation: {"at":1795094482,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"27a3a2744190b8bafc6f571a9209675f824300fe25385d6adfc777c0cbdbf421","lane":"client-lint","parents":["4dab22de463aa071892c945eff5ec8b40a6e2d3a"],"secs":259,"stamp":"76808ece3b2494b1876f384e32e6707c","tree":"22bccd77001ac8936827740b03c4ae14b330437d","v":1,"via":"run"}
Ci-Attestation: {"at":1795094482,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"27a3a2744190b8bafc6f571a9209675f824300fe25385d6adfc777c0cbdbf421","lane":"client-lint","parents":["4dab22de463aa071892c945eff5ec8b40a6e2d3a"],"secs":259,"stamp":"f7f9a19349ef066e880c7391598873d0","tree":"22bccd77001ac8936827740b03c4ae14b330437d","v":1,"via":"run"}
Ci-Attestation: {"at":1795094483,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"27a3a2744190b8bafc6f571a9209675f824300fe25385d6adfc777c0cbdbf421","lane":"client-lint","parents":["4dab22de463aa071892c945eff5ec8b40a6e2d3a"],"secs":259,"stamp":"553de49b51593ab28553cf8ba8d6f67e","tree":"22bccd77001ac8936827740b03c4ae14b330437d","v":1,"via":"run"}
Ci-Attestation: {"at":1795094483,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"27a3a2744190b8bafc6f571a9209675f824300fe25385d6adfc777c0cbdbf421","lane":"client-lint","parents":["4dab22de463aa071892c945eff5ec8b40a6e2d3a"],"secs":259,"stamp":"f0f20249d5a01be0e07c8360fc725eaf","tree":"22bccd77001ac8936827740b03c4ae14b330437d","v":1,"via":"run"}
Ci-Attestation: {"at":1795094482,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"27a3a2744190b8bafc6f571a9209675f824300fe25385d6adfc777c0cbdbf421","lane":"client-lint","parents":["4dab22de463aa071892c945eff5ec8b40a6e2d3a"],"secs":259,"stamp":"e7f111bb292293eaa020a9cbe5b84894","tree":"22bccd77001ac8936827740b03c4ae14b330437d","v":1,"via":"run"}
Ci-Attestation: {"at":1795094482,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"27a3a2744190b8bafc6f571a9209675f824300fe25385d6adfc777c0cbdbf421","lane":"client-lint","parents":["4dab22de463aa071892c945eff5ec8b40a6e2d3a"],"secs":259,"stamp":"4370971980a3980e8701b5b1300b791a","tree":"22bccd77001ac8936827740b03c4ae14b330437d","v":1,"via":"run"}
Ci-Attestation: {"at":1795094482,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"27a3a2744190b8bafc6f571a9209675f824300fe25385d6adfc777c0cbdbf421","lane":"client-lint","parents":["4dab22de463aa071892c945eff5ec8b40a6e2d3a"],"secs":259,"stamp":"04c7e1fcc7b1b4f0671e211da6eaa1cb","tree":"22bccd77001ac8936827740b03c4ae14b330437d","v":1,"via":"run"}
Ci-Attestation: {"at":1795094482,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"27a3a2744190b8bafc6f571a9209675f824300fe25385d6adfc777c0cbdbf421","lane":"client-lint","parents":["4dab22de463aa071892c945eff5ec8b40a6e2d3a"],"secs":259,"stamp":"ec68ba1ddbf1e0e3c4af70d5bc4330e6","tree":"22bccd77001ac8936827740b03c4ae14b330437d","v":1,"via":"run"}
Ci-Attestation: {"at":1795095351,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"cc096d2601c4dec48e36226cbca6ecc438c697710696f2b7825fdf5dae59a943","lane":"client-test-x86_64-unknown-linux-gnu","parents":["4dab22de463aa071892c945eff5ec8b40a6e2d3a"],"secs":674,"stamp":"0ca0fc9e00d503233fb5f99d1781ee48","tree":"22bccd77001ac8936827740b03c4ae14b330437d","v":1,"via":"run"}

Client-Checks: {"checks":{"base":"157e2df84406d7a27034be037f64e80669998e01","coverage":"all-tracked-applicable-files","diff":["libobs/build/libobs.core+.h.c","libobs/build/libobs.core-output+.h.c","libobs/build/libobs.graphics+.h.c","libobs/build/libobs.ported-encoder-video-tex-active+.h.c","libobs/build/ported-source-sets/encoder-video-tex-active.json","libobs/cmake/rust-exports.d/obs-encoder-video_tex_active.txt","libobs/cmake/rust-hidden.d/obs-encoder-video_tex_active.txt","libobs/graphics/graphics-indexbuffer-queries.c.h","libobs/graphics/graphics.c.h","libobs/obs-encoder-video-tex-active-fields.c.h","libobs/obs-encoder-video-tex-active-mix.c.h","libobs/obs.c.h","rust/README.md","rust/obs-build/tests/native/registration/canonical_video_info_query_is_registered.rs","rust/obs-build/tests/native/registration/rust-static/cases/header/test_encoder_video_tex_active.json","rust/obs-c-oracle/oracle.d/encoder-video-tex-active-mix.list","rust/obs-c-oracle/oracle.d/encoder-video-tex-active.list","rust/obs-c-oracle/oracle/encoder_video_tex_active.c","rust/obs-encoder/src/ffi/mod.rs","rust/obs-encoder/src/ffi/video_tex_active.rs","rust/obs-encoder/src/lib.rs","rust/obs-encoder/src/video_tex_active.rs","rust/obs-encoder/tests/encoder/main.rs","rust/obs-encoder/tests/encoder/video_tex_active.rs","rust/obs-encoder/tests/encoder/video_tex_active_parity.rs","test/cmocka/build/test-graph.json","test/cmocka/encoder-video-tex-active-fields-link-support.c","test/cmocka/encoder-video-tex-active-mix-link-support.c","test/cmocka/test_graphics_indexbuffer_queries.c","test/cmocka/tests.d/test_graphics_indexbuffer_queries.cmake","test/cmocka/tests.d/video_info_query_link_support.cmake"],"head":"3de32143960dbf90e79384ab328f7805199b4094","tools":{"orchestrator-python":"3.14.7 (main, Aug 14 2026, 15:35:28) [Clang 22.1.3 ]","schema-dependencies":"3.14.7 (main, Aug 14 2026, 15:35:28) [Clang 22.1.3 ]\n{'jsonschema': '4.26.0', 'json_source_map': '1.0.5'}","uv":"uv 0.13.5 (x86_64-unknown-linux-gnu)","xmllint":"xmllint: using libxml version 21504\n   compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 DTDValid HTML C14N Catalog XPath XPointer XInclude Iconv ISO8859X Regexps Automata RelaxNG Schemas Modules Debug"},"tracked-digest":"9cead9301d55d187b9c1b1658648890cfd594983bf249ec8bc8710b33f57f163","tree":"22bccd77001ac8936827740b03c4ae14b330437d"}}
@zackees zackees added the pool-active Pool worker owns this PR; automated rebases must skip it label Nov 19, 2026
@zackees
zackees enabled auto-merge November 19, 2026 13:37
@zackees zackees removed the pool-active Pool worker owns this PR; automated rebases must skip it label Nov 19, 2026
@zackees
zackees added this pull request to the merge queue Nov 19, 2026
Merged via the queue into master with commit 9f055c7 Nov 19, 2026
41 checks passed
@zackees
zackees deleted the test/5235-graphics-indexbuffer-queries branch November 19, 2026 14:22
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