Skip to content

obs-source: port source_render to Rust (Fixes #5976) - #5977

Merged
rdoupe merged 4 commits into
masterfrom
port/5976-source-render
Nov 30, 2026
Merged

rdoupe merged 4 commits into
masterfrom
port/5976-source-render

Conversation

@rdoupe

@rdoupe rdoupe commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #5976.

This ports source_render() to obs-source, in the shape of #5943 and #5974. It is the draw behind obs_source_default_render() and obs_source_main_render() (both Rust already), reached through its hidden wrapper obs_source_default_render_source_render(): the source's own video_render, drawn straight or, when the source's colour space is in another class than the target's, through color_space_texrender and the default effect. Every decision was already Rust (obs-source::draw_plan); what moves is the profiler bracket, the field reads in their order, the texrender cache and the graphics calls.

What changes

  1. Extraction, no behavior change (libobs: extract source_render verbatim). source_render() and its wrapper move unchanged into libobs/obs-source-convert-render.c.h (live group libobs.core-source). No cmocka case reached the conversion route, so the new test_source_convert_render characterizes it through the real libobs, rendering on the test thread in the graphics context into a target of the colour space each case picks: a source in the target's class drawn straight into the target; extended linear and scRGB sources drawn into color_space_texrender at the base size and in their own space, and that texture drawn into an sRGB target (the tonemapped pixels of the box read back, nothing outside, the framebuffer sRGB flag restored); the texrender kept while the source's format matches and made again when it changes; a plain source converted with the default effect; a source of size 0 not drawn.
  2. Tier 1, RED: the Host trait and a todo!() core, 18 Tier 1 tests over a recording model whose hooks swap the texrender from inside a call, failing on an unbalanced stack or a sprite outside a pass.
  3. GREEN: the safe core obs-source::convert_render, the hidden export in obs-source::ffi::source_convert_render (rust-hidden.d; no EXPORT), one-access adapters in libobs/obs-source-convert-render-fields.c.h, the original moved to the reference-only group libobs.ported-source-convert-render. Tier 3 (oracle/source_convert_render.c) runs the original C, with the oracle's original draw decisions, against the Rust export over shared stand-ins of every call, with clobbers that repoint context.data and color_space_texrender and swap info.video_render mid-call; it compares the log (floats as bits, with blend depth and texrender/technique/pass/profiler/blending state), the fields, the texrenders destroyed and created, the graphics state left and every byte over a grid and a proptest, pins the C's order, checks every clobber reaches the C, and rejects twelve mutants.

Pinned: color_space_texrender is read again for every call that takes it, as in the C (the null check, the format, the destroy, the reset, the begin, the end, the texture; the_texrender_is_read_again_for_the_destroy, ..._after_the_draw; mutants DestroyCached, BeginCached, EndCached); context.data after the profiler begins (DataEarly); the white level only into or out of scRGB; blending and the framebuffer flag restored (BlendingLeftOff, FbNotRestored); one sprite per pass (OneSprite); GS_ZS_NONE (CreateWithDepth).

Consumers checked: the wrapper is called from obs-source-default-render-fields.c.h and obs-source-video-render-draws-fields.c.h; their oracles map it to their own stand-ins, so they are unchanged. No intentional differences. rust/README.md row added; no user-visible change, so no docs/features.md line. No public header, C test or obs-websocket change.

Evidence

RED, at the RED commit:

soldr cargo test -p obs-data --test obs-tests-core source::convert_render
test result: FAILED. 2 passed; 16 failed (not yet implemented: source_render)

GREEN, at the head:

soldr cargo test -p obs-data --test obs-tests-core source::convert_render
test result: ok. 24 passed; 0 failed   (18 Tier 1 + 6 Tier 3)

soldr cargo test -p obs-data --test obs-tests-core source::
2369 passed, 0 failed

soldr cargo test -p obs-studio-rust --test obs-tests-app canonical_source
test canonical_source_convert_render_swap_is_registered ... ok
test result: ok. 75 passed; 0 failed

Tier 2, linux-validate build volume (xvfb-run -a, runtime directory), both libraries:

test at the extraction head, hybrid head, C reference
test_source_convert_render (new) 5/5 both 5/5 5/5
test_source_video_render_draws 6/6 6/6
test_source_default_render 2/2 2/2
test_source_video_render 12/12 12/12
test_filter_color_space 5/5 5/5
test_color_correction_16f 3/3 3/3
test_scene_color_space 4/4 4/4
test_texture_render 13/13 13/13

The full Tier 2 suite also ran at the extraction (run.py --repeat 1): every other test passed.

A mutant of the Rust core (the framebuffer sRGB flag left on instead of restored) fails hdr_into_sdr_draws_through_the_texrender on the hybrid library (4/5) and nothing on the C reference (5/5), so the hybrid runs the Rust export.

OBS_CMOCKA_LINK=false uv run --no-project ci/windows_link_check.py links every test binary. ./lint passes.

Test cost

New tests: longest 0.06 s (the Tier 3 grid; 0.05 s for the mutant test with OBS_PARITY_CASES=reduced), all 24 in 0.10-0.20 s on one thread (debug, filtered binary, 5 runs), peak RSS 28 MB (whole test process), no threads of their own. The new cmocka test takes under a second per library.

🤖 Generated with Claude Code

rdoupe and others added 3 commits November 29, 2026 21:40
Move source_render(), the draw behind obs_source_default_render() and
obs_source_main_render(), and its hidden wrapper
obs_source_default_render_source_render() (no EXPORT) unchanged out of
obs-source.c.h into obs-source-convert-render.c.h (live group
libobs.core-source). No behavior change.

The new cmocka test_source_convert_render characterizes it through the
real libobs, rendering on the test thread inside the graphics context
into a target of the colour space each case picks: a source in the
target's class is drawn straight into the target; any other pair is
drawn into color_space_texrender at the source's base size and in the
source's colour space, and that texture drawn into the target (opaque
inside the source's box, nothing outside), the framebuffer sRGB flag
restored; the texrender is kept while the source's format matches and
made again in the new format when it does not; a plain source still
gets the default effect when converted; and a source of size 0 is not
drawn.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The safe core's Host trait (the profiler bracket, context.data, the
current and the source's colour spaces, the format, the SDR white
level, color_space_texrender read again for every call that takes it
(the check, the format, the destroy, the reset, the begin, the end and
the texture), its create, the base size, blending, the clear and the
ortho, the source's video_render, the default effect, the technique and
params, the framebuffer sRGB flag, the blend stack, the passes and the
sprites) and a todo!() core, with 18 Tier 1 tests over a recording
model whose hooks swap the texrender from inside a call, and that fails
on an unbalanced stack or a sprite outside a pass.

soldr cargo test -p obs-data --test obs-tests-core source::convert_render
test result: FAILED. 2 passed; 16 failed (not yet implemented: source_render)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
source_render(), the draw behind obs_source_default_render() and
obs_source_main_render(), is now the safe core
obs-source::convert_render behind the hidden export of its wrapper
obs_source_default_render_source_render() (obs-source::ffi::
source_convert_render; rust-hidden.d, it has no EXPORT). The profiler,
the fields, the colour space query, the base size and every graphics
call stay C, one access each, in obs-source-convert-render-fields.c.h
(live group libobs.core-source); the original moves to the
reference-only group libobs.ported-source-convert-render.

Like the C, color_space_texrender is read again for every call that
takes it (the check, the format, the destroy, the reset, the begin, the
end and the texture) and info.video_render is read when it is called.

Tier 3 (oracle/source_convert_render.c) runs the original C, with the
oracle's original draw decisions, against the Rust export on
real-layout sources through shared stand-ins of every call, with
clobbers that repoint context.data and color_space_texrender and swap
info.video_render mid-call; it compares the log, the fields, the
texrenders destroyed and created, the graphics state left and every
byte over a grid and a proptest, pins the C's order, checks that every
clobber reaches the C, and rejects twelve mutants.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ci-Attestation: {"at":1796006911,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["8b50f7b9e4ba3f54a03c24a0940f0ce791b366aa"],"secs":76,"stamp":"babdc5e28f33c513fecce16e309341d0","tree":"d18debb013229dc1d956a58c2fad8edcd67f60f4","v":1,"via":"run"}
Ci-Attestation: {"at":1796006911,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["8b50f7b9e4ba3f54a03c24a0940f0ce791b366aa"],"secs":76,"stamp":"6c1edff792074f679800b2740dc96885","tree":"d18debb013229dc1d956a58c2fad8edcd67f60f4","v":1,"via":"run"}
Ci-Attestation: {"at":1796006911,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["8b50f7b9e4ba3f54a03c24a0940f0ce791b366aa"],"secs":76,"stamp":"2c862b47fae0b32fcbb3a5b13b714e63","tree":"d18debb013229dc1d956a58c2fad8edcd67f60f4","v":1,"via":"run"}
Ci-Attestation: {"at":1796006911,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["8b50f7b9e4ba3f54a03c24a0940f0ce791b366aa"],"secs":76,"stamp":"d6fde078ce3140fabadda8ad0bcb5b5f","tree":"d18debb013229dc1d956a58c2fad8edcd67f60f4","v":1,"via":"run"}
Ci-Attestation: {"at":1796006833,"gate":"general/all/client-lint","host":"linux-x86_64","key":"9c2a2589dfb979bcedbf583008aabc2d96c70246b670561091d988b6f5fc53d6","lane":"client-lint","parents":["8b50f7b9e4ba3f54a03c24a0940f0ce791b366aa"],"secs":140,"stamp":"5629f43573877d3560fd112ed3be0c27","tree":"d18debb013229dc1d956a58c2fad8edcd67f60f4","v":1,"via":"run"}
Ci-Attestation: {"at":1796006911,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["8b50f7b9e4ba3f54a03c24a0940f0ce791b366aa"],"secs":76,"stamp":"8c66fd8f0d2d0830ae9eaac68f76789f","tree":"d18debb013229dc1d956a58c2fad8edcd67f60f4","v":1,"via":"run"}
Ci-Attestation: {"at":1796006833,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"9c2a2589dfb979bcedbf583008aabc2d96c70246b670561091d988b6f5fc53d6","lane":"client-lint","parents":["8b50f7b9e4ba3f54a03c24a0940f0ce791b366aa"],"secs":140,"stamp":"529004f5a43e121bb1d6678e86d35b54","tree":"d18debb013229dc1d956a58c2fad8edcd67f60f4","v":1,"via":"run"}
Ci-Attestation: {"at":1796006833,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"9c2a2589dfb979bcedbf583008aabc2d96c70246b670561091d988b6f5fc53d6","lane":"client-lint","parents":["8b50f7b9e4ba3f54a03c24a0940f0ce791b366aa"],"secs":140,"stamp":"368e607eccc04bd53a1d067de616a38e","tree":"d18debb013229dc1d956a58c2fad8edcd67f60f4","v":1,"via":"run"}
Ci-Attestation: {"at":1796006833,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"9c2a2589dfb979bcedbf583008aabc2d96c70246b670561091d988b6f5fc53d6","lane":"client-lint","parents":["8b50f7b9e4ba3f54a03c24a0940f0ce791b366aa"],"secs":140,"stamp":"1d5f2c69b6865fbd9637a8d8f9879d11","tree":"d18debb013229dc1d956a58c2fad8edcd67f60f4","v":1,"via":"run"}
Ci-Attestation: {"at":1796006833,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"9c2a2589dfb979bcedbf583008aabc2d96c70246b670561091d988b6f5fc53d6","lane":"client-lint","parents":["8b50f7b9e4ba3f54a03c24a0940f0ce791b366aa"],"secs":140,"stamp":"7b17f2dfc174d63d89e74e4f9cec0136","tree":"d18debb013229dc1d956a58c2fad8edcd67f60f4","v":1,"via":"run"}
Ci-Attestation: {"at":1796006833,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"9c2a2589dfb979bcedbf583008aabc2d96c70246b670561091d988b6f5fc53d6","lane":"client-lint","parents":["8b50f7b9e4ba3f54a03c24a0940f0ce791b366aa"],"secs":140,"stamp":"5c453c86d95b5424448ac3ee5ff59418","tree":"d18debb013229dc1d956a58c2fad8edcd67f60f4","v":1,"via":"run"}
Ci-Attestation: {"at":1796006833,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"9c2a2589dfb979bcedbf583008aabc2d96c70246b670561091d988b6f5fc53d6","lane":"client-lint","parents":["8b50f7b9e4ba3f54a03c24a0940f0ce791b366aa"],"secs":140,"stamp":"6458ad8451f98a10c6b20d3e5f72b59a","tree":"d18debb013229dc1d956a58c2fad8edcd67f60f4","v":1,"via":"run"}
Ci-Attestation: {"at":1796006833,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"9c2a2589dfb979bcedbf583008aabc2d96c70246b670561091d988b6f5fc53d6","lane":"client-lint","parents":["8b50f7b9e4ba3f54a03c24a0940f0ce791b366aa"],"secs":140,"stamp":"bfeb9187c5b501dc95c0cb09c44bdd0d","tree":"d18debb013229dc1d956a58c2fad8edcd67f60f4","v":1,"via":"run"}
Ci-Attestation: {"at":1796006833,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"9c2a2589dfb979bcedbf583008aabc2d96c70246b670561091d988b6f5fc53d6","lane":"client-lint","parents":["8b50f7b9e4ba3f54a03c24a0940f0ce791b366aa"],"secs":140,"stamp":"d90f10a19ea663632f8dde4298557c4a","tree":"d18debb013229dc1d956a58c2fad8edcd67f60f4","v":1,"via":"run"}
Ci-Attestation: {"at":1796006833,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"9c2a2589dfb979bcedbf583008aabc2d96c70246b670561091d988b6f5fc53d6","lane":"client-lint","parents":["8b50f7b9e4ba3f54a03c24a0940f0ce791b366aa"],"secs":140,"stamp":"f65017a614233d98e8c70cebb9f89864","tree":"d18debb013229dc1d956a58c2fad8edcd67f60f4","v":1,"via":"run"}
Ci-Attestation: {"at":1796006833,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"9c2a2589dfb979bcedbf583008aabc2d96c70246b670561091d988b6f5fc53d6","lane":"client-lint","parents":["8b50f7b9e4ba3f54a03c24a0940f0ce791b366aa"],"secs":140,"stamp":"69a7ab4308faa4519944b6c77b853655","tree":"d18debb013229dc1d956a58c2fad8edcd67f60f4","v":1,"via":"run"}
Ci-Attestation: {"at":1796006833,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"9c2a2589dfb979bcedbf583008aabc2d96c70246b670561091d988b6f5fc53d6","lane":"client-lint","parents":["8b50f7b9e4ba3f54a03c24a0940f0ce791b366aa"],"secs":140,"stamp":"d79ca34b880b306b6a2f5f15a5f0f499","tree":"d18debb013229dc1d956a58c2fad8edcd67f60f4","v":1,"via":"run"}
Ci-Attestation: {"at":1796006833,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"9c2a2589dfb979bcedbf583008aabc2d96c70246b670561091d988b6f5fc53d6","lane":"client-lint","parents":["8b50f7b9e4ba3f54a03c24a0940f0ce791b366aa"],"secs":140,"stamp":"4988850b6183341729914b54ad21fc8e","tree":"d18debb013229dc1d956a58c2fad8edcd67f60f4","v":1,"via":"run"}
Ci-Attestation: {"at":1796007271,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"26e5e2696431dc93a217da9566daf2e797d9a1b9cfab7212814672c93c6b6091","lane":"client-test-x86_64-unknown-linux-gnu","parents":["8b50f7b9e4ba3f54a03c24a0940f0ce791b366aa"],"secs":360,"stamp":"2713b797581207b3515416f7e48a0431","tree":"d18debb013229dc1d956a58c2fad8edcd67f60f4","v":1,"via":"run"}

Client-Checks: {"checks":{"base":"914f81f64aba02b0fab8fb919cd8c6e45d48d466","coverage":"all-tracked-applicable-files","diff":["libobs/build/libobs.core-source+.h.c","libobs/build/libobs.ported-source-convert-render+.h.c","libobs/build/ported-source-sets/source-convert-render.json","libobs/cmake/rust-hidden.d/obs-source-source_convert_render.txt","libobs/obs-source-convert-render-fields.c.h","libobs/obs-source-convert-render.c.h","libobs/obs-source.c.h","rust/README.md","rust/obs-build/tests/native.rs","rust/obs-build/tests/native/registration/canonical_source_convert_render_swap_is_registered.rs","rust/obs-c-oracle/oracle.d/source-convert-render.list","rust/obs-c-oracle/oracle/source_convert_render.c","rust/obs-source/src/convert_render.rs","rust/obs-source/src/ffi/mod.rs","rust/obs-source/src/ffi/source_convert_render.rs","rust/obs-source/src/lib.rs","rust/obs-source/tests/source/convert_render.rs","rust/obs-source/tests/source/convert_render_parity.rs","rust/obs-source/tests/source/main.rs","test/cmocka/build/test-graph.json","test/cmocka/test_source_convert_render.c","test/cmocka/tests.d/test_source_convert_render.cmake"],"head":"de90024d18c2867dc08a1c4b87863614ae7b214e","tools":{"orchestrator-python":"3.13.16 (main, Oct 14 2026, 01:04:01) [Clang 23.1.3 ]","schema-dependencies":"3.13.16 (main, Oct 14 2026, 01:04:01) [Clang 23.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-GITv2.15.4\n   compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 DTDValid HTML C14N Catalog XPath XPointer XInclude Iconv ICU ISO8859X Regexps Automata RelaxNG Schemas Schematron Modules Debug Zlib"},"tracked-digest":"ed92428b21743acd951c9685e1c75d633dcfbf9b3e7bb75a7b54eb264d78e306","tree":"d18debb013229dc1d956a58c2fad8edcd67f60f4"}}
@rdoupe
rdoupe requested a review from zackees as a code owner November 30, 2026 02:54
@rdoupe
rdoupe enabled auto-merge November 30, 2026 03:04
@zackees

zackees commented Nov 30, 2026

Copy link
Copy Markdown
Member

Coordinator: the two Tier 2 failures are links, not tests.

  • The error: Tier 2 Link Check (mac-arm64) and Rust Tier 2 Linux (build) both fail with undefined symbol: obs_source_private_settings_fields. It's referenced from liblibobs_rust.a(...obs_source...cgu.246.rcgu.o), at obs_source_get_private_settings+0x10.
  • Where: in all 28 *_steps_rust binaries (test_async_conversion_plan_rust, test_source_init_context_rust, test_transition_start_steps_rust, ...). Those link the Rust staticlib without the full libobs C, so they don't have obs-source-private-settings-fields.c.h.
  • Cause: this diff never mentions private settings, and master is green. Most likely the new convert_render code moved obs_source_get_private_settings into a codegen unit those binaries now pull in (cgu.246), the same CGU-partition fragility Use Cargo defaults for release codegen units #5975 hits.
  • Possible fixes: link obs-source-private-settings-fields into those targets (a test-graph.json dependency, or a link stub like *-link-stubs.c). Or check why the *_steps_rust targets' dead-stripping doesn't drop obs_source_get_private_settings: it's a #[no_mangle] export, so the linker may keep it live.

…Refs #5976)

obs-source has more than 256 modules, so its release codegen-units = 256
merged small ones. With the source_render port, obs_source_get_private_settings
landed in the push-to-enable signal's member, and every standalone source
cmocka fixture that pulls that member failed to link
obs_source_private_settings_fields (Tier 2 Linux and mac-arm64 link jobs).
Raise the cap to 1024 so each module keeps its own member.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ci-Attestation: {"at":1796008928,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["0085d9e1ef49fdb98e4aadcefb1f238f37d49a6b"],"secs":76,"stamp":"ed9c707d63046cead31c43b4a0f8bdd4","tree":"26717dde592f17ea3d7a270121f8572914b4846c","v":1,"via":"run"}
Ci-Attestation: {"at":1796008928,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["0085d9e1ef49fdb98e4aadcefb1f238f37d49a6b"],"secs":76,"stamp":"0a80c8c2887321af2bbde1e454dc979c","tree":"26717dde592f17ea3d7a270121f8572914b4846c","v":1,"via":"run"}
Ci-Attestation: {"at":1796008928,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["0085d9e1ef49fdb98e4aadcefb1f238f37d49a6b"],"secs":76,"stamp":"3f114d5eea17b3db4c8f9d4c75ad6379","tree":"26717dde592f17ea3d7a270121f8572914b4846c","v":1,"via":"run"}
Ci-Attestation: {"at":1796008928,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["0085d9e1ef49fdb98e4aadcefb1f238f37d49a6b"],"secs":76,"stamp":"d274f454cf2717be1f0c1d72a06c1bde","tree":"26717dde592f17ea3d7a270121f8572914b4846c","v":1,"via":"run"}
Ci-Attestation: {"at":1796008851,"gate":"general/all/client-lint","host":"linux-x86_64","key":"bed8883737436da7cd4fd6c6d780999405578a29e3c390894897947258819442","lane":"client-lint","parents":["0085d9e1ef49fdb98e4aadcefb1f238f37d49a6b"],"secs":163,"stamp":"d23f4bf81023ed97daa33443d0a9d7f2","tree":"26717dde592f17ea3d7a270121f8572914b4846c","v":1,"via":"run"}
Ci-Attestation: {"at":1796008928,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["0085d9e1ef49fdb98e4aadcefb1f238f37d49a6b"],"secs":76,"stamp":"d1f79dcd5a6bc7f418d286dc0caea958","tree":"26717dde592f17ea3d7a270121f8572914b4846c","v":1,"via":"run"}
Ci-Attestation: {"at":1796008851,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"bed8883737436da7cd4fd6c6d780999405578a29e3c390894897947258819442","lane":"client-lint","parents":["0085d9e1ef49fdb98e4aadcefb1f238f37d49a6b"],"secs":163,"stamp":"f3e25b29ce07d27ff1d1c937a1fe7f5f","tree":"26717dde592f17ea3d7a270121f8572914b4846c","v":1,"via":"run"}
Ci-Attestation: {"at":1796008851,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"bed8883737436da7cd4fd6c6d780999405578a29e3c390894897947258819442","lane":"client-lint","parents":["0085d9e1ef49fdb98e4aadcefb1f238f37d49a6b"],"secs":163,"stamp":"92a3d2ec9f106fd3b7c05e50858688eb","tree":"26717dde592f17ea3d7a270121f8572914b4846c","v":1,"via":"run"}
Ci-Attestation: {"at":1796008851,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"bed8883737436da7cd4fd6c6d780999405578a29e3c390894897947258819442","lane":"client-lint","parents":["0085d9e1ef49fdb98e4aadcefb1f238f37d49a6b"],"secs":163,"stamp":"36a79d8a552efc4d6ca758e4a54c5564","tree":"26717dde592f17ea3d7a270121f8572914b4846c","v":1,"via":"run"}
Ci-Attestation: {"at":1796008851,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"bed8883737436da7cd4fd6c6d780999405578a29e3c390894897947258819442","lane":"client-lint","parents":["0085d9e1ef49fdb98e4aadcefb1f238f37d49a6b"],"secs":163,"stamp":"188802b326912234fc3ce3757a053220","tree":"26717dde592f17ea3d7a270121f8572914b4846c","v":1,"via":"run"}
Ci-Attestation: {"at":1796008851,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"bed8883737436da7cd4fd6c6d780999405578a29e3c390894897947258819442","lane":"client-lint","parents":["0085d9e1ef49fdb98e4aadcefb1f238f37d49a6b"],"secs":163,"stamp":"9fdcb69d8e19807d81474db6d1a51dad","tree":"26717dde592f17ea3d7a270121f8572914b4846c","v":1,"via":"run"}
Ci-Attestation: {"at":1796008851,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"bed8883737436da7cd4fd6c6d780999405578a29e3c390894897947258819442","lane":"client-lint","parents":["0085d9e1ef49fdb98e4aadcefb1f238f37d49a6b"],"secs":163,"stamp":"6b703739ff8e01dc06f9720c9cd38b3e","tree":"26717dde592f17ea3d7a270121f8572914b4846c","v":1,"via":"run"}
Ci-Attestation: {"at":1796008851,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"bed8883737436da7cd4fd6c6d780999405578a29e3c390894897947258819442","lane":"client-lint","parents":["0085d9e1ef49fdb98e4aadcefb1f238f37d49a6b"],"secs":163,"stamp":"542e861ef999e548356f4c3da31aebf6","tree":"26717dde592f17ea3d7a270121f8572914b4846c","v":1,"via":"run"}
Ci-Attestation: {"at":1796008851,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"bed8883737436da7cd4fd6c6d780999405578a29e3c390894897947258819442","lane":"client-lint","parents":["0085d9e1ef49fdb98e4aadcefb1f238f37d49a6b"],"secs":163,"stamp":"8ec4dfffc9086043f37e541b5bc7cdcf","tree":"26717dde592f17ea3d7a270121f8572914b4846c","v":1,"via":"run"}
Ci-Attestation: {"at":1796008851,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"bed8883737436da7cd4fd6c6d780999405578a29e3c390894897947258819442","lane":"client-lint","parents":["0085d9e1ef49fdb98e4aadcefb1f238f37d49a6b"],"secs":163,"stamp":"ac9f664735e5050e37e0cc746ad05317","tree":"26717dde592f17ea3d7a270121f8572914b4846c","v":1,"via":"run"}
Ci-Attestation: {"at":1796008851,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"bed8883737436da7cd4fd6c6d780999405578a29e3c390894897947258819442","lane":"client-lint","parents":["0085d9e1ef49fdb98e4aadcefb1f238f37d49a6b"],"secs":163,"stamp":"d4b1bdce4c0cd1d862cc54a3a55f665f","tree":"26717dde592f17ea3d7a270121f8572914b4846c","v":1,"via":"run"}
Ci-Attestation: {"at":1796008851,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"bed8883737436da7cd4fd6c6d780999405578a29e3c390894897947258819442","lane":"client-lint","parents":["0085d9e1ef49fdb98e4aadcefb1f238f37d49a6b"],"secs":163,"stamp":"6b6c7a2f236f6f41f0379cd5938e711d","tree":"26717dde592f17ea3d7a270121f8572914b4846c","v":1,"via":"run"}
Ci-Attestation: {"at":1796008851,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"bed8883737436da7cd4fd6c6d780999405578a29e3c390894897947258819442","lane":"client-lint","parents":["0085d9e1ef49fdb98e4aadcefb1f238f37d49a6b"],"secs":163,"stamp":"3f0966d6d5d4e89eed62ee8394a67cb8","tree":"26717dde592f17ea3d7a270121f8572914b4846c","v":1,"via":"run"}
Ci-Attestation: {"at":1796009276,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"ddc413f5ffd9d1cc90418993a4a54fb90edb88dda46c32aa37def19a159b5ae2","lane":"client-test-x86_64-unknown-linux-gnu","parents":["0085d9e1ef49fdb98e4aadcefb1f238f37d49a6b"],"secs":347,"stamp":"a6b76c1bf080d798da7e23b30bdfdaa8","tree":"26717dde592f17ea3d7a270121f8572914b4846c","v":1,"via":"run"}

Client-Checks: {"checks":{"base":"914f81f64aba02b0fab8fb919cd8c6e45d48d466","coverage":"all-tracked-applicable-files","diff":["Cargo.toml","libobs/build/libobs.core-source+.h.c","libobs/build/libobs.ported-source-convert-render+.h.c","libobs/build/ported-source-sets/source-convert-render.json","libobs/cmake/rust-hidden.d/obs-source-source_convert_render.txt","libobs/obs-source-convert-render-fields.c.h","libobs/obs-source-convert-render.c.h","libobs/obs-source.c.h","rust/README.md","rust/obs-build/tests/native.rs","rust/obs-build/tests/native/registration/canonical_source_convert_render_swap_is_registered.rs","rust/obs-c-oracle/oracle.d/source-convert-render.list","rust/obs-c-oracle/oracle/source_convert_render.c","rust/obs-source/src/convert_render.rs","rust/obs-source/src/ffi/mod.rs","rust/obs-source/src/ffi/source_convert_render.rs","rust/obs-source/src/lib.rs","rust/obs-source/tests/source/convert_render.rs","rust/obs-source/tests/source/convert_render_parity.rs","rust/obs-source/tests/source/main.rs","test/cmocka/build/test-graph.json","test/cmocka/test_source_convert_render.c","test/cmocka/tests.d/test_source_convert_render.cmake"],"head":"1057d5682b14fdea765b55237a94eb902e8e5d40","tools":{"orchestrator-python":"3.13.16 (main, Oct 14 2026, 01:04:01) [Clang 23.1.3 ]","schema-dependencies":"3.13.16 (main, Oct 14 2026, 01:04:01) [Clang 23.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-GITv2.15.4\n   compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 DTDValid HTML C14N Catalog XPath XPointer XInclude Iconv ICU ISO8859X Regexps Automata RelaxNG Schemas Schematron Modules Debug Zlib"},"tracked-digest":"45df03cff6cc8be6a2491c1b6b6581bb73f8f1e97f26fb30376bb6e60cdce614","tree":"26717dde592f17ea3d7a270121f8572914b4846c"}}
@rdoupe

rdoupe commented Nov 30, 2026

Copy link
Copy Markdown
Collaborator Author

Fixed the two Tier 2 link failures (Linux build, mac-arm64 link check) in 86b112b.

RED (run 46343763975): every standalone source fixture failed to link with undefined symbol: obs_source_private_settings_fields, referenced from obs_source_get_private_settings in liblibobs_rust.a. obs-source has more than 256 modules, so its release codegen-units = 256 merges small ones. Adding convert_render moved obs_source_get_private_settings into the same archive member as the push-to-enable signal helper, so the fixtures pulled it in with that member. Locally, nm -A target/release/liblibobs_rust.a showed both in cgu.247.

GREEN: raised [profile.release.package.obs-source] codegen-units to 1024. obs_source_get_private_settings now sits in its own member (only blog and its fields adapter undefined). In the linux-validate container, test_source_init_context_rust, test_async_conversion_plan_rust, test_transition_clock_steps_rust and test_source_convert_render all link, and they pass 1, 13, 20 and 5 cases. ci/test_cargo_release_profile.py passes.

@zackees zackees left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coordinator review: LGTM.

  • The port: the usual shape. A verbatim extraction, then RED, then GREEN, with the convert-render fields adapter in libobs.core-source, the registration test and a Test cost line. No existing C test or public header edited.
  • The link fix (86b112bd2): obs-source codegen-units 256 → 1024. It confirms the mechanism: with more modules than CGUs, rustc merges small ones, so a standalone fixture drags in an unrelated FFI module. 1024 is fine for now.
  • Heads-up: this pulls the other way from #5975, which drops the per-package CGU overrides and fails the same 28 *_steps_rust links. The durable fix is to make those fixtures independent of archive-member layout, by dead-stripping or link stubs. The CGU count only buys headroom until obs-source passes 1024 modules. Worth a follow-up issue.
  • Status: auto-merge on.

@rdoupe
rdoupe added this pull request to the merge queue Nov 30, 2026
Merged via the queue into master with commit db977a6 Nov 30, 2026
51 checks passed
@rdoupe
rdoupe deleted the port/5976-source-render branch November 30, 2026 04:11
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 source_render (the color-space conversion draw) to obs-source

2 participants