From: Giovanni Mascellani gmascellani@codeweavers.com
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- v5: Expand to bind and test all used render targets.
Makefile.am | 1 + tests/matrix-semantics.shader_test | 102 +++++++++++++++++++++++++++++ 2 files changed, 103 insertions(+) create mode 100644 tests/matrix-semantics.shader_test
diff --git a/Makefile.am b/Makefile.am index 6e827175a..bdbf8e408 100644 --- a/Makefile.am +++ b/Makefile.am @@ -108,6 +108,7 @@ vkd3d_shader_tests = \ tests/hlsl-vector-indexing-uniform.shader_test \ tests/logic-operations.shader_test \ tests/math.shader_test \ + tests/matrix-semantics.shader_test \ tests/multiple-rt.shader_test \ tests/nointerpolation.shader_test \ tests/pow.shader_test \ diff --git a/tests/matrix-semantics.shader_test b/tests/matrix-semantics.shader_test new file mode 100644 index 000000000..1be504064 --- /dev/null +++ b/tests/matrix-semantics.shader_test @@ -0,0 +1,102 @@ +[pixel shader] +float4x1 main() : sv_target +{ + return float4(1.0, 2.0, 3.0, 4.0); +} + +[test] +todo draw quad +probe all rgba (1.0, 2.0, 3.0, 4.0) + +[pixel shader] +row_major float1x4 main() : sv_target +{ + return float4(1.0, 2.0, 3.0, 4.0); +} + +[test] +todo draw quad +probe all rgba (1.0, 2.0, 3.0, 4.0) + +[require] +shader model >= 4.0 + +[render target 0] +format r32 float +size (640, 480) + +[render target 1] +format r32 float +size (640, 480) + +[render target 2] +format r32 float +size (640, 480) + +[render target 3] +format r32 float +size (640, 480) + +[pixel shader] +row_major float4x1 main() : sv_target +{ + return float4(1.0, 2.0, 3.0, 4.0); +} + +[test] +todo draw quad +probe render target 0 all r (1.0) +probe render target 1 all r (2.0) +probe render target 2 all r (3.0) +probe render target 3 all r (4.0) + +[pixel shader] +float1x4 main() : sv_target +{ + return float4(1.0, 2.0, 3.0, 4.0); +} + +[test] +todo draw quad +probe render target 0 all r (1.0) +probe render target 1 all r (2.0) +probe render target 2 all r (3.0) +probe render target 3 all r (4.0) + +[pixel shader fail todo] +void main(out float1x2 x : sv_target0, out float1x2 y : sv_target1) +{ + x = float2(1.0, 2.0); + y = float2(5.0, 6.0); +} + +[pixel shader] +void main(out float1x2 x : sv_target0, out float1x2 y : sv_target2) +{ + x = float2(1.0, 2.0); + y = float2(5.0, 6.0); +} + +[test] +todo draw quad +probe render target 0 all r (1.0) +probe render target 1 all r (2.0) +probe render target 2 all r (5.0) +probe render target 3 all r (6.0) + +[render target 0] +format r32g32b32a32 float +size (640, 480) + +[pixel shader] +void main(out row_major float1x4 x : sv_target0, out float1x2 y : sv_target1) +{ + x = float4(1.0, 2.0, 3.0, 4.0); + y = float2(5.0, 6.0); +} + +[test] +todo draw quad +probe render target 0 all rgba (1.0, 2.0, 3.0, 4.0) +probe render target 1 all r (5.0) +probe render target 2 all r (6.0)