From 9d7ef64dc0f326cc3ace9b2f97d464e6b9f3a4ce Mon Sep 17 00:00:00 2001 From: Francisco Casas Date: Wed, 4 Jan 2023 19:22:37 -0300 Subject: [PATCH] tests: Test swizzles on scalar values. --- tests/swizzles.shader_test | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tests/swizzles.shader_test b/tests/swizzles.shader_test index caf8377e..4bc8bc87 100644 --- a/tests/swizzles.shader_test +++ b/tests/swizzles.shader_test @@ -109,3 +109,29 @@ float4 main() : SV_target [test] draw quad probe all rgba (0.1, 0.2, 0.3, 0.4) + + +[pixel shader] +float4 main() : sv_target +{ + float f = 20; + + return f.x.x; +} + +[test] +draw quad +probe all rgba (20.0, 20.0, 20.0, 20.0) + + +[pixel shader] +float4 main() : sv_target +{ + float f = 3; + + return float4(1, 2, f.x.xx); +} + +[test] +draw quad +probe all rgba (1.0, 2.0, 3.0, 3.0)