diff options
author | Philip Rebohle <philip.rebohle@tu-dortmund.de> | 2019-10-30 21:34:12 +0300 |
---|---|---|
committer | Alexandre Julliard <julliard@winehq.org> | 2019-10-31 21:24:24 +0300 |
commit | 1707042e624f9598d3bf3b87356f0d32be892f00 (patch) | |
tree | 2ac833c22d3942c25afe639de8bcd79357066f02 | |
parent | 8cb42d6971ad59f74ceba15096283c7c4126b146 (diff) |
tests: Test bindings after changing root signature.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
-rw-r--r-- | tests/d3d12.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/d3d12.c b/tests/d3d12.c index 2ec74a1e..999e22cc 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -16496,6 +16496,36 @@ static void test_update_descriptor_tables_after_root_signature_change(void) D3D12_RESOURCE_STATE_RENDER_TARGET, D3D12_RESOURCE_STATE_COPY_SOURCE); check_sub_resource_uint(context.render_target, 0, queue, command_list, 0xff00ff00, 0); + reset_command_list(command_list, context.allocator); + transition_resource_state(command_list, context.render_target, + D3D12_RESOURCE_STATE_COPY_SOURCE, D3D12_RESOURCE_STATE_RENDER_TARGET); + + ID3D12GraphicsCommandList_SetDescriptorHeaps(command_list, ARRAY_SIZE(heaps), heaps); + + ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL); + + ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL); + ID3D12GraphicsCommandList_SetPipelineState(command_list, pipeline_state2); + ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, root_signature2); + + ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST); + ID3D12GraphicsCommandList_RSSetViewports(command_list, 1, &context.viewport); + ID3D12GraphicsCommandList_RSSetScissorRects(command_list, 1, &context.scissor_rect); + + ID3D12GraphicsCommandList_SetGraphicsRootDescriptorTable(command_list, 0, + get_gpu_descriptor_handle(&context, heap, 0)); + ID3D12GraphicsCommandList_SetGraphicsRootDescriptorTable(command_list, 1, + ID3D12DescriptorHeap_GetGPUDescriptorHandleForHeapStart(sampler_heap)); + + ID3D12GraphicsCommandList_SetPipelineState(command_list, pipeline_state); + ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, root_signature); + + ID3D12GraphicsCommandList_DrawInstanced(command_list, 3, 1, 0, 0); + + transition_resource_state(command_list, context.render_target, + D3D12_RESOURCE_STATE_RENDER_TARGET, D3D12_RESOURCE_STATE_COPY_SOURCE); + check_sub_resource_uint(context.render_target, 0, queue, command_list, 0xff00ff00, 0); + ID3D12PipelineState_Release(pipeline_state); ID3D12PipelineState_Release(pipeline_state2); ID3D12RootSignature_Release(root_signature); |