mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
d3ba810c98
This is simply unnecessary and wastes time. As part of this, simply remove the "all" directive. Only for a couple of tests is it even potentially interesting to validate all pixels (e.g. nointerpolation.shader_test), and for those "all" is replaced with an explicit (0, 0, 640, 480) rect. In all other cases we just probe (0, 0).
77 lines
1.2 KiB
Plaintext
77 lines
1.2 KiB
Plaintext
[pixel shader todo(sm<4)]
|
|
float cond;
|
|
|
|
float4 main() : sv_target
|
|
{
|
|
float4 a = {1, 2, 3, 4};
|
|
float4 b;
|
|
|
|
// invalidate a
|
|
if (cond)
|
|
a = float4(-1, -2, -3, -4);
|
|
|
|
b = a;
|
|
a.y = 357;
|
|
return b.y;
|
|
}
|
|
|
|
[test]
|
|
uniform 0 float 0.0
|
|
todo(sm<4 | glsl) draw quad
|
|
probe (0, 0) rgba (2.0, 2.0, 2.0, 2.0)
|
|
uniform 0 float 1.0
|
|
todo(sm<4 | glsl) draw quad
|
|
probe (0, 0) rgba (-2.0, -2.0, -2.0, -2.0)
|
|
|
|
|
|
[pixel shader todo(sm<4)]
|
|
float cond;
|
|
|
|
float4 main() : sv_target
|
|
{
|
|
float2 r = {1, 2};
|
|
float2 tmp;
|
|
|
|
// invalidate r
|
|
if (cond)
|
|
r = float2(10, 20);
|
|
|
|
tmp = r;
|
|
r = tmp;
|
|
return r.y;
|
|
}
|
|
|
|
[test]
|
|
uniform 0 float 0.0
|
|
todo(sm<4 | glsl) draw quad
|
|
probe (0, 0) rgba (2.0, 2.0, 2.0, 2.0)
|
|
uniform 0 float 1.0
|
|
todo(sm<4 | glsl) draw quad
|
|
probe (0, 0) rgba (20.0, 20.0, 20.0, 20.0)
|
|
|
|
|
|
[pixel shader todo(sm<4)]
|
|
float cond;
|
|
|
|
float4 main() : sv_target
|
|
{
|
|
float2 r = {3, 4};
|
|
|
|
// invalidate r
|
|
if (cond)
|
|
r = float2(30, 40);
|
|
|
|
r = r;
|
|
r = float2(1, r.y);
|
|
|
|
return float4(r, 0, 0);
|
|
}
|
|
|
|
[test]
|
|
uniform 0 float 0.0
|
|
todo(sm<4 | glsl) draw quad
|
|
probe (0, 0) rgba (1.0, 4.0, 0.0, 0.0)
|
|
uniform 0 float 1.0
|
|
todo(sm<4 | glsl) draw quad
|
|
probe (0, 0) rgba (1.0, 40.0, 0.0, 0.0)
|