Native wave64 compute shaders declare WaveSize(64) where the host runs 64 lanes #204
No reviewers
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/Belobug--VIctory-Belobug-AMD!204
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-204"
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?
@TobiasFornell on GitHub · 2026-11-25 21:55 UTC · original
TobiasFornell:wave64-native-compute→main· +88 −14 · 5 files · 1 commits · openlower.rsgives a compute shader a wave size only with console lanes or a one-wave LDS shader. The other native-wave64 compute shaders reach the driver withoutWaveSize, and RDNA drivers (RADV here) run them as wave32. With this change they declareWaveSize(64)when the host runs 64 lanes.VICTORY_FORCE_WAVE64=0turns it off; the switch is part of the shader cache key. Diagnostics builds count the compute shaders that declare 64 lanes.Measured on Linux only (CachyOS, RX 9070 XT, RADV through vkd3d-proton, Proton Experimental), on a Belobug-based tree: 495 compute shaders declare 64 lanes, 319 of them through this change, and no pipeline was refused. The GPU time was not measured (the CPU side dominates the frame there), so this is not shown to be faster; it gives the shaders the lane count they were written for. Not run on Windows.
The branch is one commit on current
main; it builds, and clippy finds nothing new in the changed lines.@MamaLeVrai on GitHub · 2026-11-26 00:05 UTC · original
Result on Windows and RDNA2, which the description does not cover: an RX 6950 XT, Windows 11 build 26300, Rust 1.98.1. This PR (
bb789c5) merged onmain4f62c2a,cargo test --release -p victory-shader --lib, one run each:main: 275 passed, 2 failed:emit::valu_tests::scalar_counted_in_a_divergent_loop_read_after_itandscalar_counted_in_nested_divergent_loops. These are the wave-size failures of #2; they fail on every run here.victory-gpuandvictory-hletests are the same as onmain. For the maintainers: this PR and #144 both changecrates/victory-shader/src/emit/mod.rs, and the merge has a conflict there. #110 fixes the same two tests here (278 passed) and merges with #144 cleanly. Not run in the game.harness machine: rx6950xt-w11 | AMD Radeon RX 6950 XT (RDNA2), driver 32.0.21045.29003 | 32 GB RAM | Windows 11 build 26300
AI-assisted (Claude Code); no game data.
@adrianmjim on GitHub · 2026-11-26 19:49 UTC · original
Tested on Windows 11 (26300) with an RX 7900 XT (RDNA3, driver 32.0.32029.2010). Head
bb789c5, base4f62c2a. I ran the whole title shaders.rpf throughvictory translate --validate --listand compared per-program DXIL hashes against4f62c2a.Host lanes 32-64 (RDNA):
WaveSize(64). Indxc -dumpbinthat is the only difference in all 747. Each one is 8 to 28 bytes bigger.4f62c2a. Every emitted program validates.--pipelines, the RX 7900 XT creates all 2682 compute pipelines on both base and PR. Nothing is refused.VICTORY_FORCE_WAVE64=0, the output is identical to4f62c2a.Other host lane ranges:
4f62c2a.Tests:
cargo test -p victory-shader --lib -- --test-threads=1: 277 passed, 0 failed, 6 ignored.4f62c2agives the same counts.emit/mod.rspart (helpers and test) to4f62c2awithout thelower.rschange.programs_reading_no_other_lanes_translate_for_any_wave_sizethen fails on theSome(64)assertion. With thelower.rschange it passes.One small thing: the counters in
pipeline.rsand the log line inqueue.rsare only behindcfg(windows), not thediagnosticsfeature. So every Windows build counts them, not only diagnostics builds as the description says. The line is also logged only once, at frame 256, so compute shaders translated after that are not in the number.Not tested: GPU time or an in-game run on Windows. I also did not check which wave size the Windows driver picks for compute shaders without
WaveSize.@WellyngtonSantos on GitHub · 2026-11-26 19:54 UTC · original
A data point from a host that runs 64-lane waves only: RX 580 (Polaris / GCN4), AMD legacy driver 31.0.21925.1001 (waves of 64 to 64), Windows 11, Rust 1.98.1, cross-compiled
victory-shadertests,--test-threads=1.4f62c2a(main)bb789c5The list of failing tests is identical: no regression, and nothing fixed on this card either. For whoever looks at main on such hosts, the 11 are:
memory_tests, withcreate memory PSO: "Parâmetro incorreto."(E_INVALIDARG);image_tests::texel_offsets_and_levels_sample_the_texels_they_name, E_INVALIDARG at the PSO;lane_read_loop_tests::lane_reads_in_a_loop_lanes_leave_at_different_iterations, withUnsupported { what: "a console wave size the host does not run" }.None of them fail on the default branch
rx9070xt(cd8dfc0) on the same card, where the whole suite is 302/0 with #290. So they look already handled there.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.