A DIM CUBE face coordinate z mapped to host layer (z / 8) * 6 + z % 8 through an unsigned conversion, right only for faces 0 to 5 of a cube inside the T#. gfx1036 truncates z to a signed integer, clamps z & 7 to 5 and clamps z >> 3 to the T#'s cubes; CubeLayer now does the same, taking the cube count from the sampled view's layers. GCN guest shaders keep the old mapping, which is not measured on GCN hardware. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
791 B
791 B
shader
add Functional
- Cube layers (
CubeLayer) map a DIM CUBE face coordinate z as RDNA2 (gfx1036, AMD driver 32.0.21045.16010, hardware oracle) does: z is truncated to a signed integer, the face ismin(z & 7, 5)and the cubez >> 3clamped to the T#'s cubes, measured withimage_sample_lz,sample,sample_l,sample_bandgather4variants on 64x64 32_FLOAT cubes (DEPTH5, 11 and 17,BASE_ARRAY0 and 6). GCN guest shaders keep(z / 8) * 6 + z % 8, which is right only for faces 0 to 5 of a cube inside the T#; cube decode is not measured on GCN hardware. z outside the 32-bit integer range, whereOpConvertFToSis undefined, and the PS5's gfx1013 are not measured.