vkd3d/tests/hlsl-for.shader_test
Zebediah Figura 367bd15ec5 tests: Simplify "probe" directive syntax and parsing a bit.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-20 23:01:04 +02:00

29 lines
599 B
Plaintext

[vertex shader]
void main(out float tex : texcoord, inout float4 pos : sv_position)
{
tex = pos.x;
}
[pixel shader]
float4 main(float tex : texcoord) : sv_target
{
int i;
float x = 0.0;
for (i = 0; i < 10; i++)
{
x += i;
if (tex > 0.5 && i == 5)
break;
if (tex > -0.5 && i >= 7)
continue;
x -= 1;
}
return float4(i, x, 0.0, 0.0);
}
[test]
todo draw quad
probe ( 0, 0, 159, 480) rgba (10.0, 35.0, 0.0, 0.0)
probe (161, 0, 479, 480) rgba (10.0, 38.0, 0.0, 0.0)
probe (481, 0, 640, 480) rgba ( 5.0, 10.0, 0.0, 0.0)