tests/shader_runner: Move the check_readback_data_vec4() call to shader_runner.c.

Split the probe_vec4() directive into get_rt_readback() and release_readback().

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Giovanni Mascellani <gmascellani@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-05-17 15:45:41 +02:00
committed by Alexandre Julliard
parent e6ea409bbf
commit 4a9d675c49
6 changed files with 74 additions and 51 deletions

View File

@@ -412,6 +412,7 @@ static void parse_test_directive(struct shader_runner *runner, const char *line)
else if (match_string(line, "probe", &line))
{
unsigned int left, top, right, bottom, ulps;
struct resource_readback *rb;
struct vec4 v;
int ret, len;
RECT rect;
@@ -433,6 +434,10 @@ static void parse_test_directive(struct shader_runner *runner, const char *line)
set_rect(&rect, left, top, left + 1, top + 1);
line += len;
}
else
{
fatal_error("Malformed probe arguments '%s'.\n", line);
}
if (!match_string(line, "rgba", &line))
fatal_error("Malformed probe arguments '%s'.\n", line);
@@ -443,7 +448,9 @@ static void parse_test_directive(struct shader_runner *runner, const char *line)
if (ret < 5)
ulps = 0;
runner->ops->probe_vec4(runner, &rect, &v, ulps);
rb = runner->ops->get_rt_readback(runner);
todo_if(runner->is_todo) check_readback_data_vec4(rb, &rect, &v, ulps);
runner->ops->release_readback(runner, rb);
}
else if (match_string(line, "uniform", &line))
{