Skip to content

graphics: characterize and extract active shader queries (Refs #5244) - #5247

Merged
zackees merged 3 commits into
masterfrom
test/5244-graphics-active-shader-queries
Nov 19, 2026
Merged

zackees merged 3 commits into
masterfrom
test/5244-graphics-active-shader-queries

Conversation

@zackees

@zackees zackees commented Nov 19, 2026

Copy link
Copy Markdown
Member

Refs #5244.

The active vertex/pixel shader queries now have a GPU-free C characterization and an isolated source for the later Rust swap. Both bodies move verbatim from graphics.c.h to graphics-active-shader-queries.c.h, retaining the same unity-local TLS, validator, NULL fallback and diagnostic text. The existing graphics unity group, tests.d pointer and canonical graph are sorted and registered, with agreeing source-set/module inventories and SIMDe headers for ARM64.

The three-case fixture uses the real graphics_subsystem layout and enter/leave-context API with recording export-table callbacks. It covers NULL graphics/context rejection and exact debug diagnostics, validation before callback access, separate exactly-once vertex/pixel dispatch, two exact device identities, distinct borrowed shader pointers, all NULL/non-NULL backend-result combinations, and rejection after leaving context followed by successful re-entry. It checks stable context reference counts and token contents. Expectations do not depend on a real GPU or platform defaults. Fakes remain static export-table callbacks; no global C function is interposed.

The characterization first passed against original C in both library modes, 25 repeats each. RED 9a09edc then failed C compilation with the explicit missing-extraction-seam diagnostic. GREEN 8ce41f9 preserves both bodies byte-for-byte. Final Linux validation built EVERY 65 standalone *_rust target with -k 0, passed the new and unchanged planar/device-load suites 25 times per mode, and retained identical 1,769 dynamic exports. The whole native_build:: module passed 320 tests with no failures or ignored cases; 22 inventory/Windows-diagnostic checks passed. The sole clud-review reviewer found no issues and independently reran the new fixture successfully against both libraries.

ci/windows_link_check.py passed: Windows Rust category binaries plus hybrid libobs and all 56 configured standalone Rust fixtures on each of Windows MSVC x64 and Darwin ARM64 linked successfully. The new C fixture also explicitly compiled and linked on both targets. Darwin llvm-nm reports both query imports binding to obs; the global-fake two-level namespace hazard does not apply. Full SOLDR_PORCELAIN=0 ./lint ran once and passed in 371.4 seconds.

Final forced-fetch/merge-tree checks are clean with current master and queued sibling #5240; temporary refs were deleted. Evidence is retained in build_ci_audit/gs-active-shaders/. This is a behavior-neutral C prerequisite: no Rust, public headers, existing C tests, workflows or WebSocket plugin changes. The Rust swap is a separate follow-up, with Tiers 1/3 still required there; 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.

Publication client proof passed six-target Clippy/Dylint, full self-tests/data checks, 9,193 host tests (six skipped), 920 extra feature tests (none skipped), doctests and GNU Windows test linking. Final HEAD preserves the validated GREEN tree and is signed after attestation.

Ci-Attestation: {"at":1795098498,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["9a09edc46a5eb67f58858db4c3177108e52d84db"],"secs":129,"stamp":"731692d743b9f5d7eede48a1054e41c9","tree":"7e9f0542e0b50f6242f4871cd98d497bcddb1f39","v":1,"via":"run"}
Ci-Attestation: {"at":1795098498,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["9a09edc46a5eb67f58858db4c3177108e52d84db"],"secs":129,"stamp":"b541088b22deafe9d95f4fb9a8077900","tree":"7e9f0542e0b50f6242f4871cd98d497bcddb1f39","v":1,"via":"run"}
Ci-Attestation: {"at":1795098498,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["9a09edc46a5eb67f58858db4c3177108e52d84db"],"secs":129,"stamp":"ec2a8704733475dc3e587dc93b108b03","tree":"7e9f0542e0b50f6242f4871cd98d497bcddb1f39","v":1,"via":"run"}
Ci-Attestation: {"at":1795098498,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["9a09edc46a5eb67f58858db4c3177108e52d84db"],"secs":129,"stamp":"3bde230c37ae4def36d2ea9b63419ae7","tree":"7e9f0542e0b50f6242f4871cd98d497bcddb1f39","v":1,"via":"run"}
Ci-Attestation: {"at":1795098367,"gate":"general/all/client-lint","host":"linux-x86_64","key":"e65df71a270d327e47b9d1341b6cc4a40eec69ec2e13ea50fcfb69b7859bc5ef","lane":"client-lint","parents":["9a09edc46a5eb67f58858db4c3177108e52d84db"],"secs":254,"stamp":"66b3fa6186331464e2764dba779d1736","tree":"7e9f0542e0b50f6242f4871cd98d497bcddb1f39","v":1,"via":"run"}
Ci-Attestation: {"at":1795098498,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["9a09edc46a5eb67f58858db4c3177108e52d84db"],"secs":129,"stamp":"779d0e242f099b1984fc341328d54718","tree":"7e9f0542e0b50f6242f4871cd98d497bcddb1f39","v":1,"via":"run"}
Ci-Attestation: {"at":1795098368,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"e65df71a270d327e47b9d1341b6cc4a40eec69ec2e13ea50fcfb69b7859bc5ef","lane":"client-lint","parents":["9a09edc46a5eb67f58858db4c3177108e52d84db"],"secs":254,"stamp":"5b8fd4c6ac8acec1ada5f3bd1d8ab21f","tree":"7e9f0542e0b50f6242f4871cd98d497bcddb1f39","v":1,"via":"run"}
Ci-Attestation: {"at":1795098368,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"e65df71a270d327e47b9d1341b6cc4a40eec69ec2e13ea50fcfb69b7859bc5ef","lane":"client-lint","parents":["9a09edc46a5eb67f58858db4c3177108e52d84db"],"secs":254,"stamp":"271410cbf9bdd75d68c01a4f14203821","tree":"7e9f0542e0b50f6242f4871cd98d497bcddb1f39","v":1,"via":"run"}
Ci-Attestation: {"at":1795098368,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"e65df71a270d327e47b9d1341b6cc4a40eec69ec2e13ea50fcfb69b7859bc5ef","lane":"client-lint","parents":["9a09edc46a5eb67f58858db4c3177108e52d84db"],"secs":254,"stamp":"f355273334e33ee61ba00b4b7151c565","tree":"7e9f0542e0b50f6242f4871cd98d497bcddb1f39","v":1,"via":"run"}
Ci-Attestation: {"at":1795098368,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"e65df71a270d327e47b9d1341b6cc4a40eec69ec2e13ea50fcfb69b7859bc5ef","lane":"client-lint","parents":["9a09edc46a5eb67f58858db4c3177108e52d84db"],"secs":254,"stamp":"8aad35768ebf76df483f4d654568e5a5","tree":"7e9f0542e0b50f6242f4871cd98d497bcddb1f39","v":1,"via":"run"}
Ci-Attestation: {"at":1795098368,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"e65df71a270d327e47b9d1341b6cc4a40eec69ec2e13ea50fcfb69b7859bc5ef","lane":"client-lint","parents":["9a09edc46a5eb67f58858db4c3177108e52d84db"],"secs":254,"stamp":"e8845e282f6597ba211c95dc704283f7","tree":"7e9f0542e0b50f6242f4871cd98d497bcddb1f39","v":1,"via":"run"}
Ci-Attestation: {"at":1795098368,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"e65df71a270d327e47b9d1341b6cc4a40eec69ec2e13ea50fcfb69b7859bc5ef","lane":"client-lint","parents":["9a09edc46a5eb67f58858db4c3177108e52d84db"],"secs":254,"stamp":"1334bb8d3a4d1998093a54bc96aca7c4","tree":"7e9f0542e0b50f6242f4871cd98d497bcddb1f39","v":1,"via":"run"}
Ci-Attestation: {"at":1795098368,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"e65df71a270d327e47b9d1341b6cc4a40eec69ec2e13ea50fcfb69b7859bc5ef","lane":"client-lint","parents":["9a09edc46a5eb67f58858db4c3177108e52d84db"],"secs":254,"stamp":"bb912d4252741d5c7e7365f00e8e46c5","tree":"7e9f0542e0b50f6242f4871cd98d497bcddb1f39","v":1,"via":"run"}
Ci-Attestation: {"at":1795098368,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"e65df71a270d327e47b9d1341b6cc4a40eec69ec2e13ea50fcfb69b7859bc5ef","lane":"client-lint","parents":["9a09edc46a5eb67f58858db4c3177108e52d84db"],"secs":254,"stamp":"b0566f836bb208203aa879fad1cea32a","tree":"7e9f0542e0b50f6242f4871cd98d497bcddb1f39","v":1,"via":"run"}
Ci-Attestation: {"at":1795098368,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"e65df71a270d327e47b9d1341b6cc4a40eec69ec2e13ea50fcfb69b7859bc5ef","lane":"client-lint","parents":["9a09edc46a5eb67f58858db4c3177108e52d84db"],"secs":254,"stamp":"a560136cc0fb6fb3702f00da9f49356a","tree":"7e9f0542e0b50f6242f4871cd98d497bcddb1f39","v":1,"via":"run"}
Ci-Attestation: {"at":1795098368,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"e65df71a270d327e47b9d1341b6cc4a40eec69ec2e13ea50fcfb69b7859bc5ef","lane":"client-lint","parents":["9a09edc46a5eb67f58858db4c3177108e52d84db"],"secs":254,"stamp":"081a8f74fad8370bcd33412919383b1f","tree":"7e9f0542e0b50f6242f4871cd98d497bcddb1f39","v":1,"via":"run"}
Ci-Attestation: {"at":1795098367,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"e65df71a270d327e47b9d1341b6cc4a40eec69ec2e13ea50fcfb69b7859bc5ef","lane":"client-lint","parents":["9a09edc46a5eb67f58858db4c3177108e52d84db"],"secs":254,"stamp":"68d06beb704ac3a596c714e9e531374f","tree":"7e9f0542e0b50f6242f4871cd98d497bcddb1f39","v":1,"via":"run"}
Ci-Attestation: {"at":1795098367,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"e65df71a270d327e47b9d1341b6cc4a40eec69ec2e13ea50fcfb69b7859bc5ef","lane":"client-lint","parents":["9a09edc46a5eb67f58858db4c3177108e52d84db"],"secs":254,"stamp":"0572c630979b8772faa745fbae967621","tree":"7e9f0542e0b50f6242f4871cd98d497bcddb1f39","v":1,"via":"run"}
Ci-Attestation: {"at":1795099063,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"c185034e730c974d892597f73d4b049b90e673525e26431917830436dac4cb40","lane":"client-test-x86_64-unknown-linux-gnu","parents":["9a09edc46a5eb67f58858db4c3177108e52d84db"],"secs":563,"stamp":"30c5c82cf2e92b4875d08e7ce41dfc95","tree":"7e9f0542e0b50f6242f4871cd98d497bcddb1f39","v":1,"via":"run"}

Client-Checks: {"checks":{"base":"046aa3962ebec052eb15d857ebb79f26602f47bf","coverage":"all-tracked-applicable-files","diff":["libobs/build/libobs.core+.h.c","libobs/build/libobs.core-hotkey-pair-register+.h.c","libobs/build/libobs.core-source+.h.c","libobs/build/libobs.graphics+.h.c","libobs/build/libobs.ported-hotkey-pair-register+.h.c","libobs/build/libobs.ported-object-id+.h.c","libobs/build/libobs.ported-source-get-weak+.h.c","libobs/build/modules.d/core.json","libobs/build/ported-source-sets/hotkey-pair-register.json","libobs/build/ported-source-sets/object-id.json","libobs/build/ported-source-sets/source-get-weak.json","libobs/build/source-sets.d/LIBOBS_SOURCES.json","libobs/cmake/rust-exports.d/obs-core-object_id.txt","libobs/cmake/rust-exports.d/obs-hotkey-pair_register.txt","libobs/cmake/rust-exports.d/obs-source-source_get_weak.txt","libobs/graphics/graphics-active-shader-queries.c.h","libobs/graphics/graphics.c.h","libobs/obs-hotkey-pair-register-fields.c.h","libobs/obs-object-id-fields.c.h","libobs/obs-source-get-weak-fields.c.h","rust/README.md","rust/obs-build/tests/native.rs","rust/obs-build/tests/native/registration/canonical_object_id_swap_is_registered.rs","rust/obs-build/tests/native/registration/canonical_source_get_weak_swap_is_registered.rs","rust/obs-c-oracle/oracle.d/hotkey_pair_register.list","rust/obs-c-oracle/oracle.d/source-get-weak.list","rust/obs-c-oracle/oracle/hotkey_pair_register.c","rust/obs-c-oracle/oracle/object_id.c","rust/obs-c-oracle/oracle/source_get_weak.c","rust/obs-core/src/ffi/mod.rs","rust/obs-core/src/ffi/object_id.rs","rust/obs-core/src/lib.rs","rust/obs-core/src/object_id.rs","rust/obs-core/tests/obs_core/main.rs","rust/obs-core/tests/obs_core/object_id.rs","rust/obs-core/tests/obs_core/object_id_parity.rs","rust/obs-hotkey/src/ffi/mod.rs","rust/obs-hotkey/src/ffi/pair_register.rs","rust/obs-hotkey/src/lib.rs","rust/obs-hotkey/src/pair_register.rs","rust/obs-hotkey/tests/hotkey/main.rs","rust/obs-hotkey/tests/hotkey/pair_register.rs","rust/obs-hotkey/tests/hotkey/pair_register_parity.rs","rust/obs-hotkey/tests/proptest-regressions/pair_register_parity.txt","rust/obs-source/src/ffi/mod.rs","rust/obs-source/src/ffi/source_get_weak.rs","rust/obs-source/src/get_weak.rs","rust/obs-source/src/lib.rs","rust/obs-source/tests/source/get_weak.rs","rust/obs-source/tests/source/get_weak_parity.rs","rust/obs-source/tests/source/main.rs","test/cmocka/build/test-graph.json","test/cmocka/test_graphics_active_shader_queries.c","test/cmocka/tests.d/test_graphics_active_shader_queries.cmake","test/cmocka/video-info-query-link-support.c"],"head":"20afde4330310e9412aa67d054bb37e1ad217a12","tools":{"orchestrator-python":"3.13.15 (main, Aug 14 2026, 15:34:59) [Clang 22.1.3 ]","schema-dependencies":"3.13.15 (main, Aug 14 2026, 15:34:59) [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":"8c7f5d191151cf56f2611bcd91181bcfd5df2c53cec7030ce7def7b7703503a7","tree":"7e9f0542e0b50f6242f4871cd98d497bcddb1f39"}}
@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 14:39
@zackees zackees removed the pool-active Pool worker owns this PR; automated rebases must skip it label Nov 19, 2026
@zackees
zackees disabled auto-merge November 19, 2026 14:42
@zackees zackees added 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
@zackees
zackees removed this pull request from the merge queue due to a manual request Nov 19, 2026
@zackees
zackees added this pull request to the merge queue Nov 19, 2026
@zackees
zackees marked this pull request as draft November 19, 2026 15:00
@zackees

zackees commented Nov 19, 2026

Copy link
Copy Markdown
Member Author

Holding as draft while coordinating the manager-requested rebase. The rebase is preserved locally at 01a686a1108d (all three patches unchanged), but another process switched pool slot obs-studio5 back to master at 14:48:26 UTC during validation. A watcher also re-enqueued this PR after auto-merge was disabled and it was dequeued. The manager needs to reserve the slot and stop that chaperone before validation and replacement publication resume. The remote head is still the originally verified 8ce41f9; no force-push was performed.

@zackees
zackees removed this pull request from the merge queue due to a manual request Nov 19, 2026
@zackees
zackees marked this pull request as ready for review November 19, 2026 15:02
@zackees
zackees added this pull request to the merge queue Nov 19, 2026
Merged via the queue into master with commit 9135554 Nov 19, 2026
44 checks passed
@zackees
zackees deleted the test/5244-graphics-active-shader-queries branch November 19, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pool-active Pool worker owns this PR; automated rebases must skip it

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant