[PATCH vkd3d v2 3/5] tests: Specify the arguments to "probe rect" as right and bottom, instead of width and height.
Zebediah Figura
zfigura at codeweavers.com
Thu Apr 7 18:58:15 CDT 2022
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
---
v2: New patch.
tests/conditional.shader_test | 2 +-
tests/shader_runner.c | 14 +++++++-------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/tests/conditional.shader_test b/tests/conditional.shader_test
index 70718f117..1a1b8fee5 100644
--- a/tests/conditional.shader_test
+++ b/tests/conditional.shader_test
@@ -10,4 +10,4 @@ float4 main(float4 pos : SV_POSITION) : SV_TARGET
[test]
draw quad
probe rect rgba (0, 0, 200, 480) (0.9, 0.8, 0.7, 0.6)
-probe rect rgba (200, 0, 440, 480) (0.1, 0.2, 0.3, 0.4)
+probe rect rgba (200, 0, 640, 480) (0.1, 0.2, 0.3, 0.4)
diff --git a/tests/shader_runner.c b/tests/shader_runner.c
index 05c0fbe1e..6f4c70031 100644
--- a/tests/shader_runner.c
+++ b/tests/shader_runner.c
@@ -419,22 +419,22 @@ static void parse_test_directive(struct shader_runner *runner, const char *line)
}
else if (match_string(line, "probe rect rgba", &line))
{
- unsigned int x, y, w, h, ulps;
+ unsigned int left, top, right, bottom, ulps;
struct vec4 v;
RECT rect;
int ret;
- ret = sscanf(line, "( %u , %u , %u , %u ) ( %f , %f , %f , %f ) %u",
- &x, &y, &w, &h, &v.x, &v.y, &v.z, &v.w, &ulps);
+ ret = sscanf(line, "( %d , %d , %d , %d ) ( %f , %f , %f , %f ) %u",
+ &left, &top, &right, &bottom, &v.x, &v.y, &v.z, &v.w, &ulps);
if (ret < 8)
fatal_error("Malformed probe arguments '%s'.\n", line);
if (ret < 9)
ulps = 0;
- rect.left = x;
- rect.right = x + w;
- rect.top = y;
- rect.bottom = y + h;
+ rect.left = left;
+ rect.top = top;
+ rect.right = right;
+ rect.bottom = bottom;
runner->ops->probe_vec4(runner, &rect, &v, ulps);
}
else if (match_string(line, "probe rgba", &line))
--
2.35.1
More information about the wine-devel
mailing list