Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- tests/shader_runner.c | 2 +- tests/shader_runner.h | 2 +- tests/shader_runner_d3d11.c | 6 +++--- tests/shader_runner_d3d12.c | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/tests/shader_runner.c b/tests/shader_runner.c index b564a8a59..04819c7d3 100644 --- a/tests/shader_runner.c +++ b/tests/shader_runner.c @@ -334,7 +334,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_quad(runner); + runner->ops->draw(runner, 3); } else if (match_string(line, "probe all rgba", &line)) { diff --git a/tests/shader_runner.h b/tests/shader_runner.h index dd692b5c6..7e29873c4 100644 --- a/tests/shader_runner.h +++ b/tests/shader_runner.h @@ -112,7 +112,7 @@ struct shader_runner_ops { 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_quad)(struct shader_runner *runner); + void (*draw)(struct shader_runner *runner, unsigned int vertex_count); void (*probe_vec4)(struct shader_runner *runner, const RECT *rect, const struct vec4 *v, unsigned int ulps); };
diff --git a/tests/shader_runner_d3d11.c b/tests/shader_runner_d3d11.c index 5b20d22d8..f2181ffc0 100644 --- a/tests/shader_runner_d3d11.c +++ b/tests/shader_runner_d3d11.c @@ -423,7 +423,7 @@ static void d3d11_runner_destroy_resource(struct shader_runner *r, struct resour free(resource); }
-static void d3d11_runner_draw_quad(struct shader_runner *r) +static void d3d11_runner_draw(struct shader_runner *r, unsigned int vertex_count) { struct d3d11_shader_runner *runner = d3d11_shader_runner(r); ID3D11DeviceContext *context = runner->immediate_context; @@ -529,7 +529,7 @@ static void d3d11_runner_draw_quad(struct shader_runner *r) ID3D11DeviceContext_VSSetShader(context, vs, NULL, 0); ID3D11DeviceContext_PSSetShader(context, ps, NULL, 0);
- ID3D11DeviceContext_Draw(context, 3, 0); + ID3D11DeviceContext_Draw(context, vertex_count, 0);
ID3D11PixelShader_Release(ps); ID3D11VertexShader_Release(vs); @@ -611,7 +611,7 @@ static const struct shader_runner_ops d3d11_runner_ops = { .create_resource = d3d11_runner_create_resource, .destroy_resource = d3d11_runner_destroy_resource, - .draw_quad = d3d11_runner_draw_quad, + .draw = d3d11_runner_draw, .probe_vec4 = d3d11_runner_probe_vec4, };
diff --git a/tests/shader_runner_d3d12.c b/tests/shader_runner_d3d12.c index 588964b5b..2dda6a75b 100644 --- a/tests/shader_runner_d3d12.c +++ b/tests/shader_runner_d3d12.c @@ -132,7 +132,7 @@ static void d3d12_runner_destroy_resource(struct shader_runner *r, struct resour free(resource); }
-static void d3d12_runner_draw_quad(struct shader_runner *r) +static void d3d12_runner_draw(struct shader_runner *r, unsigned int vertex_count) { struct d3d12_shader_runner *runner = d3d12_shader_runner(r); struct test_context *test_context = &runner->test_context; @@ -294,7 +294,7 @@ static void d3d12_runner_draw_quad(struct shader_runner *r) ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST); ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, test_context->rtv, clear_color, 0, NULL); ID3D12GraphicsCommandList_SetPipelineState(command_list, pso); - ID3D12GraphicsCommandList_DrawInstanced(command_list, 3, 1, 0, 0); + ID3D12GraphicsCommandList_DrawInstanced(command_list, vertex_count, 1, 0, 0); transition_resource_state(command_list, test_context->render_target, D3D12_RESOURCE_STATE_RENDER_TARGET, D3D12_RESOURCE_STATE_COPY_SOURCE);
@@ -324,7 +324,7 @@ static const struct shader_runner_ops d3d12_runner_ops = { .create_resource = d3d12_runner_create_resource, .destroy_resource = d3d12_runner_destroy_resource, - .draw_quad = d3d12_runner_draw_quad, + .draw = d3d12_runner_draw, .probe_vec4 = d3d12_runner_probe_vec4, };