gpu: record forced-wave pipeline creation at startup #1154
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1161"
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 roansystemlabs on 2026-11-24T02:04:48Z.
Change
Add a CRT-free startup fixture for forced-wave compute pipelines (Refs #870).
tests/wave_startup_exe.cppis built once per shader variant and adapter (/ENTRY:fixture_entry /NODEFAULTLIB). From its entry point it enables the debug layer when installed, creates a device on WARP or the first hardware adapter (XBOX2WINDOWS_ADAPTERfilters), readsD3D12_OPTIONS1.WaveLaneCountMin/Maxand callsCreateComputePipelineStateonce.tests/wave_startup.hlslcompiles ascs_6_6with no attribute,[WaveSize(4)]or[WaveSize(32)]; the attribute is the only difference.WaveGetLaneCount()from every invocation.XBOX2WINDOWS_DEBUG_LAYER=offrepeats the attempt without the layer.wave_startup_{0,4,32}_{warp,hardware}. No existing test changes.Verification
Windows 11 build 26200.9974, MSVC 19.44.35230, DXC from Windows SDK 10.0.26100,
devandrelease, three runs each with the debug layer and three withXBOX2WINDOWS_DEBUG_LAYER=off. Each run: 4 passed, 2 skipped (77), 0 failed. Results were identical across runs.[WaveSize(4)][WaveSize(32)]S_OK, readback 4S_OK, readback 40x80070057(E_INVALIDARG), skip 77S_OK, readback 320x80070057(E_INVALIDARG), skip 77S_OK, readback 32ID3D12Device::CreateComputeShader: Shader wants wave lane count of 32 but maximum wave lane count for device is 4. To check for support, check device caps via the CheckFeatureSupport() API(WARP), and the mirroredwants wave lane count of 4 but minimum wave lane count for device is 32(RTX 3070). Successful creation and dispatch store none.0x80070057.[WaveSize(4)]shader was refused on the RTX 3070 inside its 32..32 range. Both exited 1.1f172a06, same machine,devandrelease, three runs each:shader_wave_hardwarenative 32 andshader_wave32_hardwareforced 32 passed (sum_ones=32,sum_lanes=496, debug errors 0);shader_wave_warpnative 4 passed (sum_ones=4,sum_lanes=6);shader_wave32_warpand both wave64 tests skipped 77. #1132 skips on WARP from the reported range before creating the pipeline; this fixture makes the creation call and records its result.release: 4 passed, 2 skipped.docs_links_check.py,form_coverage_check.py,bidi_controls_check.py: passed.git diff --check origin/main...HEAD: clean.pe_map, AMD or Intel hardware, the app-local WARP or Agility SDK runtimes,[WaveSize(64)], full CTest.Evidence and follow-up
E_INVALIDARGand debug error 622, as a capability limit of its 4..4 range. The fixture uses a source-built shader, no translated code and no title data.docs/experiments.mdrecords the fixture, the table and the messages.Checklist
AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T02:15:38Z.
Review: COMMENTED
Reviewed at
2ae62ad27d59f18dfb5e143631dfd29727c8b403.tests/wave_startup_exe.cppandtests/wave_startup.hlslcleanly isolate a CRT-free (/ENTRY:fixture_entry /NODEFAULTLIB) startup probe per width (0,4,32) and adapter (warp,hardware). Turning off/RTC1, providing_RTC_InitBase/_RTC_Shutdown/memset, and keeping buffers static avoids CRT/stack-probe dependencies, andrun()checksD3D12_OPTIONS1(WaveOps,WaveLaneCountMin..Max) + SM 6.6, drainsID3D12InfoQueue, and exits 77 only when refused outside reported capabilities. (Minor: the early return onCreateRootSignaturefailure skips COMRelease()calls, thoughExitProcessfollows immediately.)python3 -B tests/docs_links_check.py(15 files, 254 links),python3 -B tests/bidi_controls_check.py(945 files),python3 -B tests/gpu_report_format_check.py(10 tests), andpython3 -B tests/xgameruntime_table_check.py— all passed.gh pr checks 1161currently shows all 4 Windows checks pending; Windows MSVC build, WARP, and hardware execution rely on CI.Imported from R0Y00/Xbox2Windows. Originally posted by ChazY11 on 2026-11-24T02:09:38Z.
Independent verification on three backends, including an Intel Xe2 adapter with an 8-wide minimum
Reviewed
2ae62ad2(your head, based onedee8d07; mergeable against currentmain). Independent reviewer, not theauthor; I did not touch the branch.
Environment: Windows 11 build 26300.9974, x64, Core Ultra 9 285H; MSVC 14.44.35207, Windows SDK 10.0.26100,
DXC 1.8.2502.11, CMake+Ninja, Python 3.12.10. Debug layer enabled by the fixture itself.
_0_hardware_4_hardware_32_hardware_0_4pass,_32skip_0_4pass,_32skip6 of 6 cases behave as pass or a named skip on both adapters, with no unexpected debug messages.
What the Arc reports, and why the skip is the right answer there
That is a clean capability skip: the fixture keeps the D3D12 message and the device capability that explains it,
rather than failing. On an adapter whose range is 8..32, a
[WaveSize(4)]pipeline cannot exist, and the test says soin one line. Worth keeping exactly as it is.
One observation that supports the design
This fixture prints the device range (
wave_lane_count_min/max) and the observed lane count separately, andits oracle does not assume a width. That is exactly the pairing I have been arguing for in #768: on this same adapter,
a non-forced module's reported lane count is not stable across processes (a probe of mine saw 16 on the first
dispatch of a freshly compiled module and 32 on later ones), while a
[WaveSize(32)]module here always reports 32.Having both numbers in the output is what makes that visible instead of mysterious, so if you ever extend this fixture
to repeat a dispatch, please keep both fields per dispatch.
Verdict
Verified, no objection. Skips are separated from passes as the repository asks, the
WaveSizeattribute is confirmedin the compiled DXIL, and the printed HRESULT and debug message make a rejected variant diagnosable without the
console. Happy to re-run on the same machine after a rebase.