Skip to content

obs-scene: Port scale filter and blending getters (#3889) - #3891

Merged
zackees merged 11 commits into
masterfrom
port/scene-item-render-getters
Nov 7, 2026
Merged

zackees merged 11 commits into
masterfrom
port/scene-item-render-getters

Conversation

@zackees

@zackees zackees commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Ports obs_sceneitem_get_scale_filter, obs_sceneitem_get_blending_method and obs_sceneitem_get_blending_mode into the existing obs-scene crate. Preserves independent stored enum values, zero-valued NULL defaults, exact debug diagnostics and every item byte. No intended behavior differences or user-visible change.

Fixes #3889, native sub-issue of Phase 6 #444. Original C implementation by Lain Bailey / OBS Project. Public headers, existing C tests and websocket are unchanged.

Commit sequence: C-only actual-library characterization 4f8dc5b98; verbatim extraction d4728a1e7; Tier 1 RED acf198e9e (observed before formatting rebase as 8a1fd091f); Rust GREEN 0824e56e6. Observed RED command: SOLDR_PORCELAIN=0 SOLDR_RUSTC_WRAPPER=none OBS_PARITY_CASES=reduced soldr cargo test -p obs-data --test obs-tests-core scene::item_render_getters:: exits 101 with both tests failing at todo!("#3889"). Artifact: /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-bRyZ7i.log.

The Rust shims describe only the private prefix through blend_type and read only the requested field without borrowing the item. Real-header checks cover prefix span/alignment/every field offset and enum, crop and vec2 representations, including C long width. C owns complete fixtures for differential tests; all item bytes are compared after the calls. NULL log probes re-exec the existing Core state binary with an exact selector (one child test verified). Proptest persistence is disabled. The C reference retains the verbatim extracted functions in its own ported source group; public exports have a dedicated fragment. No hidden fragment or Windows benchmark stand-in applies.

Validation:

  • All six new tests pass again on final formatted GREEN head 0824e56e627706df66f92b6a6866a300e464f959 (artifact local-test-uIY1YV.log); restored full scene regression: 357 passed, exit 0, 6.30 seconds with reduced parity. Artifact: local-test-FY8ITj.log in the directory above.
  • Mutation: replacing the safe stored value with value ^ 1 makes characterized_edges fail at scale/method/mode zero, mismatch bits 7, exit 101. Exact GREEN restored before the regression and definitive Tier 2. Artifact: local-test-kCdSC7.log.
  • Focused Tier 2 uses repository docker_task_command and this slot's warm volume. Unchanged C characterization and pre-existing scene/canvas test pass three repeats against both actual libraries before extraction, after extraction and after the swap. Canvas reports all 13 cases, no startup skips. ldd proves /build/tree/libobs/libobs.so.30 and /build/tree/libobs-c-reference/libobs.so.30; all 1,767 dynamic exports match. Artifacts: baseline local-test-OJ5Bod.log, extraction local-test-d4KTog.log, GREEN local-test-1rgyoZ.log. Reproducer: /tmp/port-scene3-tier2.py.
  • Native link support follows obs-scene: Port the scene item ID getter (#3865) #3869: identical aborting logger for three pure scene-rule tests. All three build and pass three repeats with both libraries, along with unchanged characterization/canvas; exports still match. Artifact: local-test-YeFYdW.log. New characterization registers once in test-graph.json, its tests.d fragment points there, declares caption/uthash dependencies and has no runtime-directory requirement.
  • GCC and host Clang accept the extracted C and oracle with -Werror -Wformat-nonliteral plus strict conversion warnings. Clang uses -Qunused-arguments for injected Nix linker arguments and the SIMDe header root. The oracle's va_list capture uses the portable printf-format annotation from the fixed siblings.
  • Source-group inventory (10), port metadata (5), native inventory (3), README port table (1), and sorted test graph checks pass. The README record is in its sorted C-file row.
  • SOLDR_PORCELAIN=0 SOLDR_RUSTC_WRAPPER=none ./lint --fix passes formatting, all CI self-tests, workspace and feature Clippy, then exits 1 only at the documented soldr refusal to build the Dylint driver under clud. Final three artifact lines confirm the refusal; no workaround attempted. Hosted Fast Gate must provide Dylint validation. Artifact: local-test-xR30i0.log.
  • One primary clud-review reviewer: clean across Rust, C, Python, build configuration and docs.
  • Final rebase onto current origin/master and git merge-tree --write-tree --name-only origin/master HEAD pass without conflicts. Master remains 6d29998aa; obs-scene: Port the scene item ID getter (#3865) #3869 and fix(ci): decouple native inventory checks from core test totals #3880 are still open. Range-diff retains the extraction and RED patches exactly; only formatting changes in characterization and GREEN (normalized tokens match, including import ordering and trailing commas). The C characterization is byte-identical from its C-only commit through GREEN. Superseded remote head: 8a1fd091f529965d4ed2b7051a64078016759047.

Test cost: 25 debug invocations of the six new tests with reduced parity, longest 0.05 seconds, peak 16,788 KiB RSS. No own threads; one isolated child for global logging. No new Rust test executable; existing Core state category only.

The full ./unittest/Tier 2 suite, local sanitizer runs, native macOS/Windows execution and a local-gate attestation were not run. Hosted required checks remain the merge gate. Tier 4 does not apply to these read-only field getters.

Pool preflight: local RED 29bdfc53f (rebased a18bf9618) reproduces the exact header registration failure with explicit source-list diagnostics (local-test-AzHMIZ.log). GREEN c1b2f31e7 retains the exact per-target assertions and adds the required abort-only scene log stub to the expected source list for test_scene_render_plan_steps_rust; all seven canonical Rust-static registration tests pass (local-test-WwOU4F.log). All three requested Python checks pass (master's four native portability tests retained). New oracle, log stub and characterization pass strict host Clang with -Wformat-nonliteral -Werror, and GCC. Rebased after #3880 merged; range-diff changes only its obsolete absolute-count edits, retaining master’s new inventory assertions. Native runtime/Tier 2 suites were not repeated for this registration-only repair.

A second RED regression (074e91f0c) catches the new real-scene fixture's Windows pthread header dependency; GREEN e786b4c90 adds it conditionally. This fixture includes util/threading.h before obs-scene.h. No C assertion changed. Its targeted portability regression and graph sorting pass.

Serial SOLDR_PORCELAIN=0 ./lint --fix passed earlier formatting, Python and workspace/feature Clippy lanes and stopped only at the documented clud Dylint-driver refusal (local-test-bATUJ9.log). Hosted Fast Gate must supply Dylint.

Windows/ASan static-archive repair: job 128406799240 fails with MSVC LNK2019 (blog from obs_sceneitem_get_blending_method) in test_scene_audio_window_steps_rust, not the new fixture. ASan job 128406980162 has the identical missing provider: its sanitize-asan/build.log lines 3054–3062 show that target failing to link blog from all three getters before any tests ran. The fix adds the existing abort-only scene-getter-log-link-stub.c to that standalone target, matching the scene render target and #3862's unrelated-staticlib support. Every C assertion and public header is unchanged. Other legacy scene archive consumers already link OBS::libobs; two carry the same abort-only stub as well.

RED 6696aafc7 fails NativeB2Portability.test_scene_archive_consumers_supply_getter_logging because the audio-window target has only its fixture source. GREEN a516f09d3 supplies the stub and preserves exact source order and unconditional-source assertions in the Rust registration. f30472bd6 additionally discovers scene consumers from graph sources and checks legacy CMake provider links. All six portability checks pass. Serial validation: all seven native_build::canonical_rust_static_ registrations pass (0.16 s); all 354 CI self-test files pass (local-test-0XiqzI.log); all 357 reduced-parity scene tests pass (local-test-sqquK0.log); graph sorting, README table and Windows pthread dependency checks pass. No new Rust test executable, threads or generated allocations; existing registration test only.

Serial SOLDR_PORCELAIN=0 ./lint passes formatting, CI self-tests, workspace and feature Clippy and exits 1 only at the documented soldr refusal to build the Dylint driver under clud. The final three lines of local-test-b9W02t.log were inspected and confirm that refusal. No workaround attempted; hosted Fast Gate supplies the remaining Dylint gate.

The rebase onto current master was a no-op; range-diff preserves all eight previous PR commits exactly. No workflow, existing C test, public header or WebSocket file changed. Full native Windows/ASan Tier 2 execution remains hosted validation; neither failure was infrastructure-only, so no rerun was requested.

@zackees
zackees force-pushed the port/scene-item-render-getters branch from 8a1fd09 to 0824e56 Compare November 7, 2026 12:11
@zackees
zackees marked this pull request as ready for review November 7, 2026 12:11
@zackees
zackees enabled auto-merge November 7, 2026 12:11
@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Handed off to the coordinator/chaperone. Final GREEN head 0824e56 is pushed and verified; ready status and auto-merge are confirmed. Latest claim recheck has no refusal. All six focused tests pass on that head. Full scene regression, focused actual-library Tier 2 and strict GCC/Clang oracle checks passed; serial lint reached only the documented Dylint-driver refusal after the preceding lanes passed. PR body contains the complete evidence and limitations. Per worker-pool instructions, retiring without waiting on hosted checks.

@zackees
zackees force-pushed the port/scene-item-render-getters branch from 0824e56 to e786b4c Compare November 7, 2026 12:29
@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Pool preflight fixed the exact native registration failure: the new abort-only scene log stub was absent from the exact expected source list. RED a18bf96 reproduces the failure; GREEN c1b2f31 passes all seven registrations (local-test-WwOU4F.log), retaining every exact assertion. A second RED/GREEN pair adds conditional Windows pthread headers for the new real-scene fixture. Strict Clang/GCC, graph sorting, four master portability tests, README and the new regression pass. Rebased after #3880 merged, retaining master inventory assertions; range-diff only drops obsolete absolute-count edits. Replaced 0824e56 with verified remote e786b4c using an exact lease. Auto-merge re-armed and confirmed. Serial lint ends only at documented clud Dylint-driver refusal after earlier lanes pass (local-test-bATUJ9.log). Native runtime/Tier 2 not repeated for these registration/dependency fixes. Handed back to the pool chaperone.

@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Continuing the pool-owned Windows fix in slot obs-studio4. The bounded CI log reader recovered the real diagnostic: LNK2019 for blog from obs_sceneitem_get_blending_method while linking test_scene_audio_window_steps_rust (job 128406799240, log lines 7794–7795). Adding a focused RED regression and the missing abort-only log stub to this standalone archive consumer; no C test assertions will change.

@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Fixed the actual Windows and ASan link failures, both caused by the same missing blog provider in test_scene_audio_window_steps_rust. MSVC job 128406799240 reports LNK2019 from the blending getter; ASan job 128406980162 has matching undefined references from all three getters in its build artifact (lines 3054–3062), before tests run. Added the existing abort-only scene log stub to that target, matching #3862's unrelated-staticlib support. No C assertions or headers changed.

RED 6696aaf reproduces the missing source; GREEN a516f09 fixes it and retains exact/unconditional registration assertions; f30472b discovers graph scene consumers and checks legacy CMake provider links. Six portability checks, seven canonical Rust-static registrations, all 354 CI self-test files, all 357 focused scene tests, graph sorting, README and pthread checks pass. Serial lint passes all earlier lanes then stops only at the documented soldr Dylint-driver refusal (local-test-b9W02t.log; final three lines inspected). Hosted Fast Gate supplies Dylint; native Windows/ASan execution remains hosted validation.

Pushed f30472b with the exact e786b4c lease; original eight commits preserved by range-diff, master rebase was a no-op. Remote head verified and head-pinned auto-merge re-armed. No infrastructure-only evidence and no rerun. Handed off to the pool chaperone; QUEUED #3891.

@zackees
zackees added this pull request to the merge queue Nov 7, 2026
Merged via the queue into master with commit 5de5b53 Nov 7, 2026
44 checks passed
@zackees
zackees deleted the port/scene-item-render-getters branch November 7, 2026 14:48
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.

rust: Port obs-scene scale filter and blending getters to obs-scene

1 participant