GlimmerProbeTrace (Glide) still came out at 374 KB of DXIL against dxc's 155 KB, with 130 allocas against 40. Most of the remainder: by-value struct parameters copied out of the constant buffer at every call (GlimmerGroundParams and GlimmerSpanParams, 32 i32s each), then indexed dynamically, which pinned each copy in memory. - Arguments loaded from a constant buffer are passed as the constant buffer place itself, structs as well as arrays (not with matrices, whose constant buffer access is narrower than a local's). Locals still alias only within a block with no write since. The alias now comes first in local_var lowering, so the skipped parameter store always matches. - Peepholes on promoted values: bitcast round trips (int/float mixing locals store i32s), constant integer arithmetic and comparisons, identities, selects on a constant. A constant out-of-bounds array index this exposes (on a path that cannot run) becomes 0, since the validator rejects it. - Inlined callees' array locals return to a per-type pool on return, for later callees to reuse. - -Od and -zdxc-no-opt skip promotion, aliasing and reuse, as they skip the SPIR-V IR passes. GlimmerProbeTrace: 374 KB to 191 KB, 21 allocas, 282 bitcasts (from 7198). Its pipeline builds in 3.6 s on an RX 9070 XT (was 5.1 s). All of Glide's 400 DXIL compiles: 5.91 MB (dxc: 6.11 MB), 7.1x faster than dxc. All pass dxc 1.8.2505's validator, and Glide renders. |
||
|---|---|---|
| docs | ||
| include | ||
| src | ||
| tools | ||
| vendor | ||
| .gitignore | ||
| build.zig | ||
| build.zig.zon | ||