Skip to content

obs-scene: swap scene-item transform deferral to Rust (Refs #5260) - #5356

Merged
zackees merged 2 commits into
masterfrom
port/5260-sceneitem-defer-update
Nov 21, 2026
Merged

zackees merged 2 commits into
masterfrom
port/5260-sceneitem-defer-update

Conversation

@zackees

@zackees zackees commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Scene-item transform deferral now uses a safe Rust begin/end core while C retains the native item layout, atomic long operations, and existing bounds-transform dispatch. Only an end whose atomic decrement returns zero dispatches. Negative unmatched ends, begin reaching zero, and both NULL diagnostics retain the original behavior.

The real atomic adapters are separate lazy archive members registered once in test/cmocka/build/rust-static-support.json, following #5246. CMake and Cargo-native Rust-static consumers share that manifest. Fixture-owned definitions retain precedence, and this PR adds no per-target support fragment.

Refs #5260. Refs #4646.

RED commit 8f5de4e preserves the six safe Rust tests against todo stubs; the original RED run failed all six. GREEN commit 50c507c implements the swap and original-C differential state/callback traces using native-width c_long inputs. Changing the zero condition to decrement == 1 was killed by the differential test in the held swap's original run. There are no intentional behavior differences. Tier 4 does not apply to these local scene APIs.

Current-head validation: the whole native_build module passed 325 tests plus two child checks; the shared-support, link-inventory and native-portability self-tests passed 6, 12 and 29 tests respectively. ci/windows_link_check.py linked all eight Windows Rust categories, hybrid libobs and all 71 selected fixtures for each of Windows MSVC x64 and Darwin arm64. The Darwin core category also linked. nm places both public shims, both atomic adapters and the bounds recorder in executable-owned __TEXT; production Rust disassembly branches directly to recorder address 0x103653544. These cross checks link target binaries without executing them.

Linux Tier 2 built every configured *_rust target (68) and both libraries. All 73 selected tests passed three times in OFF and ON modes. The unchanged deferral executable also reported eight actual passes in each mode, without skips; both libraries export the same 1,769 symbols. The outer capture reached its one-hour deadline during testing, while the container continued to completion with exit 0. The persisted final ON CTest log independently records 219 passes and zero failures, including the crop fixture; OFF completion was captured before the deadline.

soldr cargo fmt --all --check passed. The single full ./lint run passed in 645.4 seconds before the prerequisite merged; the migrated head's focused checks are recorded above. Publication through ./push passed final-tree client lint (Clippy and Dylint on all six supported targets) in 883.3 seconds. Two repository self-tests reached their 5-second and 60-second subprocess deadlines under load; both passed on a focused rerun. The publisher used its ordinary-PR-CI fallback, so complete signed client admission and the client-test-host lane are not claimed.

Test cost from the held swap's unchanged test modules: 25 runs per module at reduced parity, longest 0.263 seconds, peak child RSS 21,852 KiB. There are no Rust-owned threads; the shared C recorder creates and joins one temporary pthread mutex probe per recorded transform call. Generated traces are capped at 64 operations.

Landing verification (2026-11-21): rebased the RED/GREEN commits onto master 0419d4a after #5246 merged, retaining both sides of the shared adapter manifest; published signed head 5964d70. Formatting, nine focused Rust tests plus the isolated NULL child, all eight Windows Rust categories, and all 79 selected Windows/Darwin cmocka links passed. The Darwin core category linked, and nm/disassembly confirms production Rust calls the executable-owned bounds recorder at 0x1037671dc. Linux built all 76 configured *_rust targets and both libraries; all 79 selected tests passed three repetitions per OFF/ON mode, the unchanged deferral executable reported eight actual passes per mode without skips, and SONAME/1,769 exports match. The single full ./lint run had one 600-second prototype-scan timeout; its isolated retry passed in 684.5 seconds and all remaining lint components passed. Final ./push proof passed Clippy and Dylint on all six targets, all repository checks (including the prototype scan in 499.2 seconds), 9,451 host tests with six reported skips, 920 utility feature tests, and Windows GNU test linking; the final commit was signed and locally verified. Cross links do not execute Windows or Darwin binaries.

@zackees zackees added the pool-active Pool worker owns this PR; automated rebases must skip it label Nov 20, 2026
@zackees
zackees enabled auto-merge November 20, 2026 05:24
@zackees
zackees added this pull request to the merge queue Nov 20, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 20, 2026
Ci-Attestation: {"at":1795252414,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["5c0153cb45ee3568f09b317cde91ef2e13f453e5"],"secs":707,"stamp":"d8058bdf39ac1fd950529b041e4daeed","tree":"01f979c73f6ce0eae7ade74944fc003fcd71ebf2","v":1,"via":"run"}
Ci-Attestation: {"at":1795252414,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["5c0153cb45ee3568f09b317cde91ef2e13f453e5"],"secs":707,"stamp":"e39634435aa96bb0ab8b347ed4a898b7","tree":"01f979c73f6ce0eae7ade74944fc003fcd71ebf2","v":1,"via":"run"}
Ci-Attestation: {"at":1795252414,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["5c0153cb45ee3568f09b317cde91ef2e13f453e5"],"secs":707,"stamp":"47865634d6e3e533b203d6a31f82acd2","tree":"01f979c73f6ce0eae7ade74944fc003fcd71ebf2","v":1,"via":"run"}
Ci-Attestation: {"at":1795252414,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["5c0153cb45ee3568f09b317cde91ef2e13f453e5"],"secs":707,"stamp":"e7c7870cb91a50c63c935cd63bdec919","tree":"01f979c73f6ce0eae7ade74944fc003fcd71ebf2","v":1,"via":"run"}
Ci-Attestation: {"at":1795251676,"gate":"general/all/client-lint","host":"linux-x86_64","key":"d19d6b91ad135a446777be10e0e2ee6134437e4b50b25f3390e16b40f21e4542","lane":"client-lint","parents":["5c0153cb45ee3568f09b317cde91ef2e13f453e5"],"secs":784,"stamp":"79f41f826bddd5c3a866dacc50629a58","tree":"01f979c73f6ce0eae7ade74944fc003fcd71ebf2","v":1,"via":"run"}
Ci-Attestation: {"at":1795252414,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["5c0153cb45ee3568f09b317cde91ef2e13f453e5"],"secs":707,"stamp":"61970e8df9d4c4808cf813d635bf97cc","tree":"01f979c73f6ce0eae7ade74944fc003fcd71ebf2","v":1,"via":"run"}
Ci-Attestation: {"at":1795251690,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"d19d6b91ad135a446777be10e0e2ee6134437e4b50b25f3390e16b40f21e4542","lane":"client-lint","parents":["5c0153cb45ee3568f09b317cde91ef2e13f453e5"],"secs":784,"stamp":"e7ec488aa9cc2f6173684e8f93cbc8b3","tree":"01f979c73f6ce0eae7ade74944fc003fcd71ebf2","v":1,"via":"run"}
Ci-Attestation: {"at":1795251693,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"d19d6b91ad135a446777be10e0e2ee6134437e4b50b25f3390e16b40f21e4542","lane":"client-lint","parents":["5c0153cb45ee3568f09b317cde91ef2e13f453e5"],"secs":784,"stamp":"e305e178f07d8896394934bbe05c20d6","tree":"01f979c73f6ce0eae7ade74944fc003fcd71ebf2","v":1,"via":"run"}
Ci-Attestation: {"at":1795251685,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"d19d6b91ad135a446777be10e0e2ee6134437e4b50b25f3390e16b40f21e4542","lane":"client-lint","parents":["5c0153cb45ee3568f09b317cde91ef2e13f453e5"],"secs":784,"stamp":"5798ad5b81c4f0dddf56e4103d01ded4","tree":"01f979c73f6ce0eae7ade74944fc003fcd71ebf2","v":1,"via":"run"}
Ci-Attestation: {"at":1795251687,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"d19d6b91ad135a446777be10e0e2ee6134437e4b50b25f3390e16b40f21e4542","lane":"client-lint","parents":["5c0153cb45ee3568f09b317cde91ef2e13f453e5"],"secs":784,"stamp":"909d16017ce9a79b4ee78d61f551820e","tree":"01f979c73f6ce0eae7ade74944fc003fcd71ebf2","v":1,"via":"run"}
Ci-Attestation: {"at":1795251678,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"d19d6b91ad135a446777be10e0e2ee6134437e4b50b25f3390e16b40f21e4542","lane":"client-lint","parents":["5c0153cb45ee3568f09b317cde91ef2e13f453e5"],"secs":784,"stamp":"8a2aad0786f803ce2921e2e538ed06e7","tree":"01f979c73f6ce0eae7ade74944fc003fcd71ebf2","v":1,"via":"run"}
Ci-Attestation: {"at":1795251679,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"d19d6b91ad135a446777be10e0e2ee6134437e4b50b25f3390e16b40f21e4542","lane":"client-lint","parents":["5c0153cb45ee3568f09b317cde91ef2e13f453e5"],"secs":784,"stamp":"2b05ed0fed44f3724cefdc7f13bab3c4","tree":"01f979c73f6ce0eae7ade74944fc003fcd71ebf2","v":1,"via":"run"}
Ci-Attestation: {"at":1795251688,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"d19d6b91ad135a446777be10e0e2ee6134437e4b50b25f3390e16b40f21e4542","lane":"client-lint","parents":["5c0153cb45ee3568f09b317cde91ef2e13f453e5"],"secs":784,"stamp":"be8cb95df44a69c67f5458c766ed1ccb","tree":"01f979c73f6ce0eae7ade74944fc003fcd71ebf2","v":1,"via":"run"}
Ci-Attestation: {"at":1795251689,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"d19d6b91ad135a446777be10e0e2ee6134437e4b50b25f3390e16b40f21e4542","lane":"client-lint","parents":["5c0153cb45ee3568f09b317cde91ef2e13f453e5"],"secs":784,"stamp":"0552f269e1ec453a28c1ab8949fbe018","tree":"01f979c73f6ce0eae7ade74944fc003fcd71ebf2","v":1,"via":"run"}
Ci-Attestation: {"at":1795251682,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"d19d6b91ad135a446777be10e0e2ee6134437e4b50b25f3390e16b40f21e4542","lane":"client-lint","parents":["5c0153cb45ee3568f09b317cde91ef2e13f453e5"],"secs":784,"stamp":"8259fbe719ed08c89bcc62ee1ad914b4","tree":"01f979c73f6ce0eae7ade74944fc003fcd71ebf2","v":1,"via":"run"}
Ci-Attestation: {"at":1795251684,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"d19d6b91ad135a446777be10e0e2ee6134437e4b50b25f3390e16b40f21e4542","lane":"client-lint","parents":["5c0153cb45ee3568f09b317cde91ef2e13f453e5"],"secs":784,"stamp":"e7eb5f3a999c3e4787115b597eba83f5","tree":"01f979c73f6ce0eae7ade74944fc003fcd71ebf2","v":1,"via":"run"}
Ci-Attestation: {"at":1795251677,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"d19d6b91ad135a446777be10e0e2ee6134437e4b50b25f3390e16b40f21e4542","lane":"client-lint","parents":["5c0153cb45ee3568f09b317cde91ef2e13f453e5"],"secs":784,"stamp":"a41f08136add6a7db843513b84db98d5","tree":"01f979c73f6ce0eae7ade74944fc003fcd71ebf2","v":1,"via":"run"}
Ci-Attestation: {"at":1795251678,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"d19d6b91ad135a446777be10e0e2ee6134437e4b50b25f3390e16b40f21e4542","lane":"client-lint","parents":["5c0153cb45ee3568f09b317cde91ef2e13f453e5"],"secs":784,"stamp":"e279001351862c17e4ff6a304cadcb92","tree":"01f979c73f6ce0eae7ade74944fc003fcd71ebf2","v":1,"via":"run"}
Ci-Attestation: {"at":1795254894,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"8ec673e9bdc9f16514daa0463bf88afa1f18a168d0e9488900e83641c4e0af9d","lane":"client-test-x86_64-unknown-linux-gnu","parents":["5c0153cb45ee3568f09b317cde91ef2e13f453e5"],"secs":2474,"stamp":"bfbb4df0977a3086fd8db24953968421","tree":"01f979c73f6ce0eae7ade74944fc003fcd71ebf2","v":1,"via":"run"}

Client-Checks: {"checks":{"base":"0419d4a268c3fb3bcdbe3fbe3908b3f4d75e380c","coverage":"all-tracked-applicable-files","diff":["libobs/build/libobs.core-source+.h.c","libobs/build/libobs.ported-sceneitem-defer-update+.h.c","libobs/build/ported-source-sets/sceneitem-defer-update.json","libobs/cmake/rust-exports.d/obs-scene-item_defer_update.txt","libobs/obs-sceneitem-defer-update-fields.c.h","rust/README.md","rust/obs-c-oracle/oracle.d/sceneitem-defer-update.list","rust/obs-c-oracle/oracle/scene_item_bounds_setters.c","rust/obs-c-oracle/oracle/scene_transform_states_links.c","rust/obs-c-oracle/oracle/sceneitem_defer_update.c","rust/obs-scene/src/ffi/item_defer_update.rs","rust/obs-scene/src/ffi/mod.rs","rust/obs-scene/src/item_defer_update.rs","rust/obs-scene/src/lib.rs","rust/obs-scene/tests/scene/item_defer_update.rs","rust/obs-scene/tests/scene/item_defer_update_parity.rs","rust/obs-scene/tests/scene/main.rs","test/cmocka/build/rust-static-support.json","test/cmocka/sceneitem-defer-update-link-support.c"],"head":"17229c07336949a4cbcb3a0570b86124579423af","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":"1c00fb26cffe567f9ba8a0888c8f1abb3cf8ceab6e621581a3ee285614ccf009","tree":"01f979c73f6ce0eae7ade74944fc003fcd71ebf2"}}
@zackees
zackees force-pushed the port/5260-sceneitem-defer-update branch from 50c507c to 5964d70 Compare November 21, 2026 09:55
@zackees zackees removed the pool-active Pool worker owns this PR; automated rebases must skip it label Nov 21, 2026
@zackees
zackees enabled auto-merge November 21, 2026 09:56
@zackees
zackees added this pull request to the merge queue Nov 21, 2026
Merged via the queue into master with commit 3a989aa Nov 21, 2026
43 checks passed
@zackees
zackees deleted the port/5260-sceneitem-defer-update branch November 21, 2026 10:42
@obs-rust-project-manager obs-rust-project-manager Bot moved this from Needs fix to Done in obs-rust Multiview Nov 21, 2026
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