Philip Rebohle : tests: Test bindings after changing root signature.

Alexandre Julliard julliard at winehq.org
Thu Oct 31 16:35:08 CDT 2019


Module: vkd3d
Branch: master
Commit: 1707042e624f9598d3bf3b87356f0d32be892f00
URL:    https://source.winehq.org/git/vkd3d.git/?a=commit;h=1707042e624f9598d3bf3b87356f0d32be892f00

Author: Philip Rebohle <philip.rebohle at tu-dortmund.de>
Date:   Wed Oct 30 19:34:12 2019 +0100

tests: Test bindings after changing root signature.

Signed-off-by: Philip Rebohle <philip.rebohle at tu-dortmund.de>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 tests/d3d12.c | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/tests/d3d12.c b/tests/d3d12.c
index 2ec74a1..999e22c 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);




More information about the wine-cvs mailing list