tests: select the hardware adapter for indirect Dispatch readbacks #2644
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2652"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-26T00:34:05Z.
Change
On a dual-GPU machine, setting
XBOX2WINDOWS_ADAPTER=Intelstill ran the indirect Dispatch fixture on the first D3D12 device, my RTX 4060. This made it easy to report the same card twice when gathering the GPU-written count requested in #2626.The hardware fixture now matches a case-insensitive substring of the DXGI description using the stream tests' existing rule. Without a filter it enumerates devices in its original order. WARP uses its explicit software adapter. A selector longer than 127 characters or one that matches no eligible hardware exits 4 with a diagnostic. The indirect fixture and stream rasterizer exercise these failures through the same Python check. The count readback documented under
startup_indirect_count_hardwarecan now be repeated per adapter.Verification
Windows 11 build 26100.9711, fixture sources at
04b454c8. I built both changed C++ entry points locally with Zig 0.13.0 (C++17, x86_64-windows-gnu, -O2) and linked the existing Windows runtime DLL built at2e029857. The D3D12 debug layer was unavailable. All three modes ofstartup_indirect_dispatch <backend> [constants|count]passed on each backend. All outputs below are fenced GPU readbacks.gEfOrCeuHd GrApHiCs 770The default hardware run selected the RTX. With the old executable, the new failure check caught the first overlong selector returning 0. Both candidate executables reject overlong and unmatched selectors with exit 4. A 127-character unmatched name reaches the no-match diagnostic. I read the WARP count results in a terminal because its redirected stdout was empty on this local build.
The rasterizer's eight cull/winding images matched on both physical adapters and WARP. Fractional bias and both mixed rasterizer orders stayed clear.
Evidence and follow-up
The shaders and expected values come from the project's existing synthetic fixtures. The reported RX 5700 XT result still needs a second RDNA 1 comparison. Standalone mixed-record and split-call measurements
Refs #2626.
AI-assisted contribution using Codex (GPT-6.2 Astra, xhigh).
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T00:36:52Z.
Review: COMMENTED
Review of head
04b454c8(test-only change: fixtures and CTest, no runtime code).What I checked
XBOX2WINDOWS_ADAPTERthrough the new sharedAdapterNameFilter, with the same rule the stream setup used (case-insensitive substring, 127-char limit, exit 4 with a diagnostic, exit 77 only when no filter is set and no hardware exists). Default enumeration order and the WARP path are unchanged.startup_stream_setup.cppandstartup_stream_rasterizer_check.pywere moved onto the shared helper with identical behavior (no duplicated logic left behind).startup_indirect_dispatch_adapter_filterreuses the same Python check asstartup_stream_adapter_filter, so both fixtures guard the same two failures (overlong and unmatched selector). It needs no hardware, so it runs on WARP-only machines.Commands run
python3 tests/docs_links_check.py: okpython3 tests/bidi_controls_check.py: okgit diff --check origin/main...HEAD: cleanNot verified
No blocking findings.
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T00:36:53Z.
Win2025 WARP receipt for head
04b454c8.Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
04b454c804ff0296197af4adf06b23a7b11fdab0:--preset dev):cmake --build --preset dev --target cpu_placed_provider startup_draw_depth_target startup_indirect_dispatch startup_slot57_depth startup_stream_consumer startup_stream_depth startup_stream_rasterizer startup_stream_setup_obj -- -j 2):6.26s(configure2.86s)ctest --preset dev -R 'adapter_filter|startup_indirect_count_warp|startup_stream_draw_warp' --parallel 2 --no-tests=error --output-on-failure): 4/4 passed (3.57s:startup_stream_adapter_filter0.22s,startup_indirect_count_warp0.15s,startup_indirect_dispatch_adapter_filter0.19s,startup_stream_draw_warp3.37s)/O2(--preset release):cmake --build --preset release --target cpu_placed_provider startup_draw_depth_target startup_indirect_dispatch startup_slot57_depth startup_stream_consumer startup_stream_depth startup_stream_rasterizer startup_stream_setup_obj -- -j 2):10.24s(configure3.40s)ctest --preset release -R 'adapter_filter|startup_indirect_count_warp|startup_stream_draw_warp' --parallel 2 --no-tests=error --output-on-failure): 4/4 passed (3.55s:startup_indirect_count_warp0.17s,startup_stream_adapter_filter0.24s,startup_indirect_dispatch_adapter_filter0.16s,startup_stream_draw_warp3.33s)sccache: 16/30 hits; wall33.6sAI-assisted; commands listed were executed locally.