Skip to content

xshader: avoid redundant reads in paired Wave64 local exchanges - #234

Draft
Valdi320 wants to merge 1 commit into
brcly:mainfrom
Valdi320:work/paired-wave64-local-exchange-20261126
Draft

Valdi320 wants to merge 1 commit into
brcly:mainfrom
Valdi320:work/paired-wave64-local-exchange-20261126

Conversation

@Valdi320

Copy link
Copy Markdown
Contributor

Change

DPP8, DPP16 row/quad controls, permlane16 and DS swizzle never select across a 32-lane half in paired Wave64. Read that half's VGPR directly and test the corresponding EXEC word. Out-of-row shift reads are wrapped within the row and discarded by the existing validity/write masks. Cross-half lane reads are unchanged.

Measurements

Identical synthetic dependent exchange programs, 3 runs with production DXC flags, median:

Exchanges HLSL bytes DXIL bytes DXC seconds
128 168306 → 135314 20932 → 14500 0.156 → 0.120
512 638802 → 506834 73540 → 47812 0.876 → 0.666

Half as many emitted WaveReadLaneAt calls for these exchange operations. These are synthetic compiler results, not a retail gameplay or driver-speed claim.

Validation

RTX 4080, NVIDIA 620.73.04, Linux, GE-Proton11-14:

  • 25 paired-Wave64 GPU programs, 1,638,400 words, zero mismatches; rebuilt provider. Includes added dependent chains and four-wave cases.
  • 335 shader-compiler tests; new structural test fails before the patch (8 vs 4 reads) and passes after.
  • All six code-check groups passed.
  • 8 Lanes gates: replay, benchmark, shader prepared/compiled/reused, narrow/host Wave64, raster tables.
  • Updated host profile record: only paired path changes, including wave32-host when it selects paired lowering. Any-host output unchanged.

Draft pending full check on this exact branch and AMD hardware validation. No title bytes or logs included.

@gtb-sbe

gtb-sbe commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

AMD run of the translator GPU stage on 5942f6b (this PR's head, tested as is on its base f3149ab).

Host: RX 9060 XT (1002:7590, RDNA4, runs wave64 natively), Mesa 26.2.6 RADV, GE-Proton11-14, Windows DXC 2026-09-29.

  • python tuxbox.py check --no-gpu: all code checks pass.
  • tools/check_translator_gpu.py --adapter 1002:7590 --only paired-wave64: PASS: 25 programs, 1638400 words, adapter 1002:7590 (includes the new exchange_chain and the five new _x4 variants).
  • Full translator stage: 30/30 cases pass. That is every case this branch's harness has. The 8 cases that main added after f3149ab (dpp8-exchange-*, dpp8-multiwave-*, lds-bounds, wave-guard-64-*) were not run.
  • For comparison, main 4d3dd26 on the same host: full stage 38/38, paired-wave64 PASS: 19 programs, 1245184 words.

One note on the setup: this branch predates #222, and with its name filter DXVK skipped both Vulkan devices here. The host names the card AMD Radeon RX 9060 XT (RADV GFX1200), while the guest sees AMD Radeon RX 9060 XT (radv 26.2.6). As a result, every program failed with "no readback". For the runs above I applied only #222's harness change (ca399e4, tools/check_translator_gpu.py) locally. The translator code is unchanged. All guest logs show Skipping: UUID filter for llvmpipe only, so they ran on the RADV card.

Not run: Lanes and the rest of the GPU gate, NVIDIA.

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.

2 participants