Skip to content

libobs: Extract the texture creation entry points before Rust port #4265

Closed

Description

@zackees

Extract gs_texture_create and gs_cubetexture_create from libobs/graphics/graphics.c.h:1299-1360 into a dedicated graphics unity member, verbatim, before their remaining C-side behavior is ported to obs-graphics (Phase 5).

Rust already implements gs_texture_mip_plan, but the exported creators still implement context validation, warning selection/dispatch, device dispatch and the cube render-target initial-data suppression in C. The Rust references found by git grep are callers and plan documentation, not definitions of these entry points.

Existing characterization: test/cmocka/test_texture_create_mip_data.c covers both entry points through exported libobs symbols, records warning and device arguments, and pins the 2D/cube data difference. Preserve this test unchanged. Validate the extraction with this existing test and build-group checks. No Rust, public-header, C-test or graph changes belong in this prerequisite.

Collision check: no open PR or issue covers either entry point; pushed port/42*, test/42* and texture-creation branches were checked. Generic conversion issue #2625 does not port these entry points. Deliver a branch only while the queue drains; the Rust replacement is a separate follow-up after extraction lands.

Activity

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

    @zackees
    MemberAuthor

    Claiming: extraction prerequisite in slot obs-studio5 (im-bo-gfx3), branch test/4265-texture-creators-extract. 1. Move gs_texture_create and gs_cubetexture_create verbatim into their own unity member. 2. Run the unchanged texture-creation characterization and build/lint checks. 3. Push the branch only, with no PR, for the manager to open when the queue drains. Expected deliverable this session; Rust replacement will be a separate follow-up issue after extraction lands.

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

    @zackees
    MemberAuthor

    Landed on master in #4356 (e6d304f); 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