Nikolay Sivov : tests: Simplify conditional test.
Module: vkd3d Branch: master Commit: a064009d3b3926b66a10a25a635f76e3fbe4ed5e URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/a064009d3b3926b66a10a25a635f76... Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sun May 7 22:02:03 2023 +0200 tests: Simplify conditional test. --- tests/conditional.shader_test | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/tests/conditional.shader_test b/tests/conditional.shader_test index 42307777..d83596fc 100644 --- a/tests/conditional.shader_test +++ b/tests/conditional.shader_test @@ -1,19 +1,16 @@ -[vertex shader] -void main(out float tex : texcoord, inout float4 pos : sv_position) -{ - tex = pos.x; -} - [pixel shader] -float4 main(float tex : texcoord) : SV_TARGET +float4 main(uniform float4 u) : sv_target { - if (tex > 0.0) + if (u.x > 0.0) return float4(0.1, 0.2, 0.3, 0.4); else return float4(0.9, 0.8, 0.7, 0.6); } [test] +uniform 0 float4 0.0 0.0 0.0 0.0 +draw quad +probe all rgba (0.9, 0.8, 0.7, 0.6) +uniform 0 float4 0.1 0.0 0.0 0.0 draw quad -probe ( 0, 0, 319, 480) rgba (0.9, 0.8, 0.7, 0.6) -probe (321, 0, 640, 480) rgba (0.1, 0.2, 0.3, 0.4) +probe all rgba (0.1, 0.2, 0.3, 0.4)
participants (1)
-
Alexandre Julliard