tests: Specify the arguments to "probe rect" as right and bottom, instead of width and height.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2022-04-07 18:58:15 -05:00 committed by Alexandre Julliard
parent 83a3de8529
commit d2872fa33a
2 changed files with 8 additions and 8 deletions

View File

@ -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)

View File

@ -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))