Repository navigation
obs-source: port source_render to Rust (Fixes #5976) - #5977
Conversation
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"}}
|
Coordinator: the two Tier 2 failures are links, not tests.
|
…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"}}
|
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 GREEN: raised |
zackees
left a comment
There was a problem hiding this comment.
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-sourcecodegen-units256 → 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_rustlinks. 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.
Fixes #5976.
This ports
source_render()toobs-source, in the shape of #5943 and #5974. It is the draw behindobs_source_default_render()andobs_source_main_render()(both Rust already), reached through its hidden wrapperobs_source_default_render_source_render(): the source's ownvideo_render, drawn straight or, when the source's colour space is in another class than the target's, throughcolor_space_texrenderand 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
libobs: extract source_render verbatim).source_render()and its wrapper move unchanged intolibobs/obs-source-convert-render.c.h(live grouplibobs.core-source). No cmocka case reached the conversion route, so the newtest_source_convert_rendercharacterizes 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 intocolor_space_texrenderat 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.Hosttrait and atodo!()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.obs-source::convert_render, the hidden export inobs-source::ffi::source_convert_render(rust-hidden.d; noEXPORT), one-access adapters inlibobs/obs-source-convert-render-fields.c.h, the original moved to the reference-only grouplibobs.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 repointcontext.dataandcolor_space_texrenderand swapinfo.video_rendermid-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_texrenderis 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; mutantsDestroyCached,BeginCached,EndCached);context.dataafter 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.handobs-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.mdrow added; no user-visible change, so nodocs/features.mdline. No public header, C test or obs-websocket change.Evidence
RED, at the RED commit:
GREEN, at the head:
Tier 2, linux-validate build volume (
xvfb-run -a, runtime directory), both libraries:test_source_convert_render(new)test_source_video_render_drawstest_source_default_rendertest_source_video_rendertest_filter_color_spacetest_color_correction_16ftest_scene_color_spacetest_texture_renderThe 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_texrenderon 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.pylinks every test binary../lintpasses.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