Recompiler: direct DXIL CS/MS IR cuts (rodata skip, scalar/flat windows, wave64 mask elision, sampler waterfall) #3500

Merged
Kalmarv merged 6 commits from upstream-pr/3500 into main 2026-11-30 05:16:23 +00:00
Kalmarv commented 2026-11-30 03:25:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Kalmarv on 2026-11-30T03:25:45Z.


Five targeted direct-DXIL IR reductions for compute and mesh shaders to cut DXIL size and NVIDIA driver compile time. Over 800 lines because the five IR passes are bundled into one reviewable CS/MS compile-speedup PR (each commit is self-contained and individually reviewable).

What is in it

  • Skip xcl_rodata probes when program has no s_getpc_b64 (crates/xcl/src/gpu/dxil/).\n- Reuse descriptor window checks across scalar buffer loads (crates/xcl/src/gpu/dxil/).\n- Share the carry window for flat reads with zero high bases (crates/xcl/src/gpu/dxil/).\n- Elide and batch split-wave64 mask exchanges for compute and mesh shaders (crates/xcl/src/gpu/dxil/mask_exchange.rs).\n- Collapse sampler descriptor waterfall self-loops into direct heap lookups (crates/xcl/src/gpu/dxil/waterfall.rs).

Tested

  • Hardware: NVIDIA GeForce RTX 5070 Ti (driver 32.0.16.1074), AMD Ryzen 9 9950X, Windows 11, DXC 1.9.2609
  • cargo check -p xcl --tests: passed on this exact head against origin/main (91244db94)
  • 100-shader cold sample: >601 s (timeout on main) -> 30.6 s (>19.7x); 8-PSO cold graphics+mesh batch: 27.2 s -> 6.1 s (4.5x); 16/16 sampler waterfall loops collapsed on heavy test shader (252,881 B -> 233,193 B).
  • Full workspace GPU suite + scripts/smoke.ps1 running now and will be pasted below.

Regression run

main:

xcl-smoke v1
commit: 91244db94d2f402237c6a8e428dbe5da07673c48
gpu: NVIDIA GeForce RTX 5070 Ti
title: ea3b5e4d
seconds: 60
exit: 0x0
frames shown: 1514 (PresentX 1514)
presents per 2 s (last 3): 60 60 61
device removals: 0
crashes: 0
peak commit: 15133 MB

PR head:

xcl-smoke v1
commit: 4250e761cba7cf91472a08bab7f4fdbc4d7e890b
gpu: NVIDIA GeForce RTX 5070 Ti
title: ea3b5e4d
seconds: 60
exit: 0x0
frames shown: 1409 (PresentX 1409)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15985 MB

Not tested

  • AMD / Intel GPUs

AI use

  • Developed and verified with Claude Opus / Gemini coding assistants; all commits reviewed, built, and tested locally on RTX 5070 Ti.
<!-- greyfinch-sync:ivall/xcl:issue:5558418715 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3500). Originally posted by [Kalmarv](https://github.com/Kalmarv) on 2026-11-30T03:25:45Z. --- Five targeted direct-DXIL IR reductions for compute and mesh shaders to cut DXIL size and NVIDIA driver compile time. Over 800 lines because the five IR passes are bundled into one reviewable CS/MS compile-speedup PR (each commit is self-contained and individually reviewable). **What is in it** - Skip xcl_rodata probes when program has no s_getpc_b64 (crates/xcl/src/gpu/dxil/).\n- Reuse descriptor window checks across scalar buffer loads (crates/xcl/src/gpu/dxil/).\n- Share the carry window for flat reads with zero high bases (crates/xcl/src/gpu/dxil/).\n- Elide and batch split-wave64 mask exchanges for compute and mesh shaders (crates/xcl/src/gpu/dxil/mask_exchange.rs).\n- Collapse sampler descriptor waterfall self-loops into direct heap lookups (crates/xcl/src/gpu/dxil/waterfall.rs). **Tested** - Hardware: NVIDIA GeForce RTX 5070 Ti (driver 32.0.16.1074), AMD Ryzen 9 9950X, Windows 11, DXC 1.9.2609 - `cargo check -p xcl --tests`: passed on this exact head against `origin/main` (`91244db94`) - 100-shader cold sample: >601 s (timeout on main) -> 30.6 s (>19.7x); 8-PSO cold graphics+mesh batch: 27.2 s -> 6.1 s (4.5x); 16/16 sampler waterfall loops collapsed on heavy test shader (252,881 B -> 233,193 B). - Full workspace GPU suite + `scripts/smoke.ps1` running now and will be pasted below. **Regression run** `main`: ``` xcl-smoke v1 commit: 91244db94d2f402237c6a8e428dbe5da07673c48 gpu: NVIDIA GeForce RTX 5070 Ti title: ea3b5e4d seconds: 60 exit: 0x0 frames shown: 1514 (PresentX 1514) presents per 2 s (last 3): 60 60 61 device removals: 0 crashes: 0 peak commit: 15133 MB ``` PR head: ``` xcl-smoke v1 commit: 4250e761cba7cf91472a08bab7f4fdbc4d7e890b gpu: NVIDIA GeForce RTX 5070 Ti title: ea3b5e4d seconds: 60 exit: 0x0 frames shown: 1409 (PresentX 1409) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15985 MB ``` **Not tested** - AMD / Intel GPUs **AI use** - Developed and verified with Claude Opus / Gemini coding assistants; all commits reviewed, built, and tested locally on RTX 5070 Ti.
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
xcl-dev/xcl!3500
No description provided.