Skip to content

obs-graphics: Port effect name and index lookups - #1843

Merged
zackees merged 2 commits into
obs-rust:masterfrom
nathan-v:port/effect-lookups
Oct 23, 2026
Merged

zackees merged 2 commits into
obs-rust:masterfrom
nathan-v:port/effect-lookups

Conversation

@nathan-v

@nathan-v nathan-v commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #1822

What and why

The 13 effect name and index lookups from graphics/effect-lookups.c.h now live in obs-graphics. Param index uses >= and is null at the count. Annotation index and pass index use >, so an index equal to the count is one past the array. That return is characterized, not endorsed. No intentional difference from the C.

A temporary change of that > to >= made lookups_match_oracle fail: Rust returned null and the oracle returned the one-past pointer. It was reverted before this commit.

RED → GREEN

  • RED commit: 36f084e5a73cbe374b34579a115274bf61c44322. The five effect_lookups tests panicked in todo!() (not yet implemented). Fast Gate on the first draft head 056a97b41 failed on those five. Tier 2 on that head passed because the C file was still in the old group. The branch was rebased onto 582a4c3ed before GREEN, so the RED sha changed.
  • GREEN: 35d6a4c7e19e473b851b6c41f98574be52a52582. The eight effect_lookups tests passed inside the workspace rust-test lane. Workspace clippy -D warnings and dylint passed. In the arm64 obs-rust-linux-validate image, test_effect_lookups passed 5/5 against libobs-c-reference and 5/5 against hybrid libobs. The two libobs.so files export the same 1766 symbols, including these 13. Hybrid libobs compiles libobs.graphics+.h.c and does not compile libobs.ported-graphics+.h.c. The C reference compiles the ported group, which includes effect-lookups.c.h.
  • Real app: not applicable. No UI, protocol, or logging change.

The full local gate was not stamped. On this Mac, soldr refuses the Windows GNU target, the cross lane's host cc has no windows.h, several ci/ unit tests fail in host probes, and the Docker mount case-folds Obs.h onto obs.h so test_ws_screenshot_srgb does not compile. libobs, libobs-c-reference, and test_effect_lookups did build. PR CI runs the Linux suite.

Checklist

  • Base is master
  • I claimed the issue, or no one else has an open PR for it
  • Characterization test (if the unit had none), then RED, then GREEN commits. Characterization is libobs: Characterize effect name and index lookups #1823, merged as e7a272ffd. RED 36f084e5a, GREEN 35d6a4c7e.
  • User-visible change: its line in docs/features.md is added or updated (not applicable: no user-visible change)
  • (Optional) Local gate passed and the pushed head is stamped; otherwise PR CI runs the full suite
  • Warning or flag changes (-W..., ratchets): none
  • Intentional differences from C listed in the parity test header and rust/README.md (ports). None. The one-past index is characterized, not endorsed.

The five cmocka cases call the obs-graphics safe core. Each one
panics in todo!() because the lookups are not implemented yet.

soldr cargo test -p obs-graphics --test obs-tests-graphics
effect_lookups: 0 passed, 5 failed (not yet implemented).

Refs obs-rust#1822
Implement the 13 graphics.h lookups in obs-graphics. Param index
uses >= and is null at the count. Annotation index and pass index
use >, so an index equal to the count is one past the array.
That return is characterized, not endorsed.

The C file moves into the ported graphics group. Hybrid libobs
exports the Rust symbols. Tier 1, layout, and the C oracle agree.

Fixes obs-rust#1822
@nathan-v
nathan-v force-pushed the port/effect-lookups branch from 056a97b to 35d6a4c Compare October 22, 2026 23:47
@nathan-v
nathan-v marked this pull request as ready for review October 23, 2026 00:09
@nathan-v
nathan-v requested a review from zackees as a code owner October 23, 2026 00:09
@zackees
zackees added this pull request to the merge queue Oct 23, 2026
Merged via the queue into obs-rust:master with commit 7fa89ba Oct 23, 2026
32 checks passed
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 graphics/effect-lookups.c to obs-graphics

2 participants