upleb.uk

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

summaryrefslogtreecommitdiff
path: root/runtime/src/bcpack.cpp
diff options
context:
space:
mode:
authorbobcatchris <83428450+bobcatchris@users.noreply.github.com>2026-11-29 20:38:40 -0600
committerbobcatchris <83428450+bobcatchris@users.noreply.github.com>2026-11-30 05:18:00 -0600
commit0f8f57b6a04283ae35450a74e9ec2415c6bc6351 (patch)
treef9595f0d1eac5513ab6cc76e5fc43b563fce3e0e /runtime/src/bcpack.cpp
parentd367675c705c758f731ae9eb603839a4ebb2283c (diff)
leonida-shader: hoist uniform createHandleFromHeap out of branches and loops (D3D12-SHADER-OPT-HOIST-HEAP-HANDLES)
Addresses the d3d12/docs/findings.md item ("descriptors made again in every branch of a program (createHandleFromHeap of an index that is a root constant plus an offset, behind a branch on a load)"). Adds Module::hoist_handles() under REUSE: marks uniform (nonuniform = false) dx.op.createHandleFromHeap calls, their wrapping annotateHandle calls, and their pure, non-trapping index/clamp operands (cbufferLoadLegacy, integer non-div/rem arithmetic, casts, extracts, dx.op.binary.i32 clamp), and hoists each in RPO order to the deepest dominating block defining its operands. REUSE then collapses duplicate handles across sibling branches and loops into a single descriptor handle. Nonuniform handles and handles whose index depends on branch-local memory loads remain in their original blocks. AI-assisted: Antigravity (Gemini 4 Neon)
Diffstat (limited to 'runtime/src/bcpack.cpp')
0 files changed, 0 insertions, 0 deletions