Skip to content

libobs: Characterize and extract graphics task queue execution - #4410

Merged
zackees merged 3 commits into
masterfrom
test/4403-graphics-tasks-extract
Nov 9, 2026
Merged

zackees merged 3 commits into
masterfrom
test/4403-graphics-tasks-extract

Conversation

@zackees

@zackees zackees commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Refs #4403. Rust follow-up: #4408.

Characterize graphics queue execution through the public obs_queue_task(OBS_TASK_GRAPHICS, ...) API, then move execute_graphics_tasks verbatim from obs-video.c.h into obs-video-graphics-tasks.c.h. Register the extraction in sorted position in the existing core-output unity group. This is the C-only prerequisite required by the testing policy before the Rust port; it changes no behavior, signature or public header.

The real graphics-thread characterization stages queued work with events and checks FIFO order. A second case pins inline nested dispatch on the graphics thread, then asks a separate producer to append a child and waits for that enqueue before returning from the callback. The producer must acquire the queue mutex, so this fails if the drain holds the mutex during callbacks. The existing tail runs before the newly queued child. The test uses no sleeps and adds one temporary producer thread alongside libobs's normal threads.

The characterization commits precede the extraction commit. This prerequisite tests the current implementation rather than adding a Rust stub; the RED/GREEN Rust replacement belongs to #4408. Before extraction, the public test passed against hybrid libobs (0.34 s) and the C reference (0.18 s). The first local setup attempt failed to locate shader data; the test now runs beside the build's staged runtime data, matching the existing graphics tests.

Validation for the extracted head is recorded below. No existing C tests, public headers, workflows, test-graph.json or native.rs are modified. No native Windows/macOS run or full Tier 2 suite is claimed. Tier 1 and Tier 3 Rust replacement tests belong to the follow-up; Tier 4 does not apply to this internal queue.

Extracted-head validation passed: the new public test against hybrid libobs (0.64 s) and the C reference (0.26 s), identical dynamic export lists, soldr cargo fmt --all --check, the CMake Rust-static guard, git diff --check, and full SOLDR_PORCELAIN=0 ./lint (153.6 s). The diagnostic wrapper reported an unknown summary format with exit 0; the preserved raw artifacts show both ctest passes and lane lint: ok. The extraction body was compared byte-for-byte with its original body. ./push used its documented fallback because this installed soldr has no lint rust --attest; PR CI must run the selected validation without client attestation.

@zackees zackees changed the title libobs: Extract graphics task queue execution before Rust port libobs: Characterize and extract graphics task queue execution Nov 9, 2026
@zackees
zackees enabled auto-merge November 9, 2026 15:14
@zackees
zackees added this pull request to the merge queue Nov 9, 2026
@zackees
zackees removed this pull request from the merge queue due to a manual request Nov 9, 2026
@zackees
zackees force-pushed the test/4403-graphics-tasks-extract branch from 415f58e to 5c3ecc7 Compare November 9, 2026 20:18
@zackees
zackees merged commit 01abc12 into master Nov 9, 2026
7 of 9 checks passed
@zackees
zackees deleted the test/4403-graphics-tasks-extract branch November 9, 2026 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant