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

Closed
Valdi320 wants to merge 1 commit from upstream-pr/243 into main
Valdi320 commented 2026-11-26 15:49:53 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by Valdi320 on 2026-11-26T15:49:53Z.


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 #242 and #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.

<!-- greyfinch-sync:brcly/TuxBox:issue:5513111433 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/243). Originally posted by [Valdi320](https://github.com/Valdi320) on 2026-11-26T15:49:53Z. --- ## 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 #242 and #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.
Valdi320 commented 2026-11-26 23:21:08 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by Valdi320 on 2026-11-26T23:21:08Z.


Deferred: maintainer measured ~0.4% savings on the recorded corpus; prioritize actual bottlenecks instead. Closing this draft to make the review queue manageable, per the maintainer's request. The branch and history remain intact at 586021d; no branch deleted.

<!-- greyfinch-sync:brcly/TuxBox:comment:7205468279 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/243#issuecomment-7205468279). Originally posted by [Valdi320](https://github.com/Valdi320) on 2026-11-26T23:21:08Z. --- Deferred: maintainer measured ~0.4% savings on the recorded corpus; prioritize actual bottlenecks instead. Closing this draft to make the review queue manageable, per the maintainer's request. The branch and history remain intact at `586021d`; no branch deleted.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
brcly/TuxBox!243
No description provided.