mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
66 lines
952 B
Plaintext
66 lines
952 B
Plaintext
% Unrolling edge cases.
|
|
|
|
[pixel shader todo(sm<4)]
|
|
float a : register(c0);
|
|
|
|
float4 main() : sv_target
|
|
{
|
|
int i;
|
|
if (a > 0)
|
|
{
|
|
[unroll]
|
|
for (i = 0; i < 10; ++i);
|
|
|
|
return float4(i, a, 2.0, 3.0);
|
|
}
|
|
|
|
return float4(0.0, a, 3.0, 4.0);
|
|
}
|
|
|
|
[test]
|
|
uniform 0 float 1
|
|
todo(glsl|sm<4) draw quad
|
|
probe (0,0) rgba(10.0, 1.0, 2.0, 3.0)
|
|
|
|
[pixel shader]
|
|
float4 main() : sv_target
|
|
{
|
|
int i;
|
|
[unroll(4)]
|
|
for (i = 0; i < 8; ++i);
|
|
|
|
return float4(i, 0, 0, 0);
|
|
}
|
|
|
|
[test]
|
|
draw quad
|
|
probe (0,0) rgba(4.0, 0.0, 0.0, 0.0)
|
|
|
|
[pixel shader fail(sm<6)]
|
|
float4 main() : sv_target
|
|
{
|
|
int i;
|
|
[unroll]
|
|
for (i = 0; i < 1024; ++i);
|
|
|
|
return float4(i, 0, 0, 0);
|
|
}
|
|
|
|
[test]
|
|
todo(glsl) draw quad
|
|
probe (0,0) rgba(1024.0, 0, 0, 0)
|
|
|
|
[pixel shader]
|
|
float4 main() : sv_target
|
|
{
|
|
int i;
|
|
[unroll(1337)]
|
|
for (i = 0; i < 1337; ++i);
|
|
|
|
return float4(i, 0, 0, 0);
|
|
}
|
|
|
|
[test]
|
|
draw quad
|
|
probe (0,0) rgba(1337.0, 0, 0, 0)
|