mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
tests: Allow skipping shader tests if requirements are not met.
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:
parent
c7a7cf498d
commit
83a3de8529
@ -595,11 +595,15 @@ void run_shader_tests(struct shader_runner *runner, int argc, char **argv, const
|
||||
{
|
||||
case STATE_INPUT_LAYOUT:
|
||||
case STATE_NONE:
|
||||
case STATE_REQUIRE:
|
||||
case STATE_SAMPLER:
|
||||
case STATE_TEST:
|
||||
break;
|
||||
|
||||
case STATE_REQUIRE:
|
||||
if (runner->ops->check_requirements && !runner->ops->check_requirements(runner))
|
||||
goto out;
|
||||
break;
|
||||
|
||||
case STATE_TEXTURE:
|
||||
case STATE_VERTEX_BUFFER:
|
||||
set_resource(runner, runner->ops->create_resource(runner, ¤t_resource));
|
||||
@ -832,6 +836,7 @@ void run_shader_tests(struct shader_runner *runner, int argc, char **argv, const
|
||||
}
|
||||
}
|
||||
|
||||
out:
|
||||
for (i = 0; i < runner->input_element_count; ++i)
|
||||
free(runner->input_elements[i].name);
|
||||
free(runner->input_elements);
|
||||
|
@ -110,6 +110,9 @@ struct shader_runner
|
||||
|
||||
struct shader_runner_ops
|
||||
{
|
||||
/* Returns false if unable to run the given tests. If NULL, all tests are
|
||||
* run. */
|
||||
bool (*check_requirements)(struct shader_runner *runner);
|
||||
struct resource *(*create_resource)(struct shader_runner *runner, const struct resource_params *params);
|
||||
void (*destroy_resource)(struct shader_runner *runner, struct resource *resource);
|
||||
void (*draw)(struct shader_runner *runner, D3D_PRIMITIVE_TOPOLOGY primitive_topology, unsigned int vertex_count);
|
||||
|
Loading…
Reference in New Issue
Block a user