Commit Graph

2 Commits

Author SHA1 Message Date
098f7ff761 rdna2spirv: guard v_readfirstlane in --mesh-native-wave32 and lower --spirv-opt SSA threshold to 512 KiB
- Exclude v_readfirstlane from --mesh-native-wave32 until per-use uniformity
  analysis proves the source wave-uniform (with ms_native_readfirstlane.asm
  and test_mesh_native_wave32.py regression test + docs/design.md update).
- Lower SPIRV_OPT_LARGE_BYTES from 750 KiB to 512 KiB so library/lib_cs_03245
  and siblings use the safe SSA pass set instead of --scalar-replacement=0
  (avoiding NVIDIA 590.48.01 compiler SIGSEGV during warmup).

AI-assisted.
2026-12-01 16:38:32 +02:00
4e483f7ce0 rdna2spirv: TO_DATA merges, --compute-serial-waves, --mesh-native-wave32, --spirv-opt
On top of PR #2566 (8db8335d2), combines verified translator performance and
correctness improvements for NVIDIA Wave32 GPUs (tested on RTX 3090 24 GB,
driver 590.48.01):

- Cherry-pick PR #2501 lane_masks.insert_data_merges (TO_DATA) fixing
  lib_cs_03010 bit-scanning loops (91-370 ms/call -> < 2.5 ms/frame).
- Add --compute-serial-waves for >64-thread barrier/LDS/atomic-free compute
  shaders (lib_cs_00977 + lib_cs_00986: 160 ms/frame -> < 2.4 ms/frame) while
  preserving unmodified PR #2566 d88b2deea VulkanMemoryModel coherency.
- Add --mesh-native-wave32 for strictly partition-invariant mesh shaders
  (9,116 / 9,282 dxbc MS shaders), running all threads natively in 1 Wave32
  pass with zero %x_buf LDS/barriers (-13% to -35% on hot mesh shaders).
- Add --spirv-opt (-O below 750 KiB, safe SSA pass set at >= 750 KiB to avoid
  NVIDIA 590.48.01 --scalar-replacement=0 compiler segfaults, with automatic
  fallback + spirv-val check).

AI-assisted. Verified with semantic tests and retail boots on RTX 3090 (590.48.01).
2026-12-01 16:37:33 +02:00