Skip to content

vkd3d-shader/hlsl: Divert written uniform derefs to temps before copy-propagation passes.

Fixes copy-propagation of the following pixel shader, which currently triggers an infinite loop during copy propagation:

sampler s;
Texture2D t1, t2;

float4 main() : sv_target
{
    Texture2D t = t1;
    t1 = t2;
    t2 = t;
    return t1.Sample(s, float2(0, 0)) + t2.Sample(s, float2(0, 0));
}

Merge request reports

Loading