mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
tests: Specify the primitive type 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
492cd135e3
commit
c7623262cc
@ -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(runner, 3);
|
||||
runner->ops->draw(runner, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST, 3);
|
||||
}
|
||||
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);
|
||||
void (*destroy_resource)(struct shader_runner *runner, struct resource *resource);
|
||||
void (*draw)(struct shader_runner *runner, unsigned int vertex_count);
|
||||
void (*draw)(struct shader_runner *runner, D3D_PRIMITIVE_TOPOLOGY primitive_topology, unsigned int vertex_count);
|
||||
void (*probe_vec4)(struct shader_runner *runner, const RECT *rect, const struct vec4 *v, unsigned int ulps);
|
||||
};
|
||||
|
||||
|
@ -423,7 +423,8 @@ static void d3d11_runner_destroy_resource(struct shader_runner *r, struct resour
|
||||
free(resource);
|
||||
}
|
||||
|
||||
static void d3d11_runner_draw(struct shader_runner *r, unsigned int vertex_count)
|
||||
static void d3d11_runner_draw(struct shader_runner *r,
|
||||
D3D_PRIMITIVE_TOPOLOGY primitive_topology, unsigned int vertex_count)
|
||||
{
|
||||
struct d3d11_shader_runner *runner = d3d11_shader_runner(r);
|
||||
ID3D11DeviceContext *context = runner->immediate_context;
|
||||
@ -525,7 +526,7 @@ static void d3d11_runner_draw(struct shader_runner *r, unsigned int vertex_count
|
||||
ID3D11InputLayout_Release(input_layout);
|
||||
}
|
||||
|
||||
ID3D11DeviceContext_IASetPrimitiveTopology(context, D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
|
||||
ID3D11DeviceContext_IASetPrimitiveTopology(context, primitive_topology);
|
||||
ID3D11DeviceContext_VSSetShader(context, vs, NULL, 0);
|
||||
ID3D11DeviceContext_PSSetShader(context, ps, NULL, 0);
|
||||
|
||||
|
@ -132,7 +132,8 @@ static void d3d12_runner_destroy_resource(struct shader_runner *r, struct resour
|
||||
free(resource);
|
||||
}
|
||||
|
||||
static void d3d12_runner_draw(struct shader_runner *r, unsigned int vertex_count)
|
||||
static void d3d12_runner_draw(struct shader_runner *r,
|
||||
D3D_PRIMITIVE_TOPOLOGY primitive_topology, unsigned int vertex_count)
|
||||
{
|
||||
struct d3d12_shader_runner *runner = d3d12_shader_runner(r);
|
||||
struct test_context *test_context = &runner->test_context;
|
||||
@ -291,7 +292,7 @@ static void d3d12_runner_draw(struct shader_runner *r, unsigned int vertex_count
|
||||
ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &test_context->rtv, false, NULL);
|
||||
ID3D12GraphicsCommandList_RSSetScissorRects(command_list, 1, &test_context->scissor_rect);
|
||||
ID3D12GraphicsCommandList_RSSetViewports(command_list, 1, &test_context->viewport);
|
||||
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
|
||||
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, primitive_topology);
|
||||
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, test_context->rtv, clear_color, 0, NULL);
|
||||
ID3D12GraphicsCommandList_SetPipelineState(command_list, pso);
|
||||
ID3D12GraphicsCommandList_DrawInstanced(command_list, vertex_count, 1, 0, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user