upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authortedin7 <tommasoderosa94@gmail.com>2026-11-24 00:35:11 +0100
committerJARVIX <273200855+jarvixaiassistant-glitch@users.noreply.github.com>2026-11-24 09:33:38 +0000
commitce98fbefee2bee293e04835ed30183164be2fd31 (patch)
tree0ccc708f6d3d772823ec847b1c712da6926e91fa /docs
parentd7576d56ae2c77564c84ffae724ffe9bdd2e6701 (diff)
fix: rdna2spirv decodes scalar, image and buffer tuples that run into vcc from the blob when llvm-mc rejects them
llvm-mc skips the first word of s_buffer_load_dwordx8 into s[100:107], an image resource in s[100:107] or a buffer resource in s[104:107] and leaves the second word as junk, so translate() refused those shaders (reachable instruction with normalized encoding) or translated them without the load. restore_vcc_tuples reads the uncovered words of the code range with rdna2_decode and keeps only instructions whose operands hold a VCCTuple list, the form the translator already takes. Other undecodable words are unchanged.
Diffstat (limited to 'docs')
-rw-r--r--docs/shader_library.md8
1 files changed, 5 insertions, 3 deletions
diff --git a/docs/shader_library.md b/docs/shader_library.md
index 09a1997a9..483426225 100644
--- a/docs/shader_library.md
+++ b/docs/shader_library.md
@@ -165,9 +165,11 @@ What stops the rest, by the translator's message:
165 run into `vcc` (SGPRs 106 and 107): `s_load_dwordx8`/`x4`/`x16` writing `s[100:107]`, `s[104:107]` or 165 run into `vcc` (SGPRs 106 and 107): `s_load_dwordx8`/`x4`/`x16` writing `s[100:107]`, `s[104:107]` or
166 `s[92:107]`, and image instructions whose resource is `s[100:107]`. In the compute programs alone that is 37,952 166 `s[92:107]`, and image instructions whose resource is `s[100:107]`. In the compute programs alone that is 37,952
167 SMEM, 22,248 MIMG and 2,298 MUBUF words. The same words with the register field one tuple lower decode; with 167 SMEM, 22,248 MIMG and 2,298 MUBUF words. The same words with the register field one tuple lower decode; with
168 `gfx1030` they don't either. The FSSM shaders don't use these tuples; the pipeline builds use them often. A decoder 168 `gfx1030` they don't either. The FSSM shaders don't use these tuples; the pipeline builds use them often. The translator
169 fallback for these encodings would cover most of the remaining programs. The translator already reads 169 now decodes these words from the blob with `rdna2_decode` (`restore_vcc_tuples`) and reads them as the
170 `[s100,...,vcc_lo,vcc_hi]` lists (design.md *Scalar/buffer memory*). 170 `[s100,...,vcc_lo,vcc_hi]` lists it already takes (design.md *Scalar/buffer memory*); synthetic cases are in
171 `tests/semantic/test_vcc_tuple_fallback.py`. The count above was measured before this change; it has not been
172 re-run on the real library.
171* **443: an instruction llvm-mc prints with another encoding than the blob's** (`v_fma_mix*`, `v_interp_p2_f16`): 173* **443: an instruction llvm-mc prints with another encoding than the blob's** (`v_fma_mix*`, `v_interp_p2_f16`):
172 the existing `check_printed_encodings` refusal. 174 the existing `check_printed_encodings` refusal.
173* **90 CS: "CS thread-group-size SGPR"**: RSRC2 `TG_SIZE_EN`, which no FSSM compute shader sets. 175* **90 CS: "CS thread-group-size SGPR"**: RSRC2 `TG_SIZE_EN`, which no FSSM compute shader sets.