Francisco Casas : tests: Add tests for assignments to self with swizzles.
Module: vkd3d Branch: master Commit: edf86b2248318c4359acc242b7d82874d3384b76 URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/edf86b2248318c4359acc242b7d828... Author: Francisco Casas <fcasas(a)codeweavers.com> Date: Fri Jan 6 17:33:08 2023 -0300 tests: Add tests for assignments to self with swizzles. --- tests/swizzles.shader_test | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/tests/swizzles.shader_test b/tests/swizzles.shader_test index 4bc8bc87..c3d3343f 100644 --- a/tests/swizzles.shader_test +++ b/tests/swizzles.shader_test @@ -135,3 +135,36 @@ float4 main() : sv_target [test] draw quad probe all rgba (1.0, 2.0, 3.0, 3.0) + + +[pixel shader] +uniform float4 color; + +float4 main() : sv_target +{ + float4 ret = color; + ret.xyzw = ret.xyzw; // Assignment to self. + return ret; +} + +[test] +uniform 0 float4 1.0 2.0 3.0 4.0 +draw quad +probe all rgba (1.0, 2.0, 3.0, 4.0) + + +[pixel shader] +uniform float4 color; + +float4 main() : sv_target +{ + float4 ret = color; + ret.xyzw = ret.wxyz; // Assignment to self, shifted. + ret.xy = ret.yx; + return ret; +} + +[test] +uniform 0 float4 1.0 2.0 3.0 4.0 +draw quad +probe all rgba (1.0, 4.0, 2.0, 3.0)
participants (1)
-
Alexandre Julliard