0ffcea54
by Elizabeth Figura at 2026-04-20T14:05:38+02:00
vkd3d-shader/ir: Introduce an output write hoisting pass.
fxc/d3dcompiler seems to have a pass very similar to this.
Much like copy propagation (and in essence this is a form of copy propagation),
this can greatly reduce register pressure. If an output variable is written
early (or all of the meaningful calculations are done early), the HLSL compiler
will still append the actual copy to the output register at the end of the
program, meaning the value is kept alive. This avoids that by writing the output
register earlier.
In bug 59597 (Alekhine's Gun), at the point with the highest register
pressure, about half of the live registers are dedicated to output
variables that could already have been written. This pass addresses
that.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=59597