Repository navigation
obs-graphics: Port the shader-parser name lookups - #844
Merged
Merged
Conversation
zackees
marked this pull request as ready for review
October 15, 2026 21:10
…bs (RED) get_shader_param_type, get_sample_filter and get_address_mode shims over todo!() cores. - Tier 1 (tests/shader_param_names.rs): 1:1 port of test_shader_param_names. - Tier 3 (tests/shader_param_names_parity.rs): every known name in its own, lower and upper case and with trailing noise, random names and bytes, against shader-param-names.c compiled as oracle_* with the C dstr.c. - ENABLE_RUST_LIBOBS=ON drops graphics/shader-param-names.c. Refs #839
Exact byte matches for strcmp, ASCII case-insensitive whole-string matches for astrcmpi, and a "texture" prefix test for astrcmp_n, in the C's order with its fallbacks (unknown type, linear filter, clamp). Refs #839
The oracle's C dstr.c needs bmem, which the windows-gnu link only finds when the test references obs-util. Refs #839
zackees
force-pushed
the
port/shader-param-names-rust
branch
from
October 15, 2026 21:15
0aee745 to
afbcdd5
Compare
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #839 (step 3).
RED (
obs-graphics: Test the shader-parser name lookups against todo!() stubs):get_shader_param_type,get_sample_filter,get_address_modeshims inobs-graphicsovertodo!()cores. Tier 1 aborts ontodo!("shader param names port (#839)").tests/shader_param_names.rs: 1:1 port oftest_shader_param_names(test: Characterize the shader-parser name lookups before port #843).ENABLE_RUST_LIBOBS=ONdropsgraphics/shader-param-names.c; exports inrust-exports.d/obs-graphics-shader_param_names.txt.tests/shader_param_names_parity.rs: every name either side knows, in its own, lower and upper case and with a trailing space or letter, plus random names and random bytes (1–255), against the original compiled asoracle_*with the Cdstr.c(astrcmpi,astrcmp_n).GREEN (
obs-graphics: Port the shader-parser name lookups): exact byte matches forstrcmp, ASCII case-insensitive whole-string matches forastrcmpi, and atextureprefix test forastrcmp_n, in the C's order with its fallbacks. A follow-up commit linksobs-utilinto the parity test, since the oracle's Cdstr.cneeds bmem on the windows-gnu link (RED's CI shows that link failure).Intentional difference: a null name gives the fallback (
UNKNOWN,LINEAR) where C callsstrcmp(NULL).get_address_mode(NULL)isCLAMPin both (C'sastrcmpireads NULL as""), and parity checks it.Local:
ci/local_gate.py --lane rust-testok (includes the Windows cross build).MIN_MAG_MIP_POINTcase-insensitively failsknown_names_in_every_case.rust/tools/linux-validate/run.sh: 249/249 OFF and ON,test_shader_param_namesrepeated../lintok.