tests: Skip probe directives if the last render failed.

Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
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-14 12:52:32 +02:00
committed by Alexandre Julliard
parent e3f78706ec
commit 26b89cc338
6 changed files with 36 additions and 15 deletions

View File

@@ -382,7 +382,7 @@ static void parse_test_directive(struct shader_runner *runner, const char *line)
if (!runner->vs_source)
runner->vs_source = strdup(vs_source);
runner->ops->draw(runner, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST, 3);
runner->last_render_failed = !runner->ops->draw(runner, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST, 3);
}
else if (match_string(line, "draw", &line))
{
@@ -401,7 +401,7 @@ static void parse_test_directive(struct shader_runner *runner, const char *line)
if (line == rest)
fatal_error("Malformed vertex count '%s'.\n", line);
runner->ops->draw(runner, topology, vertex_count);
runner->last_render_failed = !runner->ops->draw(runner, topology, vertex_count);
}
else if (match_string(line, "probe all rgba", &line))
{
@@ -410,6 +410,9 @@ static void parse_test_directive(struct shader_runner *runner, const char *line)
struct vec4 v;
int ret;
if (runner->last_render_failed)
return;
ret = sscanf(line, "( %f , %f , %f , %f ) %u", &v.x, &v.y, &v.z, &v.w, &ulps);
if (ret < 4)
fatal_error("Malformed probe arguments '%s'.\n", line);
@@ -425,6 +428,9 @@ static void parse_test_directive(struct shader_runner *runner, const char *line)
RECT rect;
int ret;
if (runner->last_render_failed)
return;
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)
@@ -445,6 +451,9 @@ static void parse_test_directive(struct shader_runner *runner, const char *line)
RECT rect;
int ret;
if (runner->last_render_failed)
return;
ret = sscanf(line, "( %u , %u ) ( %f , %f , %f , %f ) %u", &x, &y, &v.x, &v.y, &v.z, &v.w, &ulps);
if (ret < 6)
fatal_error("Malformed probe arguments '%s'.\n", line);