Module: vkd3d Branch: master Commit: 1f4056125de3622732f0546ec852d39ee5e0ee4f URL: https://source.winehq.org/git/vkd3d.git/?a=commit;h=1f4056125de3622732f0546e... Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Mon Mar 7 19:55:43 2022 -0600 tests: Avoid using non-float uniforms where possible. SM1 encodes these differently. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tests/hlsl-vector-indexing-uniform.shader_test | 4 ++-- tests/round.shader_test | 7 ++++--- tests/saturate.shader_test | 7 ++++--- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/tests/hlsl-vector-indexing-uniform.shader_test b/tests/hlsl-vector-indexing-uniform.shader_test index 26a45879..e5ffbdd0 100644 --- a/tests/hlsl-vector-indexing-uniform.shader_test +++ b/tests/hlsl-vector-indexing-uniform.shader_test @@ -1,7 +1,7 @@ % Use a uniform to prevent the compiler from optimizing. [pixel shader] -uniform int i; +uniform float i; float4 main() : SV_TARGET { float4 color = float4(0.5, 0.4, 0.3, 0.2); @@ -11,6 +11,6 @@ float4 main() : SV_TARGET } [test] -uniform 0 uint 2 +uniform 0 float 2 draw quad probe all rgba (0.5, 0.3, 0.8, 0.2) diff --git a/tests/round.shader_test b/tests/round.shader_test index 59ac62d5..5e40dc6d 100644 --- a/tests/round.shader_test +++ b/tests/round.shader_test @@ -28,12 +28,13 @@ probe all rgba (-7.0, 8.0, 0.0, 3.0) 4 [pixel shader] -float4 main(uniform int4 u) : sv_target +float4 main(uniform float4 u) : sv_target { - return round(u); + int4 i = u; + return round(i); } [test] -uniform 0 int4 -1 0 2 10 +uniform 0 float4 -1 0 2 10 draw quad probe all rgba (-1.0, 0.0, 2.0, 10.0) 4 diff --git a/tests/saturate.shader_test b/tests/saturate.shader_test index e99df5b3..41ccc62a 100644 --- a/tests/saturate.shader_test +++ b/tests/saturate.shader_test @@ -10,12 +10,13 @@ draw quad probe all rgba (0.7, 0.0, 1.0, 0.0) [pixel shader] -float4 main(uniform int4 u) : sv_target +float4 main(uniform float4 u) : sv_target { - return saturate(u); + int4 i = u; + return saturate(i); } [test] -uniform 0 int4 -2 0 2 -1 +uniform 0 float4 -2 0 2 -1 draw quad probe all rgba (0.0, 0.0, 1.0, 0.0)