mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
tests: Test a for loop, with break and continue.
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com> Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d4adbe81a0
commit
3522d0f3a7
@ -64,6 +64,7 @@ vkd3d_shader_tests = \
|
|||||||
tests/hlsl-clamp.shader_test \
|
tests/hlsl-clamp.shader_test \
|
||||||
tests/hlsl-comma.shader_test \
|
tests/hlsl-comma.shader_test \
|
||||||
tests/hlsl-duplicate-modifiers.shader_test \
|
tests/hlsl-duplicate-modifiers.shader_test \
|
||||||
|
tests/hlsl-for.shader_test \
|
||||||
tests/hlsl-function-overload.shader_test \
|
tests/hlsl-function-overload.shader_test \
|
||||||
tests/hlsl-invalid.shader_test \
|
tests/hlsl-invalid.shader_test \
|
||||||
tests/hlsl-majority-pragma.shader_test \
|
tests/hlsl-majority-pragma.shader_test \
|
||||||
@ -281,6 +282,7 @@ XFAIL_TESTS = \
|
|||||||
tests/hlsl-clamp.shader_test \
|
tests/hlsl-clamp.shader_test \
|
||||||
tests/hlsl-comma.shader_test \
|
tests/hlsl-comma.shader_test \
|
||||||
tests/hlsl-duplicate-modifiers.shader_test \
|
tests/hlsl-duplicate-modifiers.shader_test \
|
||||||
|
tests/hlsl-for.shader_test \
|
||||||
tests/hlsl-function-overload.shader_test \
|
tests/hlsl-function-overload.shader_test \
|
||||||
tests/hlsl-majority-pragma.shader_test \
|
tests/hlsl-majority-pragma.shader_test \
|
||||||
tests/hlsl-majority-typedef.shader_test \
|
tests/hlsl-majority-typedef.shader_test \
|
||||||
|
22
tests/hlsl-for.shader_test
Normal file
22
tests/hlsl-for.shader_test
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
[pixel shader]
|
||||||
|
float4 main(float4 pos : SV_POSITION) : SV_TARGET
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
float x = 0.0;
|
||||||
|
for (i = 0; i < 10; i++)
|
||||||
|
{
|
||||||
|
x += i;
|
||||||
|
if (pos.x == 1.5 && i == 5)
|
||||||
|
break;
|
||||||
|
if (pos.x == 2.5 && i >= 7)
|
||||||
|
continue;
|
||||||
|
x -= 1;
|
||||||
|
}
|
||||||
|
return float4(i, x, 0.0, 0.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
[test]
|
||||||
|
draw quad
|
||||||
|
probe rgba (0, 0) (10.0, 35.0, 0.0, 0.0)
|
||||||
|
probe rgba (1, 0) (5.0, 10.0, 0.0, 0.0)
|
||||||
|
probe rgba (2, 0) (10.0, 38.0, 0.0, 0.0)
|
Loading…
Reference in New Issue
Block a user