diff options
| author | ItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com> | 2026-11-22 11:42:49 -0500 |
|---|---|---|
| committer | ItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com> | 2026-11-22 11:42:49 -0500 |
| commit | cf8d5edbc997fe8ee44dbea51567dffc5339d35c (patch) | |
| tree | e122ef291bc40d4c20c6e81ad1997812dc255146 /docs/shader_validation.md | |
| parent | 0c73e101ffc0e2d1ee4145a80a847560c68587ad (diff) | |
| parent | 74e39155f1bd571b9d6684560c87d700759ad529 (diff) | |
Merge pull request #2204 from Vonsek
# Conflicts:
# docs/design.md
Diffstat (limited to 'docs/shader_validation.md')
| -rw-r--r-- | docs/shader_validation.md | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/docs/shader_validation.md b/docs/shader_validation.md index bd9aa23b5..3ea94dc08 100644 --- a/docs/shader_validation.md +++ b/docs/shader_validation.md | |||
| @@ -1133,6 +1133,37 @@ Measured on an RX 6700 (gfx1031, AMD Windows driver 32.0.21045.29003, ROCm wheel | |||
| 1133 | each value is staged once, and that the kernels assemble for gfx1031. A fake oracle plays the GPU to check the exit | 1133 | each value is staged once, and that the kernels assemble for gfx1031. A fake oracle plays the GPU to check the exit |
| 1134 | codes. On a GFX10 GPU the test runs UNORM8 and checks the controls. | 1134 | codes. On a GFX10 GPU the test runs UNORM8 and checks the controls. |
| 1135 | 1135 | ||
| 1136 | ### `image_get_resinfo` and `image_get_lod` (`tools/image_query_probe.py`, SHADER-388) | ||
| 1137 | |||
| 1138 | `docs/design.md` ("Image atomics, size and LOD queries") took resinfo's depth word, the clamped LOD under a linear mip | ||
| 1139 | filter and the order of u and v in the LOD query from the T# fields and the spec. The probe runs both instructions | ||
| 1140 | natively on a GFX10 GPU through the hardware oracle. Neither reads memory, so a T# with no texture behind it is | ||
| 1141 | enough. Each case runs in wave32 and wave64. | ||
| 1142 | |||
| 1143 | ``` | ||
| 1144 | python -I tools/image_query_probe.py --json query.json # 614 results; exit 77 without the oracle or on non-GFX10 | ||
| 1145 | python -I tools/image_query_probe.py --self-test # the rules against values measured on gfx1036, no GPU | ||
| 1146 | ``` | ||
| 1147 | |||
| 1148 | - **resinfo:** 2D and 2D-array T#s with WORD4 DEPTH 0, 5, the GFX10.3 pitch and 0x1FFF, BASE_LEVEL 0 to 2, levels | ||
| 1149 | inside and past LAST_LEVEL. | ||
| 1150 | - **get_lod:** one 2x2 quad of lanes whose u steps across x and v across y. MIP_FILTER none, point and linear, with | ||
| 1151 | MIN_LOD/MAX_LOD pairs including MIN above MAX and MIN above the last level, LOD_BIAS 0, 1 and -0.5, at LODs that | ||
| 1152 | are exact in binary. Every lane of the quad must agree. A 64x4 image steps one axis at a time. | ||
| 1153 | |||
| 1154 | Measured on the Radeon Graphics of a Ryzen 9 9950X3D (gfx1036, AMD Windows driver 32.0.21045.16010, ROCm wheel | ||
| 1155 | clang), every result matched the rules in the tool's docstring: | ||
| 1156 | |||
| 1157 | - The 2D depth word is 0, never DEPTH + 1. A 2D array's layer count is minified as max(1, layers >> (BASE_LEVEL + | ||
| 1158 | level)): 100 layers at level 3 gave 12. | ||
| 1159 | - Past the last level, width, height and depth are 0, while the level count stays. | ||
| 1160 | - Raw LOD = computed LOD + LOD_BIAS. The clamped LOD is the level that would be read: 0 with no mip filter, the | ||
| 1161 | clamp rounded half up with point, the clamp itself with linear. | ||
| 1162 | |||
| 1163 | `tests/test_image_query_probe.py` checks the rules against the measured values, the descriptor bits and the | ||
| 1164 | kernels. A fake oracle plays the GPU to check the comparison and the exit codes; with a 2D depth of 1 it fails. On | ||
| 1165 | a GFX10 GPU the test runs the whole probe. | ||
| 1166 | |||
| 1136 | ### `v_fma_mix*` f16 rounding in nearest mode (`tools/fma_mix_probe.py`) | 1167 | ### `v_fma_mix*` f16 rounding in nearest mode (`tools/fma_mix_probe.py`) |
| 1137 | 1168 | ||
| 1138 | `docs/design.md` leaves one f16 question open. In round-to-nearest mode, does `v_fma_mixlo_f16` / `v_fma_mixhi_f16` | 1169 | `docs/design.md` leaves one f16 question open. In round-to-nearest mode, does `v_fma_mixlo_f16` / `v_fma_mixhi_f16` |