Skip to content

test: Extract graphics effect-file creation before its Rust port #4307

Closed

Description

@zackees

Phase 6 prerequisite: extract find_cached_effect and gs_effect_create_from_file from libobs/graphics/graphics.c.h:814-849 verbatim into their own libobs/graphics/graphics_effect_file.c.h, registered after graphics.c.h in the existing graphics unity group. Preserve private context and validation helpers, cache path traversal, cache hit before file read, failure logging, constructor forwarding and file-buffer ownership. Existing test/cmocka/test_effect_destroy.c already characterizes successful file creation and cached pointer reuse; keep it unchanged and run it against hybrid and reference libobs.

Testing-policy “Extracting a function before porting it” requires a separate behavior-neutral prerequisite before the Rust swap. No Rust, public header, existing C test, shader creator or effect-destroy changes. The sibling #4304/#4306 shader extraction explicitly excludes this group. Exact-symbol Rust, open PR/issue, and pushed port/42*/test/42* collision checks found no implementation covering these functions.

Deliver branch-only while CI is backlogged. Follow up with a separate Rust port issue after this extraction. Validate unchanged Tier 2 effect tests and build-group/lint checks. Tier 4 does not apply to local file wrappers.

Activity

  1. added
    enhancement
    port
    ready
    P2
    size:S
    on Nov 9, 2026
  2. zackees commented on Nov 9, 2026

    @zackees
    MemberAuthor

    Claiming: effect-file extraction in slot obs-studio13, branch test/4307-effect-file-extract. 1. Preserve existing C characterization tests and move only find_cached_effect/gs_effect_create_from_file verbatim into their own graphics_effect_file.c.h. 2. Run focused unchanged Tier 2 tests and lint. 3. Push branch-only this session for the manager; no PR while the queue drains. File the Rust swap as a separate follow-up. Shader creators and effect destruction stay untouched.

  3. moved this from In progress to Ready in obs-rust Multiviewon Nov 11, 2026
  4. zackees commented on Nov 18, 2026

    @zackees
    MemberAuthor

    Landed on master in #4343 (e5c9469); verified the merge is an ancestor of origin/master and libobs/graphics/graphics.c.h exists there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2enhancementportreadysize:S

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions