Skip to content

w64_graphics, design: the wave32 VS run is the halves of the wave64 waves, not a repacking (TEST-1700) - #7505

Open
aslan2142 wants to merge 1 commit into
ItsNotRexed:mainfrom
aslan2142:test1700-rdna3-repacking
Open

aslan2142 wants to merge 1 commit into
ItsNotRexed:mainfrom
aslan2142:test1700-rdna3-repacking

Conversation

@aslan2142

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as TEST-1700: #7333 (comment) (found by sskver: #7231 (comment)).

Two places said the wave32 VS run is "a repacking, not the two halves of the 64-lane waves" and so "a stricter test": the w64_graphics.py docstring and the matching sentence in docs/design.md (Wave64 graphics: partition invariance). On RADV that is wrong on RDNA2 (sskver) and on RDNA3 (this PR). This PR changes both places to say what was measured, and on which devices.

What was measured

I ran vs_w64_c_lane_id on 960 vertices through vk_harness, as w64_graphics.py draws it. That is plain Vulkan, offscreen. For each vertex I read its lane id at the default wave size and with RADV_PERFTEST=gewave32.

Device wave64 waves (vertices) wave32 waves wave32 lane = wave64 lane & 31
gfx1036 iGPU (Raphael), RADV Mesa 26.3.1 64, 62, 64, 62 … (starts 0, 64, 126, 190 …) 32, 32, 32, 30 … (starts 0, 32, 64, 96, 126 …) 960 / 960
RX 7900 XTX (NAVI31, RDNA3), RADV Mesa 26.3.1 the same the same 960 / 960
llvmpipe (LLVM 23.1.5), Mesa 26.3.1 subgroup size 8; gewave32 has no effect — —
  • Both AMD GPUs pack the vertices the same way. The pattern repeats every 126 vertices in both runs.
  • Every wave32 wave is one half of a wave64 wave.
  • So the 32-lane run is the cut into halves that the tiers describe.
  • GFX12 is not measured. The text says so.

The change

  • runtime/test/shaders/w64_graphics.py docstring:
    • It now says the wave32 waves are the halves of the wave64 waves, and gives the measured numbers and devices.
    • It adds the trap sskver hit when writing a VS fixture. Waves start at vertices such as 126, which are not multiples of 4. So lane ^ 1 holds vertex v ^ 1, but lane ^ 2, ^ 3 or ^ 16 need not hold v ^ 2, v ^ 3 or v ^ 16.
  • docs/design.md: the same correction, in one sentence.

No code or fixture behaviour changes.

Checklist

  • w64_graphics.py: 29/29 ok on the gfx1036 iGPU and on the RX 7900 XTX (RADV Mesa 26.3.1, Linux), with all PS, VS and GS fixtures.
  • Lane probe on llvmpipe, then gfx1036, then RX 7900 XTX: results above.
  • python -m pytest tests/test_docs_*.py tests/test_w64_graphics_*.py tests/test_wave64_halves_fixtures.py: 51 passed, 3 failed. The 3 failures are the same ones that fail on main, over docs/dev-tools.md and docs/embedded_shaders.md, and this PR does not touch those files.
  • No game files used or quoted. The fixtures are the hand-written ones in the repository.

AI-assisted (Claude Code, Claude Opus 5.5).

…aves, not a repacking (TEST-1700)

vs_w64_c_lane_id over 960 vertices on RADV Mesa 26.3.1 gives the same
packing on a gfx1036 iGPU (Raphael) and an RX 7900 XTX (NAVI31, RDNA3):
waves of 64, 62, 64, 62 ... at wave64 and 32, 32, 32, 30 ... with
gewave32, a period of 126 vertices both ways, and every vertex's wave32
lane equal to its wave64 lane & 31. So the 32-lane run is the cut into
halves, not "a repacking ... a stricter test". Say what was measured,
on which devices, and note the lane ^ 2 trap for new VS fixtures.

Found by sskver. w64_graphics.py: 29/29 ok on both GPUs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nonverifiedperson

Copy link
Copy Markdown
Contributor

I added two drivers RADV doesn't cover. Main's translator builds vs_w64_c_lane_id, vs_ids and ps_w64_a_skip. I then drew vs_w64_c_lane_id with w64_graphics._draw_heap at the default size: 960 vertices, the same draw the test makes. On Windows 10 22H2 with Vulkan SDK 1.4.363:

Device max lane waves starts vertices per wave lane = v - wave start
gfx1036 iGPU (Raphael), AMD driver 32.0.13036.4 63 16 0, 64, 126, 190, 252, 316, 378 ... 64, 62, 64, 62 ... 960 / 960
RTX 5070 Ti, NVIDIA 621.35 29 32 0, 30, 60, 90 ... 30 each 960 / 960
  • AMD Windows driver: the wave64 waves match your RADV column: same starts, 126-vertex period, and the same "waves start at even vertices that aren't multiples of 4" caveat. The wave32 half of the table can't be checked here. The driver has no gewave32 equivalent, and requiredSubgroupSizeStages is COMPUTE only, so the wave64 column is the only one I could measure. The new text stays RADV-scoped, which matches this.
  • NVIDIA: packs 30 vertices into each 32-lane warp. That's another layout in which lane ^ 2 (and so on) need not hold v ^ 2, so the fixture caveat holds there as well.

Synthetic fixtures only, no game files. AI-assisted (Claude Code).

@hcristosm

Copy link
Copy Markdown

Tested 0f52e9fa1 on AMD RX 7600 XT (NAVI33, gfx1102, RDNA3), RADV Mesa 25.2.8, Linux Mint 22.3: pass, the same
layout on a second RDNA3 chip and an older Mesa.

vs_w64_c_lane_id, 960 vertices through vk_harness, default wave size and RADV_PERFTEST=gewave32, 2 of 2 runs:

  • wave64: 16 waves of 64, 62, 64, 62 ... vertices, starting at 0, 64, 126, 190, 252 ...; largest lane 63
  • wave32: 31 waves of 32, 32, 32, 30 ..., starting at 0, 32, 64, 96, 126, 158 ...; largest lane 31
  • wave32 lane == wave64 lane & 31 for 960 / 960 vertices, and every wave32 wave starts at a wave64 start or at its
    lane 32: the halves, not a repacking

Full w64_graphics.py run on the same device: 21 ok, 8 SKIP (the ps_w64_c_* fixtures: RADV cannot require both
fragment sizes here), no failures.

AI-assisted.

@caua-an

caua-an commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

@aslan2142, independent check of 0f52e9fa1 on Radeon RX 7600 (RADV NAVI33, non-XT), Zorin OS 18.1 / Linux 7.0.0-43-generic, Mesa 26.2.4+git2610011653.9a0169f2a72~n~mesarc0: pass.

I used the PR's w64_graphics._draw_heap with vs_w64_c_lane_id (960 vertices), running the default and RADV_PERFTEST=gewave32 draws twice, with LEONIDA_VK_DEVICE=NAVI33 and implicit Vulkan layers disabled:

Run Max VS lane ID Wave lengths (vertices) First wave starts
Default (wave64) 63 8 × 64, 7 × 62, 1 × 14 0, 64, 126, 190, 252, 316
gewave32 31 23 × 32, 7 × 30, 1 × 14 0, 32, 64, 96, 126, 158

In both repetitions, lane32 == (lane64 & 31) for 960/960 vertices. This confirms the same half-wave layout on this RADV configuration, not a Vulkan guarantee.

Full w64_graphics.py: 29/29 OK, no skips. All 30 synthetic modules (fixtures plus vs_ids) translated with LLVM MC 21 and passed spirv-val; vk_harness built from the PR tree with the project-pinned Vulkan headers. No game files. AI-assisted.

@javdc

javdc commented Nov 23, 2026

Copy link
Copy Markdown

Tested 0f52e9f on Steam Deck LCD (Jupiter), AMD Custom GPU 0405 "Van Gogh", RADV Mesa 26.2.0-devel (git-5c65d4fc31), Vulkan 1.4.350, SteamOS 3.9.5 (holo), kernel 7.2.7-valve2-2-neptune-72-g31504582a073: pass

  • python3 -I runtime/test/shaders/w64_graphics.py <work> /home/deck/opencode/Leonida/runtime/build — 29 passed, 0 failed

AI-assisted (OpenCode).

@adriaespii

Copy link
Copy Markdown
Contributor

Code review and test verification on AMD Radeon RX 9070 (RDNA4), AMD driver 26.10.1 (Vulkan 1.4.359), Windows 11 Pro 24H2, MSVC 19.44: pass.

Verification Summary

  • Clean rebase on latest \main\ (\7c0821659): PR commit \

@carlos-seiffert

Copy link
Copy Markdown

Tested 0f52e9f (merged onto main 976b3ec) on NVIDIA GeForce RTX 2060 (Turing), NVIDIA 621.24, Vulkan 1.4.357, Windows 11 (10.0.26300), subgroup size 32: pass (no regression; the case this PR changes is not reachable here)

What I ran: python -I scripts/run_gpu_tests.py with the Vulkan tools built from 976b3ec (llvm-mingw + Ninja, -DLEONIDA_BUILD_WINDOWS_RUNTIME=OFF, Vulkan-Headers 6802bb47), llvm-mc 23.1.6 and SPIRV-Tools from conda-forge.

main 976b3ec this PR on main
full GPU suite 192/241 passed, 48 skipped, 1 fail 192/241 passed, 48 skipped, 1 fail (same as main)

runtime/test/shaders/w64_graphics.py (after build.py), main 976b3ec: 17 ok, 12 SKIP. On NVIDIA the vertex and geometry subgroup size cannot be required, so only the default-size checks run and every tier C line is a SKIP; this does not compare a wave64 run with a wave32 one.

With this PR: unchanged (17 ok, 12 SKIP). The wave32 VS run this PR redefines only exists where the VS wave size can be switched (RADV with RADV_PERFTEST=gewave32), so this GPU cannot exercise it.

Overlap, for whoever merges: #7354 has the same title and touches w64_graphics.py too.

The one failure on both sides is ms_wave_info_s3, which fails on main on this GPU (10/10 runs) and is fixed by #7136 / #5741 / #5855; it is unrelated to this PR.

AI-assisted run (Claude Code); the numbers are from my machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants