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:
authorMoonEyes <ducoinbenjamin@yahoo.fr>2026-11-30 17:02:39 +0100
committerGitHub <noreply@github.com>2026-11-30 17:02:39 +0100
commite324ad55edb4ad2effbab85e034c59abbc54e712 (patch)
treeab138a180c41f28e8645fe3d52b9bf54cd242454 /docs
parentc663c2a85e41a6e720bf50747d0e28720ef482f7 (diff)
parent57f3a3c1c5b15d50872f1afd3a769f7a10960855 (diff)
Merge pull request #2720 from OreoFR/carry/pr-2093
reprend #2093: spirv_opt: scalar-replace surviving static Function arrays (SHADER-SPIRV-OPT-SROA)
Diffstat (limited to 'docs')
-rw-r--r--docs/design.md8
1 files changed, 5 insertions, 3 deletions
diff --git a/docs/design.md b/docs/design.md
index ad009712e..bef2bf4f3 100644
--- a/docs/design.md
+++ b/docs/design.md
@@ -242,10 +242,12 @@ could overflow to inf), and pixel interpolation (`v_interp_p1/p2/mov` become fra
242location). MODE writes (`s_setreg`) model the f16/f64 rounding field, FP_ROUND[3:2], the only MODE field the 242location). MODE writes (`s_setreg`) model the f16/f64 rounding field, FP_ROUND[3:2], the only MODE field the
243corpus writes; other MODE writes are refused (see Known approximations). 243corpus writes; other MODE writes are refused (see Known approximations).
244 244
245`--opt` is off by default and runs a basic-block peephole pass, `tools/spirv_opt.py`, over the emitted 245`--opt` is off by default and runs a dominator-tree SPIR-V optimizer, `tools/spirv_opt.py`, over the emitted
246module before it is assembled: register store-to-load forwarding, `OpAccessChain` CSE, dead-store 246module before it is assembled: register store-to-load forwarding, `OpAccessChain` CSE, dead-store
247elimination, `OpSelect`/`OpCopyObject` folding and DCE. Only Function-scope variables that do not escape 247elimination, `OpSelect`/`OpCopyObject` folding, DCE, and Scalar Replacement of Aggregates (SROA) splitting
248are tracked, and a variable with any dynamic index is excluded from whole-function dead-slot elimination. 248surviving non-escaped, statically indexed Function-scope arrays (`%vgpr[256]`, `%sgpr[128]`) into per-slot
249scalar `OpVariable`s. Only Function-scope variables that do not escape are tracked, and a variable with any
250dynamic index (`v_movrel*`/`s_movrel*`) is excluded from whole-function dead-slot elimination and SROA.
249 251
250Measured on five hand-written pixel fixtures from `tests/semantic/fixtures/disasm`, with every result still 252Measured on five hand-written pixel fixtures from `tests/semantic/fixtures/disasm`, with every result still
251passing `spirv-val --target-env vulkan1.2`: `ps_ops` 76→33 instructions and 7,876→4,516 bytes, `ps_flat` 253passing `spirv-val --target-env vulkan1.2`: `ps_ops` 76→33 instructions and 7,876→4,516 bytes, `ps_flat`