tests/hlsl: Add an SV_InstanceId test.

This commit is contained in:
Conor McCarthy
2024-04-22 12:55:44 +10:00
committed by Alexandre Julliard
parent fb730b11cf
commit 0bd6083785
Notes: Alexandre Julliard 2024-04-30 23:14:55 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/814
9 changed files with 70 additions and 13 deletions

View File

@@ -494,7 +494,7 @@ static void d3d12_runner_clear(struct shader_runner *r, struct resource *resourc
}
static bool d3d12_runner_draw(struct shader_runner *r,
D3D_PRIMITIVE_TOPOLOGY primitive_topology, unsigned int vertex_count)
D3D_PRIMITIVE_TOPOLOGY primitive_topology, unsigned int vertex_count, unsigned int instance_count)
{
struct d3d12_shader_runner *runner = d3d12_shader_runner(r);
struct test_context *test_context = &runner->test_context;
@@ -676,7 +676,7 @@ static bool d3d12_runner_draw(struct shader_runner *r,
ID3D12GraphicsCommandList_RSSetViewports(command_list, 1, &test_context->viewport);
ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, primitive_topology);
ID3D12GraphicsCommandList_SetPipelineState(command_list, pso);
ID3D12GraphicsCommandList_DrawInstanced(command_list, vertex_count, 1, 0, 0);
ID3D12GraphicsCommandList_DrawInstanced(command_list, vertex_count, instance_count, 0, 0);
/* Finish the command list so that we can destroy objects. */
hr = ID3D12GraphicsCommandList_Close(command_list);