upleb.uk

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

summaryrefslogtreecommitdiff
path: root/docs/lua-modding.md
diff options
context:
space:
mode:
authorbobcatchris <83428450+bobcatchris@users.noreply.github.com>2026-11-29 20:29:06 -0600
committerbobcatchris <83428450+bobcatchris@users.noreply.github.com>2026-11-30 05:17:58 -0600
commit87d528fe9a4d9062b30acf3abff72ba64c0275f8 (patch)
tree77757f8bdec87a9710ae58dc91d7c6ff6b8dbaef /docs/lua-modding.md
parentd367675c705c758f731ae9eb603839a4ebb2283c (diff)
leonida-shader: propagate LOADS across dominating write-free blocks (D3D12-SHADER-OPT-CROSS-BLOCK-LOADS)
Addresses the d3d12/docs/findings.md item ("reads of read-only views repeated in blocks that follow one another"). Previously, merge() cleared the LOADS map at every basic-block boundary, preventing reuse of Effect::Reads across sequential blocks, single-predecessor branch targets, and write-free diamonds or loops. Extend merge() to maintain dominator-scoped dom_reads for Effect::Reads while keeping Effect::Lanes (wave/quad operations) strictly block-local: - Single-predecessor blocks inherit dom_reads directly from their immediate dominator (O(1)). - Multi-predecessor blocks (merges and loop headers) run a reverse walk back to the immediate dominator and preserve dom_reads only when no block on any path (including loop back-edges) executes Effect::Writes. - Any Effect::Writes instruction clears dom_reads for the rest of its block and dominator subtree, restoring the pre-block map on Leave so siblings remain unaffected. Verified with 3 new Red -> Green unit tests (write-free diamond, branch-write invalidation + sibling reuse, loop back-edge write vs write-free loop), the 400-seed randomized differential interpreter suite, and 370/370 leonida-shader --lib tests on native Windows 11 + AMD Radeon RX 7900 XTX. AI-assisted: Antigravity (Gemini 4 Neon)
Diffstat (limited to 'docs/lua-modding.md')
0 files changed, 0 insertions, 0 deletions