tests: Simplify conditional test.

This commit is contained in:
Nikolay Sivov 2023-05-07 22:02:03 +02:00 committed by Alexandre Julliard
parent be4a71da7d
commit a064009d3b
Notes: Alexandre Julliard 2023-05-09 22:26:06 +02:00
Approved-by: Zebediah Figura (@zfigura)
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/201

View File

@ -1,19 +1,16 @@
[vertex shader]
void main(out float tex : texcoord, inout float4 pos : sv_position)
{
tex = pos.x;
}
[pixel shader] [pixel shader]
float4 main(float tex : texcoord) : SV_TARGET float4 main(uniform float4 u) : sv_target
{ {
if (tex > 0.0) if (u.x > 0.0)
return float4(0.1, 0.2, 0.3, 0.4); return float4(0.1, 0.2, 0.3, 0.4);
else else
return float4(0.9, 0.8, 0.7, 0.6); return float4(0.9, 0.8, 0.7, 0.6);
} }
[test] [test]
uniform 0 float4 0.0 0.0 0.0 0.0
draw quad draw quad
probe ( 0, 0, 319, 480) rgba (0.9, 0.8, 0.7, 0.6) probe all rgba (0.9, 0.8, 0.7, 0.6)
probe (321, 0, 640, 480) rgba (0.1, 0.2, 0.3, 0.4) uniform 0 float4 0.1 0.0 0.0 0.0
draw quad
probe all rgba (0.1, 0.2, 0.3, 0.4)