Module: vkd3d Branch: master Commit: dd2168754d7c5ad28c3958114df54326a5f944c1 URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/dd2168754d7c5ad28c3958114df543...
Author: Francisco Casas fcasas@codeweavers.com Date: Wed Jan 4 19:41:51 2023 -0300
tests: Combine all the swizzle tests in a single file.
---
Makefile.am | 9 +--- tests/swizzle-0.shader_test | 15 ------ tests/swizzle-1.shader_test | 11 ----- tests/swizzle-2.shader_test | 11 ----- tests/swizzle-3.shader_test | 14 ------ tests/swizzle-4.shader_test | 13 ------ tests/swizzle-5.shader_test | 10 ---- tests/swizzle-6.shader_test | 12 ----- tests/swizzle-7.shader_test | 11 ----- tests/swizzles.shader_test | 111 ++++++++++++++++++++++++++++++++++++++++++++ 10 files changed, 112 insertions(+), 105 deletions(-)
diff --git a/Makefile.am b/Makefile.am index b237b4af..0b4c2a55 100644 --- a/Makefile.am +++ b/Makefile.am @@ -135,15 +135,8 @@ vkd3d_shader_tests = \ tests/shader-interstage-interface.shader_test \ tests/sqrt.shader_test \ tests/step.shader_test \ - tests/swizzle-0.shader_test \ - tests/swizzle-1.shader_test \ - tests/swizzle-2.shader_test \ - tests/swizzle-3.shader_test \ - tests/swizzle-4.shader_test \ - tests/swizzle-5.shader_test \ - tests/swizzle-6.shader_test \ - tests/swizzle-7.shader_test \ tests/swizzle-constant-prop.shader_test \ + tests/swizzles.shader_test \ tests/texture-load.shader_test \ tests/texture-load-offset.shader_test \ tests/texture-load-typed.shader_test \ diff --git a/tests/swizzle-0.shader_test b/tests/swizzle-0.shader_test deleted file mode 100644 index 9be141cf..00000000 --- a/tests/swizzle-0.shader_test +++ /dev/null @@ -1,15 +0,0 @@ -[pixel shader] -uniform float4 color; - -float4 main() : sv_target -{ - float4 ret = color; - ret.gb = ret.ra; - ret.ra = float2(0.0101, 0.0404); - return ret; -} - -[test] -uniform 0 float4 0.0303 0.08 0.07 0.0202 -draw quad -probe all rgba (0.0101, 0.0303, 0.0202, 0.0404) diff --git a/tests/swizzle-1.shader_test b/tests/swizzle-1.shader_test deleted file mode 100644 index 40cdc010..00000000 --- a/tests/swizzle-1.shader_test +++ /dev/null @@ -1,11 +0,0 @@ -[pixel shader] -float4 main() : SV_target -{ - float4 ret = float4(0.1, 0.2, 0.3, 0.4); - ret.wyz.yx = float2(0.5, 0.6).yx; - return ret; -} - -[test] -draw quad -probe all rgba (0.1, 0.6, 0.3, 0.5) diff --git a/tests/swizzle-2.shader_test b/tests/swizzle-2.shader_test deleted file mode 100644 index b07134c6..00000000 --- a/tests/swizzle-2.shader_test +++ /dev/null @@ -1,11 +0,0 @@ -[pixel shader] -float4 main() : SV_target -{ - float4 ret; - ret.zwyx = float4(0.1, 0.2, 0.3, 0.4); - return ret; -} - -[test] -draw quad -probe all rgba (0.4, 0.3, 0.1, 0.2) diff --git a/tests/swizzle-3.shader_test b/tests/swizzle-3.shader_test deleted file mode 100644 index 1ecf5a5c..00000000 --- a/tests/swizzle-3.shader_test +++ /dev/null @@ -1,14 +0,0 @@ -[pixel shader] -float4 main() : SV_target -{ - float4 ret; - ret.yw.y = 0.1; - ret.xzy.yz.y.x = 0.2; - ret.yzwx.yzwx.wz.y = 0.3; - ret.zxy.xyz.zxy.xy.y = 0.4; - return ret; -} - -[test] -draw quad -probe all rgba (0.3, 0.2, 0.4, 0.1) diff --git a/tests/swizzle-4.shader_test b/tests/swizzle-4.shader_test deleted file mode 100644 index c09fa515..00000000 --- a/tests/swizzle-4.shader_test +++ /dev/null @@ -1,13 +0,0 @@ -[pixel shader] -float4 main() : SV_target -{ - float4 ret; - ret.yxz.yx = float2(0.1, 0.2); - ret.w.x = 0.3; - ret.wzyx.zyx.yx.x = 0.4; - return ret; -} - -[test] -draw quad -probe all rgba (0.1, 0.2, 0.4, 0.3) diff --git a/tests/swizzle-5.shader_test b/tests/swizzle-5.shader_test deleted file mode 100644 index 5a3ee1db..00000000 --- a/tests/swizzle-5.shader_test +++ /dev/null @@ -1,10 +0,0 @@ -[pixel shader] -float4 main() : SV_target -{ - float4 ret = float4(0.1, 0.2, 0.3, 0.4).ywxz.zyyz; - return ret; -} - -[test] -draw quad -probe all rgba (0.1, 0.4, 0.4, 0.1) diff --git a/tests/swizzle-6.shader_test b/tests/swizzle-6.shader_test deleted file mode 100644 index 04251c65..00000000 --- a/tests/swizzle-6.shader_test +++ /dev/null @@ -1,12 +0,0 @@ -[pixel shader] -float4 main() : SV_target -{ - float4 ret = float4(0.1, 0.2, 0.3, 0.4); - ret.yxwz = ret; - ret = ret.wyzx; - return ret; -} - -[test] -draw quad -probe all rgba (0.3, 0.1, 0.4, 0.2) diff --git a/tests/swizzle-7.shader_test b/tests/swizzle-7.shader_test deleted file mode 100644 index 15a4cd07..00000000 --- a/tests/swizzle-7.shader_test +++ /dev/null @@ -1,11 +0,0 @@ -[pixel shader] -float4 main() : SV_target -{ - float4 ret; - ret.xyzw.xyzw = float4(0.1, 0.2, 0.3, 0.4); - return ret; -} - -[test] -draw quad -probe all rgba (0.1, 0.2, 0.3, 0.4) diff --git a/tests/swizzles.shader_test b/tests/swizzles.shader_test new file mode 100644 index 00000000..caf8377e --- /dev/null +++ b/tests/swizzles.shader_test @@ -0,0 +1,111 @@ +[pixel shader] +uniform float4 color; + +float4 main() : sv_target +{ + float4 ret = color; + ret.gb = ret.ra; + ret.ra = float2(0.0101, 0.0404); + return ret; +} + +[test] +uniform 0 float4 0.0303 0.08 0.07 0.0202 +draw quad +probe all rgba (0.0101, 0.0303, 0.0202, 0.0404) + + +[pixel shader] +float4 main() : SV_target +{ + float4 ret = float4(0.1, 0.2, 0.3, 0.4); + ret.wyz.yx = float2(0.5, 0.6).yx; + return ret; +} + +[test] +draw quad +probe all rgba (0.1, 0.6, 0.3, 0.5) + + +[pixel shader] +float4 main() : SV_target +{ + float4 ret; + ret.zwyx = float4(0.1, 0.2, 0.3, 0.4); + return ret; +} + +[test] +draw quad +probe all rgba (0.4, 0.3, 0.1, 0.2) + + +[pixel shader] +float4 main() : SV_target +{ + float4 ret; + ret.yw.y = 0.1; + ret.xzy.yz.y.x = 0.2; + ret.yzwx.yzwx.wz.y = 0.3; + ret.zxy.xyz.zxy.xy.y = 0.4; + return ret; +} + +[test] +draw quad +probe all rgba (0.3, 0.2, 0.4, 0.1) + + +[pixel shader] +float4 main() : SV_target +{ + float4 ret; + ret.yxz.yx = float2(0.1, 0.2); + ret.w.x = 0.3; + ret.wzyx.zyx.yx.x = 0.4; + return ret; +} + +[test] +draw quad +probe all rgba (0.1, 0.2, 0.4, 0.3) + + +[pixel shader] +float4 main() : SV_target +{ + float4 ret = float4(0.1, 0.2, 0.3, 0.4).ywxz.zyyz; + return ret; +} + +[test] +draw quad +probe all rgba (0.1, 0.4, 0.4, 0.1) + + +[pixel shader] +float4 main() : SV_target +{ + float4 ret = float4(0.1, 0.2, 0.3, 0.4); + ret.yxwz = ret; + ret = ret.wyzx; + return ret; +} + +[test] +draw quad +probe all rgba (0.3, 0.1, 0.4, 0.2) + + +[pixel shader] +float4 main() : SV_target +{ + float4 ret; + ret.xyzw.xyzw = float4(0.1, 0.2, 0.3, 0.4); + return ret; +} + +[test] +draw quad +probe all rgba (0.1, 0.2, 0.3, 0.4)