Skip to content

test: Extract and characterize graphics NV12/P010 capability queries before Rust swap #5209

Closed

Description

@zackees

C-only prerequisite for the Phase 6 graphics capability queries, later targeting obs-graphics.

The public gs_nv12_available and gs_p010_available bodies remain in libobs/graphics/graphics.c.h:1320-1340. Extract only these bodies verbatim into libobs/graphics/graphics-planar-capability-queries.c.h, in the sorted existing libobs/build/libobs.graphics+.h.c unity group. Preserve the private TLS/context validation dependencies through same-group declarations as in #5184. No Rust, public-header changes or existing-C-test edits belong in this prerequisite.

Add a GPU-free C characterization using the established real-header graphics_subsystem / enter-context fixture and recording fake device. Cover missing context with exact diagnostics, missing optional callbacks returning false silently, false and true callback results, exact device routing, and independent per-query dispatch. Never assume actual host NV12/P010 support. Leave test_encoder_tex_active_null.c unchanged. Register the fixture through its tests.d pointer and sorted canonical test graph; source/group/module inventories must agree.

Acceptance: original and extracted C-reference/hybrid characterization, committed extraction-contract RED then GREEN, complete native_build:: module, focused Linux Tier 2 build of the fixture plus EVERY *_rust target, equal dynamic symbols, Windows MSVC and Darwin pre-queue links through ci/windows_link_check.py, and one full ./lint. Refresh shared G/graphics.c.h/test-graph PR conflicts with forced fetches and merge-tree before publication. This behavior-neutral extraction has no user-visible feature change or network protocol behavior.

The subsequent Rust swap is a separate issue after this prerequisite: mirror these frozen assertions in the existing Graphics category, original-C oracle/differential/mutation tests, unchanged dual-library Tier 2, and real adapter support for every standalone Rust-static consumer.

Activity

  1. added
    portPort a C unit to Rust (four-tier policy)
    readyMeets the definition of Ready; claimable
    P2Normal priority
    on Nov 19, 2026
  2. zackees commented on Nov 19, 2026

    @zackees
    MemberAuthor

    Claiming: graphics NV12/P010 capability-query characterization and behavior-neutral C extraction (pool slot obs-studio6, branch test/5209-graphics-planar-capabilities).

    1. Characterize original C with a GPU-free recording fake device; commit RED for the missing extraction seam.
    2. Move both bodies verbatim into the sorted graphics unity group with matching inventories and test graph.
    3. Run the entire native_build:: module, dual-library focused Linux Tier 2 plus EVERY *_rust target, Windows MSVC/Darwin links and one full lint; refresh overlapping PR conflicts before publishing.

    Expected first PR this session after GREEN validation, subject to backpressure. No Rust in this unit; the swap will have a separate follow-up issue.

  3. zackees commented on Nov 19, 2026

    @zackees
    MemberAuthor

    Landed on master in #5217 (c037c2b): gs_nv12_available and gs_p010_available are characterized against a fake device and extracted. The Rust swap is #5218.

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

Metadata

Metadata

Assignees

Labels

P2Normal priorityportPort a C unit to Rust (four-tier policy)readyMeets the definition of Ready; claimablesize:SHours

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions