mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
tests: Add a test with non-trivial control flow.
This commit is contained in:
committed by
Alexandre Julliard
parent
83851133c5
commit
6cb7487fb0
Notes:
Alexandre Julliard
2024-01-18 23:20:24 +01:00
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/568
@ -28,6 +28,40 @@ 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 (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)
|
probe (481, 0, 640, 480) rgba ( 5.0, 10.0, 0.0, 0.0)
|
||||||
|
|
||||||
|
[require]
|
||||||
|
shader model >= 4.0
|
||||||
|
|
||||||
|
% Identical to the previous, except we prevent DXC from unrolling the
|
||||||
|
% loop so we can test non-trivial control flow
|
||||||
|
[pixel shader]
|
||||||
|
uniform uint iter;
|
||||||
|
|
||||||
|
float4 main(float tex : texcoord) : sv_target
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
float x = 0.0;
|
||||||
|
for (i = 0; i < iter; 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]
|
||||||
|
uniform 0 uint4 10 0 0 0
|
||||||
|
todo(sm>=6) 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)
|
||||||
|
|
||||||
|
[require]
|
||||||
|
% Reset requirements
|
||||||
|
|
||||||
[pixel shader]
|
[pixel shader]
|
||||||
float4 main(float tex : texcoord) : sv_target
|
float4 main(float tex : texcoord) : sv_target
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user