mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
tests: Move HLSL tests to a subdirectory.
This commit is contained in:
committed by
Alexandre Julliard
parent
69f32796b0
commit
0d2f2e1860
Notes:
Alexandre Julliard
2023-06-28 23:04:19 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Francisco Casas (@fcasas) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/248
56
tests/hlsl/for.shader_test
Normal file
56
tests/hlsl/for.shader_test
Normal file
@@ -0,0 +1,56 @@
|
||||
[vertex shader]
|
||||
void main(out float tex : texcoord, inout float4 pos : sv_position)
|
||||
{
|
||||
tex = pos.x;
|
||||
}
|
||||
|
||||
[pixel shader todo]
|
||||
float4 main(float tex : texcoord) : sv_target
|
||||
{
|
||||
int i;
|
||||
float x = 0.0;
|
||||
[unroll] 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)
|
||||
|
||||
[pixel shader]
|
||||
float4 main(float tex : texcoord) : sv_target
|
||||
{
|
||||
int i;
|
||||
float x = 0.0;
|
||||
[unroll] [attr1] for (i = 0; i < 10; i++)
|
||||
{
|
||||
x += i;
|
||||
}
|
||||
return float4(i, x, 0.0, 0.0);
|
||||
}
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
probe all rgba (10.0, 45.0, 0.0, 0.0)
|
||||
|
||||
[pixel shader fail]
|
||||
float4 main(float tex : texcoord) : sv_target
|
||||
{
|
||||
int i;
|
||||
float x = 0.0;
|
||||
[unroll] [unroll] for (i = 0; i < 10; i++)
|
||||
{
|
||||
x += i;
|
||||
}
|
||||
return float4(i, x, 0.0, 0.0);
|
||||
}
|
Reference in New Issue
Block a user