mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
tests: Import HLSL struct assignment tests from Wine.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ec6fe1cc9d
commit
ce7c964935
@ -57,6 +57,7 @@ vkd3d_shader_tests = \
|
||||
tests/hlsl-majority-typedef.shader_test \
|
||||
tests/hlsl-return-implicit-conversion.shader_test \
|
||||
tests/hlsl-return-void.shader_test \
|
||||
tests/hlsl-struct-assignment.shader_test \
|
||||
tests/hlsl-vector-indexing.shader_test \
|
||||
tests/hlsl-vector-indexing-uniform.shader_test \
|
||||
tests/math.shader_test \
|
||||
@ -195,6 +196,7 @@ XFAIL_TESTS = \
|
||||
tests/hlsl-majority-typedef.shader_test \
|
||||
tests/hlsl-return-implicit-conversion.shader_test \
|
||||
tests/hlsl-return-void.shader_test \
|
||||
tests/hlsl-struct-assignment.shader_test \
|
||||
tests/hlsl-vector-indexing.shader_test \
|
||||
tests/hlsl-vector-indexing-uniform.shader_test \
|
||||
tests/math.shader_test \
|
||||
|
23
tests/hlsl-struct-assignment.shader_test
Normal file
23
tests/hlsl-struct-assignment.shader_test
Normal file
@ -0,0 +1,23 @@
|
||||
[pixel shader]
|
||||
struct apple
|
||||
{
|
||||
struct
|
||||
{
|
||||
float4 a;
|
||||
} m;
|
||||
float4 b;
|
||||
};
|
||||
|
||||
float4 main() : sv_target
|
||||
{
|
||||
struct apple q, r, s;
|
||||
|
||||
q.m.a = float4(0.1, 0.2, 0.3, 0.4);
|
||||
q.b = float4(0.5, 0.1, 0.4, 0.5);
|
||||
s = r = q;
|
||||
return s.m.a + s.b;
|
||||
}
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
probe all rgba (0.6, 0.3, 0.7, 0.9) 1
|
Loading…
x
Reference in New Issue
Block a user