shader-compiler: native [WaveSize(64)] compute pipelines are refused on wave32-only GPUs, with no recorded reason #151
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/brcly--TuxBox#151
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@postblink on GitHub · 2026-11-25 08:28 UTC · original
Summary
When a translated compute program needs a ballot, a vote or a 64-lane reduction, and the portable single-wave path doesn't apply, the emitter requires a native 64-lane wave:
tools/shader-compiler/src/hlsl.rs:1583setsrequired_wave_sizeto 64 forrequires_ballotor a vote.hlsl.rs:1629-1639lets the portable path drop that requirement only for[64,1,1](or straight DPP8) groups with!requires_ballot, plus about 25 other exclusions.hlsl.rs:9205emits[WaveSize(64)].Every current NVIDIA GPU reports a wave range of
[32, 32]. On those GPUs vkd3d-proton refuses these pipelines after DXIL compilation, loggingRequired WaveSize range [64, 64], but supported range is [32, 32]and returningE_INVALIDARG. vkd3d-proton allows only the opposite case, wave32 on a wave64 host (libs/vkd3d/device.c:10876-10891at2576c0b4).Neither the prep nor the runtime compares a translation's required wave size with the host's
WaveLaneCountMin/Max: there is noOPTIONS1query inruntime/orproject_tuxbox/. So the translation is cached as a success, no.reasonis written, andtools/rank_pipeline_failures.pyfiles the failure under "driver or runtime rejected it", alongside unrelated refusals.In two ProjectScarlett runs on an RTX 5080, one at
97b8ad3and one at0a8d2ee, vkd3d-proton logged that message for 37 compute pipelines each time. Run 5's runtime cache held 82 translations that requireWaveSize=64. All of them useWaveReadLaneAtandWaveGetLaneIndex, and 48 useWaveActiveBallot. Their group sizes range from(4,4,4)to(1024,1,1). These are aggregate counts only.Synthetic repro
This needs no game data. It uses the existing independent compute guest (
tools/reference/independent-shaders/compute.cpp) with stock Proton Experimental's vkd3d-proton, and runs two shaders in order:native6410de:2c02, NVIDIA 620.73.04CreateComputePipelineStatereturns0x800700571002:13c0, RADV Mesa 26.3.164 | 64<<8 | lane<<16Vulkan reports the same ranges:
minSubgroupSize/maxSubgroupSizeis 32/32 on the RTX 5080 and 32/64 on RADV.hlsl/wave_sum.rs:932-935already builds a translated program of this class: the[128,1,1]variant assertsrequired_wave_size == Some(64)and[WaveSize(64)]in the HLSL.Possible directions
D3D12_FEATURE_D3D12_OPTIONS1once per device. When a translation requires a wave size outside[WaveLaneCountMin, WaveLaneCountMax], skip the driver compile and record a reason such ashost lacks wave64, so the rank tool counts these on their own. This would also save a pointless driver compile per pipeline.I'm happy to send (1) as a PR with a synthetic test, if that direction suits you.
Environment
CachyOS (kernel 7.3.6), RTX 5080 (NVIDIA 620.73.04), Radeon 610M (RADV, Mesa 26.3.1), Proton Experimental 11.0-20261112, TuxBox
0a8d2ee.Prepared with an AI agent (Claude); the GPU results above were run and checked on the hardware listed.
@NathansDomainSolutions on GitHub · 2026-11-25 08:30 UTC · original
Dude I finna fix this I got claude aimed at this Bitch like the deathstar aha
@tsunderejay on GitHub · 2026-11-25 21:15 UTC · original
Current RTX 3050 boot log confirms this is active: 64 distinct log-capped
host lacks wave64refusals and 65 distinct entries in the pipeline-failure TSV. CPU-only retranslation shows all 65 emit [WaveSize(64)]: 29 wave64 DPP reductions, 38 tb_count_lanes elections, 2 both. PR #197 does not reduce these because it excludes tb_count_lanes and leaves Some(64) unchanged.