Repository navigation
libobs: Characterize effect name and index lookups - #1823
Merged
Merged
Conversation
Pin the current walks in effect.c.h: first-match names, null inputs, and the index checks. A param index uses >=. An annotation or pass index uses >, so an index equal to the count returns one past the array. Refs obs-rust#1822.
The walks leave effect.c.h with the same behavior. They stay in the graphics unity group. The device loop, passes, and setters stay in effect.c.h. Refs obs-rust#1822.
nathan-v
marked this pull request as ready for review
October 22, 2026 21:09
This was referenced Oct 22, 2026
6 of 7 tasks
10 tasks done
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 #1822
What and why
The effect name and index lookups lived in
effect.c.hnext to the device loop and the setters. This moves them verbatim intolibobs/graphics/effect-lookups.c.h, in the same graphics unity group, and addstest_effect_lookups. No behavior change, no public header change, no Rust. The port toobs-graphicsis the next PR.The test links libobs and fills a
gs_effectby hand. It does not start a GPU. It pins first-match names (case sensitive, the empty string, duplicates), null inputs, the stored current technique, view-proj and world, andgs_effect_get_param_info.A param index uses
>=, so an index equal to the count is NULL. An annotation index and a pass index use>, so an index equal to the count returns one past the array. That return is characterized, not endorsed. The test compares the pointer and does not dereference it.RED → GREEN
79fed0db99e88bbbc8319540bcf7454a315c2e70adds the test, and it passed 5/5 while the functions were still ineffect.c.h.5e355d4549e1328bcc43f91c801d43683eae1501moves the functions. The same five tests passed against the moved file:null_and_empty_test,name_lookups_test,index_bounds_test,stored_pointers_test,param_info_test.The Rust RED and GREEN are the follow-up on #1822.
Checklist
masterdocs/features.md_SPACE/_ALPHAagainst the macOS libc++ headers) and intest_tier2_run(/varvs/private/var). clang-format 22.1.3 and gersemi 0.25.0 passed on the changed files. The Docker daemon was not running, so Linux Tier 2 did not run here. PR CI runs it.Local macOS arm64,
build_rust_OFF(Rust off):test_effect_lookups5/5 before the move and 5/5 after. Homebrew cmocka would not load in the Xcode-signed binary (Team ID); the run used a copied dylib andDYLD_FRAMEWORK_PATH.