mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-31 12:35:51 +00:00
Since #2133, a 3D image_sample_lz or image_load bound to a 2D-array T# decodes as 2D and matches the new 2D mode, so it reads layer 0 for any r and returns zero for z != 0. adriadam10 measured on RDNA2 (gfx1035) that dim 3D on a 2D-array T# behaves exactly like dim 2D-array, with r or z as the layer. Decode a 2D-array T# bound to a 3D access as 2D-array and add a 2D-array mode next to the 2D one. The same measurement covers image_load_mip on both T# types and image_get_resinfo, which returns (w, h, 1, levels) on a 2D T# and (w, h, layers, levels) on a 2D-array T#. Allow those accesses and return 1 as the third resinfo component through the 2D mode. image_get_lod is not measured and keeps throwing.