Skip to content

rust: Port graphics/texture-creators.c to obs-graphics #4267

Closed

Description

@zackees

Phase 5 follow-up to extraction prerequisite #4265: port libobs/graphics/texture-creators.c.h (gs_texture_create and gs_cubetexture_create) to obs-graphics after that extraction lands.

The mipmap plan is already Rust. Remaining real C behavior is context validation, warning dispatch, backend invocation, and dropping initial data for cube render targets whose mipmaps were disabled (2D keeps its data). Preserve warning ordering and the non-power-of-two precedence. Preserve the libobs C ABI and existing backend exports.

Test plan: port the assertions in unchanged test/cmocka/test_texture_create_mip_data.c into the existing graphics Rust category binary against stubs (RED), implement (GREEN), add C-oracle differential coverage, then run this same existing C test against hybrid libobs and the C reference. Test no-context returns too. No new Rust test executable and no public-header or existing C-test edits. Tier 4 does not apply to these local graphics entry points.

Blocked on #4265 landing; do not combine the behavior-neutral extraction with the Rust swap. The prerequisite branch is test/4265-texture-creators-extract, delivered without a PR to avoid adding CI load.

Activity

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

    @zackees
    MemberAuthor

    Claiming: graphics texture creators Rust swap in slot obs-studio5, branch port/4267-texture-creators, stacked on test/4265-texture-creators-extract at 902f66f.

    1. Verify direct C characterization, adding it first if needed.
    2. Commit Rust category tests against stubs (RED), then the safe core, ABI bridge and C-oracle parity (GREEN).
    3. Run focused tiers and lint, push branch only, and report the exact own commit range. No PR will be opened until the queue drains.
  3. added
    ready
    on Nov 9, 2026
  4. moved this from In progress to Ready in obs-rust Multiviewon Nov 11, 2026
  5. zackees commented on Nov 18, 2026

    @zackees
    MemberAuthor

    Landed on master in #4585 (ad0094f); verified the merge is an ancestor of origin/master and rust/obs-graphics/src/ffi/texture_creators.rs 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