mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
tests: Test multiple variable initializers.
This commit is contained in:
parent
d8e6a1066d
commit
396edae281
Notes:
Alexandre Julliard
2023-07-04 23:25:04 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Zebediah Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/250
@ -98,6 +98,7 @@ vkd3d_shader_tests = \
|
||||
tests/hlsl/initializer-invalid-arg-count.shader_test \
|
||||
tests/hlsl/initializer-local-array.shader_test \
|
||||
tests/hlsl/initializer-matrix.shader_test \
|
||||
tests/hlsl/initializer-multi.shader_test \
|
||||
tests/hlsl/initializer-nested.shader_test \
|
||||
tests/hlsl/initializer-numeric.shader_test \
|
||||
tests/hlsl/initializer-objects.shader_test \
|
||||
|
52
tests/hlsl/initializer-multi.shader_test
Normal file
52
tests/hlsl/initializer-multi.shader_test
Normal file
@ -0,0 +1,52 @@
|
||||
[pixel shader todo]
|
||||
float4 main() : sv_target
|
||||
{
|
||||
float a = 2.0, b = a + 1.0, c = b;
|
||||
|
||||
return float4(a, b, c, 0);
|
||||
}
|
||||
|
||||
[test]
|
||||
todo draw quad
|
||||
probe all rgba (2, 3, 3, 0)
|
||||
|
||||
|
||||
[pixel shader fail]
|
||||
float4 main() : sv_target
|
||||
{
|
||||
float a = 2.0, b = c + 1.0, c = b;
|
||||
|
||||
return float4(0);
|
||||
}
|
||||
|
||||
|
||||
[pixel shader todo]
|
||||
float4 main() : sv_target
|
||||
{
|
||||
struct apple {
|
||||
float a;
|
||||
int b;
|
||||
} apple1 = {7.2, 8.1}, apple2 = apple1;
|
||||
|
||||
return float4(apple1.a, apple1.b, apple2.a, apple2.b);
|
||||
}
|
||||
|
||||
[test]
|
||||
todo draw quad
|
||||
probe all rgba (7.2, 8.0, 7.2, 8.0)
|
||||
|
||||
|
||||
[pixel shader todo]
|
||||
float4 main() : sv_target
|
||||
{
|
||||
struct apple {
|
||||
float a;
|
||||
int b;
|
||||
} apple1 = {5.2, 9.1}, apples[2] = {apple1, apple1};
|
||||
|
||||
return float4(apples[0].a, apples[0].b, apples[1].a, apples[1].b);
|
||||
}
|
||||
|
||||
[test]
|
||||
todo draw quad
|
||||
probe all rgba (5.2, 9.0, 5.2, 9.0)
|
Loading…
Reference in New Issue
Block a user