Commit Graph

2 Commits

Author SHA1 Message Date
896b56c6a1 rdna2spirv: support image_store and coherent image_load on SQ_RSRC_IMG_CUBE (#6805)
Squash-merged after diff review of PR #6805 - rdna2spirv: support image_store and coherent image_load on SQ_RSRC_IMG_CUBE
2026-11-23 09:59:39 -06:00
4e7bd89e92 rdna2spirv: coherent image accesses (glc) read and write Coherent storage views
- On GFX10 a device-scope load is `glc dlc` and a device-scope store `glc` (Mesa ac_get_hw_cache_flags sets
  exactly these bits for ACCESS_COHERENT). The 10 POPS pixel shaders read-modify-write their ordered images that
  way, but a glc image_load was translated as a read of the sampled array (no coherent form in SPIR-V) and no
  storage view was Coherent, so under the fragment-shader interlock a read could miss the previous fragment's store.
- A glc image_load now reads the storage view the stores write (OpImageRead, StorageImageReadWithoutFormat, class
  picked from the T# FORMAT as for stores); a shader with a glc image load or store decorates its storage views
  Coherent. Every other image_load keeps SHADER-151's sampled path (byte-identical output).
- glc on a sampled read (image_sample*, image_gather*, image_load_mip) or on a dimension without storage views is
  Unsupported instead of silently non-coherent; dlc alone (CU scope) stays non-coherent.
- tests/semantic/test_image_coherent.py (real translator; 7 of 10 fail on the old one) and a docs/design.md row.
2026-11-22 07:12:57 -08:00