Skip to content

obs-qsv11: Log the Linux adapter probe and replay it in a test - #1879

Merged
zackees merged 3 commits into
masterfrom
fix/1863-qsv-probe-replay
Oct 23, 2026
Merged

zackees merged 3 commits into
masterfrom
fix/1863-qsv-probe-replay

Conversation

@zackees

@zackees zackees commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Refs #1863 (part of #1866). This is step 1 of #1863; the AppImage keeps qsv off until the hardware run (see the claim comment for the findings and the plan).

What changes. obs-qsv11's Linux probe now collects what VA-API reports for each render node (qsv_probe_facts), logs it as one line, and decides from those facts in plugins/obs-qsv11/qsv-probe.c.h. That file has no VA-API, VPL or libobs, and gets its own unity group (BUILD.md) so a C test can build it alone:

info: QSV probe: node=/dev/dri/renderD128 opened=1 hevc=1 av1=0 driver=Intel iHD driver for Intel(R) Gen Graphics - 24.1.0 ()

obs_module_load() registers the codecs qsv_probe_codecs_from_adapters() returns. The decisions are the same as before: a node that didn't open, or one on the legacy i965 driver (same warning), is no adapter; any Intel driver is; AVC/HEVC/AV1 are the union over Intel adapters.

Why. We have no Intel GPU in CI. test_qsv_probe replays QSV probe: lines from a real log through the same decision. test/cmocka/fixtures/qsv-probe-hd530.h is provisional (written from the #1720 reporter's vainfo) until their hardware run on #1863 replaces it verbatim. After that, a change to what the probe reads or decides fails the test, which means the hardware run has to be repeated.

RED f907c0b: stubs; test_format_parse_round_trip fails ('' != 'node=/dev/dri/renderD129 …').
GREEN 140e024: all four cases pass (round trip, HD 530 → AVC+HEVC without AV1, i965/unopened/AMD rejected or not Intel, iGPU+Arc union).

CI cost. One cmocka executable with two small sources, no libobs, no VPL and no GPU; it runs in milliseconds inside the existing Tier 2 lane. No new lane. The plugin change gets the existing touched-plugin Linux build.

Local evidence. The host has no libva/VPL headers, and ./unittest's Tier 2 lane fails to link libobs.so.30 here for an unrelated reason, so I ran the cases through a scratch harness that includes the real test file and probe unity group (gcc -Wall -Wextra): RED fails as above and GREEN passes. The C++ probe change compiles only in CI here.

Tiers: no Rust and no C original for the probe file (Tier 1/3 don't apply); Tier 2 is test_qsv_probe.

qsv-probe.c.h holds the decision obs-qsv11 makes from what VA-API
reports for each render node, without VA-API, VPL or libobs, in its own
unity group. test_qsv_probe replays "QSV probe:" log lines (a
provisional HD 530 fixture) through it. The functions are stubs, so the
round trip and replay cases fail.

Refs #1863
check_adapter() collects what VA-API reports for each render node into
qsv_probe_facts, logs it as a "QSV probe:" line and lets
qsv_probe_adapter_from_facts() decide: not opened or the legacy i965
driver is no adapter, an Intel driver is. obs_module_load() registers
the codecs qsv_probe_codecs_from_adapters() returns. The decisions are
unchanged; test_qsv_probe now passes.

Refs #1863
@zackees
zackees marked this pull request as ready for review October 23, 2026 03:36
@zackees

zackees commented Oct 23, 2026

Copy link
Copy Markdown
Member Author

Coordinator: Fast Gate failed only on clang-format (test/cmocka/test_qsv_probe.c:55). I pushed a fixup: commit that reformats that file with clang-format 22.1.3 and changes nothing else.

@zackees

zackees commented Oct 23, 2026

Copy link
Copy Markdown
Member Author

CI evidence: Tier 2 ran test_qsv_probe (Passed, 0.00 s) and test_profile_activate. Fast Gate skipped the plugin build ("no Linux target obs-qsv11: skipped", its config has no QSV), so I compiled the plugin separately: in an ubuntu:24.04 container with libva-dev libvpl-dev libdrm-dev libsimde-dev, -fsyntax-only -Wall on all five obs-qsv11 Linux unity groups (linux+.hpp.cpp, core+.hpp.cpp, c+.h.c, linux-c+.h.c, probe+.h.c) exits 0.

@zackees
zackees added this pull request to the merge queue Oct 23, 2026
Merged via the queue into master with commit 8fd9ae3 Oct 23, 2026
31 checks passed
@zackees
zackees deleted the fix/1863-qsv-probe-replay branch October 23, 2026 04:16
zackees added a commit that referenced this pull request Oct 23, 2026
#1879)

#1879 added test_qsv_probe to test/cmocka/build/test-graph.json without
updating the partition count; the graph contract only runs when obs-build
changes, so master fails it (140 core targets, expected 139). RED on
origin/master 8fd9ae3 via ci/local_gate.py --test-diff.
zackees added a commit that referenced this pull request Oct 23, 2026
#1879)

#1879 added test_qsv_probe to test/cmocka/build/test-graph.json without
updating the partition count; the graph contract only runs when obs-build
changes, so master fails it (140 core targets, expected 139). RED on
origin/master 8fd9ae3 via ci/local_gate.py --test-diff.
zackees added a commit that referenced this pull request Oct 23, 2026
#1879 added test_qsv_probe to the core suite of test-graph.json without
raising the count in native_test_graph_replaces_legacy_utility_definitions,
so the test fails on master (left 140, right 139). Found while adding
test_source_profiler to the graphics suite here.

Refs #1879
chriscoveries pushed a commit to chriscoveries/obsrust-fork that referenced this pull request Oct 23, 2026
* ci: RED test/cmocka changes must run the obs-build graph contract (obs-rust#1891)

* ci: run obs-build tests when test/cmocka changes (obs-rust#1891)

The native test graph contract in obs-build counts test/cmocka targets, but
rust_scope selected nothing for test/cmocka/, so obs-rust#1879 and obs-rust#1883 merged
graph additions that left master failing the contract.
zackees added a commit that referenced this pull request Oct 23, 2026
#1879 added test_qsv_probe to the core suite of test-graph.json without
raising the count in native_test_graph_replaces_legacy_utility_definitions,
so the test fails on master (left 140, right 139). Found while adding
test_source_profiler to the graphics suite here.

Refs #1879
zackees added a commit that referenced this pull request Oct 23, 2026
…uite

master's test-graph.json now holds 141 core tests (#1879 and #1883 each
added one) while the assertion still says 139.

Refs #1879
chriscoveries pushed a commit to chriscoveries/obsrust-fork that referenced this pull request Oct 23, 2026
…rust#1883 (obs-rust#1896)

native_test_graph_replaces_legacy_utility_definitions expects 139 core
tests, but master has 141: obs-rust#1879 (test_qsv_probe) and obs-rust#1883 each added
one, and PR CI did not run this obs-build test for test/cmocka-only
changes (obs-rust#1891, fixed by obs-rust#1892). Master and every merge group running
the Fast Gate test-diff lane fail with left: 141, right: 139.
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