Skip to content
Snippets Groups Projects
Commit 3522d0f3 authored by Giovanni Mascellani's avatar Giovanni Mascellani Committed by Alexandre Julliard
Browse files

tests: Test a for loop, with break and continue.

parent d4adbe81
No related branches found
No related tags found
No related merge requests found
......@@ -64,6 +64,7 @@ vkd3d_shader_tests = \
tests/hlsl-clamp.shader_test \
tests/hlsl-comma.shader_test \
tests/hlsl-duplicate-modifiers.shader_test \
tests/hlsl-for.shader_test \
tests/hlsl-function-overload.shader_test \
tests/hlsl-invalid.shader_test \
tests/hlsl-majority-pragma.shader_test \
......@@ -281,6 +282,7 @@ XFAIL_TESTS = \
tests/hlsl-clamp.shader_test \
tests/hlsl-comma.shader_test \
tests/hlsl-duplicate-modifiers.shader_test \
tests/hlsl-for.shader_test \
tests/hlsl-function-overload.shader_test \
tests/hlsl-majority-pragma.shader_test \
tests/hlsl-majority-typedef.shader_test \
......
[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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment