mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
tests: Specify the vertex count from the shader runner frontend.
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
84c73f82f7
commit
492cd135e3
@ -334,7 +334,7 @@ static void parse_test_directive(struct shader_runner *runner, const char *line)
|
|||||||
if (!runner->vs_source)
|
if (!runner->vs_source)
|
||||||
runner->vs_source = strdup(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))
|
else if (match_string(line, "probe all rgba", &line))
|
||||||
{
|
{
|
||||||
|
@ -112,7 +112,7 @@ struct shader_runner_ops
|
|||||||
{
|
{
|
||||||
struct resource *(*create_resource)(struct shader_runner *runner, const struct resource_params *params);
|
struct resource *(*create_resource)(struct shader_runner *runner, const struct resource_params *params);
|
||||||
void (*destroy_resource)(struct shader_runner *runner, struct resource *resource);
|
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);
|
void (*probe_vec4)(struct shader_runner *runner, const RECT *rect, const struct vec4 *v, unsigned int ulps);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -423,7 +423,7 @@ static void d3d11_runner_destroy_resource(struct shader_runner *r, struct resour
|
|||||||
free(resource);
|
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);
|
struct d3d11_shader_runner *runner = d3d11_shader_runner(r);
|
||||||
ID3D11DeviceContext *context = runner->immediate_context;
|
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_VSSetShader(context, vs, NULL, 0);
|
||||||
ID3D11DeviceContext_PSSetShader(context, ps, NULL, 0);
|
ID3D11DeviceContext_PSSetShader(context, ps, NULL, 0);
|
||||||
|
|
||||||
ID3D11DeviceContext_Draw(context, 3, 0);
|
ID3D11DeviceContext_Draw(context, vertex_count, 0);
|
||||||
|
|
||||||
ID3D11PixelShader_Release(ps);
|
ID3D11PixelShader_Release(ps);
|
||||||
ID3D11VertexShader_Release(vs);
|
ID3D11VertexShader_Release(vs);
|
||||||
@ -611,7 +611,7 @@ static const struct shader_runner_ops d3d11_runner_ops =
|
|||||||
{
|
{
|
||||||
.create_resource = d3d11_runner_create_resource,
|
.create_resource = d3d11_runner_create_resource,
|
||||||
.destroy_resource = d3d11_runner_destroy_resource,
|
.destroy_resource = d3d11_runner_destroy_resource,
|
||||||
.draw_quad = d3d11_runner_draw_quad,
|
.draw = d3d11_runner_draw,
|
||||||
.probe_vec4 = d3d11_runner_probe_vec4,
|
.probe_vec4 = d3d11_runner_probe_vec4,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -132,7 +132,7 @@ static void d3d12_runner_destroy_resource(struct shader_runner *r, struct resour
|
|||||||
free(resource);
|
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 d3d12_shader_runner *runner = d3d12_shader_runner(r);
|
||||||
struct test_context *test_context = &runner->test_context;
|
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_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
|
||||||
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, test_context->rtv, clear_color, 0, NULL);
|
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, test_context->rtv, clear_color, 0, NULL);
|
||||||
ID3D12GraphicsCommandList_SetPipelineState(command_list, pso);
|
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,
|
transition_resource_state(command_list, test_context->render_target,
|
||||||
D3D12_RESOURCE_STATE_RENDER_TARGET, D3D12_RESOURCE_STATE_COPY_SOURCE);
|
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,
|
.create_resource = d3d12_runner_create_resource,
|
||||||
.destroy_resource = d3d12_runner_destroy_resource,
|
.destroy_resource = d3d12_runner_destroy_resource,
|
||||||
.draw_quad = d3d12_runner_draw_quad,
|
.draw = d3d12_runner_draw,
|
||||||
.probe_vec4 = d3d12_runner_probe_vec4,
|
.probe_vec4 = d3d12_runner_probe_vec4,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user