Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- Makefile.am | 2 ++ tests/hlsl-struct-assignment.shader_test | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 tests/hlsl-struct-assignment.shader_test
diff --git a/Makefile.am b/Makefile.am index 415e6862..f3a5967d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 \ diff --git a/tests/hlsl-struct-assignment.shader_test b/tests/hlsl-struct-assignment.shader_test new file mode 100644 index 00000000..ea55b9ad --- /dev/null +++ b/tests/hlsl-struct-assignment.shader_test @@ -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