Skip to content

rust: Port libobs/graphics/graphics-planar-capability-queries.c.h to obs-graphics #5218

Closed

Description

@zackees

Phase 6 graphics Rust swap, targeting obs-graphics. Blocked by #5209 until the prerequisite merges. The C-only prerequisite implementation is PR #5217.

Replace the complete extracted libobs/graphics/graphics-planar-capability-queries.c.h with a safe Rust core plus thin ABI shims for gs_nv12_available and gs_p010_available. Public headers, signatures and behavior remain unchanged. The prerequisite C characterization is test/cmocka/test_graphics_planar_capability_queries.c, registered in its tests.d pointer and canonical test graph. Preserve that test unchanged.

Preserve missing-context diagnostics before any callback access, silent false for a missing optional callback, exact callback-returned booleans, current-context device identity, and independent NV12/P010 dispatch. Use fake devices only: actual host hardware support must never become a fixed expected value (#5182). Keep C-owned context/TLS and export-table layout behind real narrow private adapters, with NULL validation before projections.

Commit Tier 1 RED then GREEN in the existing Graphics / obs-tests-graphics category; mirror every frozen C assertion. Add original-C oracle Tier 3 differential cases over fake devices, optional callbacks and return combinations, and kill a mutation. Move the extracted C file into a sorted reference-only unity group with per-unit source/export/oracle metadata. Run unchanged C-reference/hybrid Tier 2 with equal public symbols, the whole native_build:: module, all six supported clippy/Dylint targets, and pre-queue Windows MSVC/Darwin links. Every real adapter that Rust references must be linked into EVERY standalone Rust-static consumer; build EVERY Linux *_rust cmocka target (#5190), with no aborting stubs. Tier 4 is inapplicable to this non-protocol unit.

Do not modify plugins/obs-websocket, public C headers or existing C tests. Coordinate the shared graphics unity group, test graph and obs-graphics registration lists, including held #5155. This issue is not claimable until #5209 is merged. No Rust work was done in the prerequisite.

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: Rust swap of gs_nv12_available and gs_p010_available.

    1. Commit Tier 1 RED against a safe-core stub, mirroring the frozen graphics: characterize and extract NV12/P010 capability queries (Refs #5209) #5217 fake-device characterization.
    2. Implement the Rust core and thin ABI shims using the existing graphics seam; add original-C Tier 3 differential coverage and a mutation check.
    3. Verify graphics/native tests, unchanged OFF/ON characterization, every Linux *_rust target and Windows/Darwin links, then publish under the pool backpressure policy.

    First PR expected after local GREEN validation in this worker session. Refs #5218; prerequisite #5217 is merged and #5209 is closed.

  3. zackees commented on Nov 19, 2026

    @zackees
    MemberAuthor

    Landed on master in #5227 (e6942ba): gs_nv12_available and gs_p010_available now run in safe Rust in obs-graphics.

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