mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-12-05 17:11:09 +00:00
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>
6 lines
791 B
Markdown
6 lines
791 B
Markdown
# shader
|
|
|
|
## add Functional
|
|
|
|
- [Cube layers](../../../core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp) (`CubeLayer`) map a DIM CUBE face coordinate z as RDNA2 (gfx1036, AMD driver 32.0.21045.16010, [hardware oracle](../HW_ORACLE.md)) does: z is truncated to a signed integer, the face is `min(z & 7, 5)` and the cube `z >> 3` clamped to the T#'s cubes, measured with `image_sample_lz`, `sample`, `sample_l`, `sample_b` and `gather4` variants on 64x64 32_FLOAT cubes (`DEPTH` 5, 11 and 17, `BASE_ARRAY` 0 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, where `OpConvertFToS` is undefined, and the PS5's gfx1013 are not measured.
|