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:
Zebediah Figura 2020-10-03 16:24:23 -05:00 committed by Alexandre Julliard
parent ec6fe1cc9d
commit ce7c964935
2 changed files with 25 additions and 0 deletions

View File

@ -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 \

View 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