Skip to content

test: Extract and characterize graphics active shader queries before Rust swap #5244

Closed

Description

@zackees

C-only Phase 6 prerequisite for the active vertex/pixel shader queries, later targeting obs-graphics.

The exact public bodies are gs_get_vertex_shader and gs_get_pixel_shader in libobs/graphics/graphics.c.h:1029-1047. Move both verbatim into libobs/graphics/graphics-active-shader-queries.c.h in the sorted existing libobs/build/libobs.graphics+.h.c unity group, retaining existing TLS and gs_valid through same-group declarations. Follow #5217 and #5240. No Rust, public-header changes, existing-C-test edits or shader compiler changes.

Add a GPU-free C characterization through the established real-header graphics_subsystem / enter-context fixture and recording fake backend exports. Pin missing-thread-context NULL returns and exact debug messages, independent exactly-once vertex/pixel dispatch, exact device and returned shader pointer identities (including backend NULL), context leave/re-entry, and no shader mutation/ownership changes. No platform-dependent backend assumptions or invocation of missing mandatory callbacks. Add its tests.d pointer and sorted canonical test graph, with agreeing source/group/module inventories.

Acceptance: characterize original and extracted C against C-reference and hybrid libobs; commit extraction-contract RED then GREEN; run the complete native_build:: module, focused Linux Tier 2 for the new fixture plus EVERY *_rust target and symbol parity, ci/windows_link_check.py with a separate Darwin pass if Windows fails, explicit new-fixture cross-links, and ./lint once. Before publication force-fetch #5240 and check git merge-tree --write-tree --name-only; never publish a conflicting queued sibling.

This preserves behavior and has no network surface. A separate follow-up Rust swap will mirror frozen assertions in the Graphics category, add original-C differential/mutation coverage and real private adapters, and validate all standalone Rust-static consumers.

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: active vertex/pixel shader query characterization and behavior-neutral C extraction (pool slot obs-studio5, branch test/5244-graphics-active-shader-queries).

    1. Characterize original C with a GPU-free recording backend; commit RED for the missing extraction seam.
    2. Extract only gs_get_vertex_shader and gs_get_pixel_shader verbatim, retaining diagnostics/TLS; add the tests.d pointer and sorted graph/group registration with matching inventories.
    3. Run the whole native_build:: module, focused Linux Tier 2 plus EVERY *_rust target, Windows/Darwin links and one full lint; check queued sibling graphics: characterize and extract indexbuffer data/type queries (Refs #5235) #5240 using forced fetch and merge-tree before publishing.

    Expected first PR this session after GREEN validation, subject to backpressure. No Rust in this prerequisite; file the swap separately.

  3. zackees commented on Nov 19, 2026

    @zackees
    MemberAuthor

    Landed on master in #5247 (9135554): the active vertex/pixel shader queries are extracted and characterized. The Rust swap is #5248.

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