Skip to content

xshader: lower simple paired Wave64 comparisons directly to ballots - #243

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

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

Conversation

@Valdi320

Copy link
Copy Markdown
Contributor

Change

Lower six unsigned integer comparison relations directly to two host ballots intersected with guest EXEC. Both results are calculated before either destination word changes. Require exact agreement with the existing emitted predicated comparison, ordinary VGPR, non-aliasing SGPR or integer operands, and a single mask destination. Other shapes (CMPX, DPP, mask operands, aliased scalar destinations) keep the existing generic path. No change to native-host profile records.

Measurements

Synthetic dependent comparison/select chain (384 comparisons); base 4d3dd26; production DXC flags, five alternating runs per version:

  • HLSL: 917638 -> 769606 bytes (-16.1%).
  • DXC median: 1.187 -> 0.883 s (-25.6%).
  • Peak RSS median: 112676 -> 85472 KiB (-24.1%).
  • DXIL: 41556 -> 39744 bytes (-4.4%). Output hashes differ; both versions of this exact long shader were executed on RTX 4080 and independently matched the CPU oracle (65536 words each, zero mismatches).

Validation

  • Structural regression before/after, all six no-GPU check groups passed.
  • 21 paired-wave64 GPU programs / 1376256 words, zero mismatches, including dependent unsigned compare chain with both VCC and SGPR destinations, sparse/empty EXEC and multiwave groups.
  • Additional long benchmark GPU test before/after as above.
  • 8/8 Lanes gates on RTX 4080 / GE-Proton11-14 using unchanged runtime and Lanes fixture (source equality checked against previously rebuilt provider), current translator.
  • Independent of xshader: emit simple paired Wave64 ALU assignments directly #242 and xshader: avoid redundant reads in paired Wave64 local exchanges #234; combined benefits not measured. No retail data included.

Draft pending full GPU suite on exact branch and AMD validation; no claim of retail FPS gains.

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.

1 participant