Module: vkd3d Branch: master Commit: 865430d2b13e7043f4f88d3434559616793d90d5 URL: https://source.winehq.org/git/vkd3d.git/?a=commit;h=865430d2b13e7043f4f88d34...
Author: Józef Kucia jkucia@codeweavers.com Date: Thu Sep 13 11:26:03 2018 +0200
tests: Clear command list before uint tests in test_shader_instructions().
Avoids referencing a destroyed render target in the command list.
Signed-off-by: Józef Kucia jkucia@codeweavers.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
tests/d3d12.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/tests/d3d12.c b/tests/d3d12.c index 85e480c..808562e 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -5272,6 +5272,7 @@ static void test_shader_instructions(void) ID3D12CommandQueue *queue; unsigned int i, x, y; ID3D12Resource *cb; + HRESULT hr;
static const DWORD ps_div_code[] = { @@ -7392,6 +7393,9 @@ static void test_shader_instructions(void) D3D12_RESOURCE_STATE_COPY_SOURCE, D3D12_RESOURCE_STATE_RENDER_TARGET); }
+ hr = ID3D12GraphicsCommandList_Close(command_list); + ok(hr == S_OK, "Failed to close command list, hr %#x.\n", hr); + reset_command_list(command_list, context.allocator); ID3D12Resource_Release(context.render_target); desc.rt_format = DXGI_FORMAT_R32G32B32A32_UINT; create_render_target(&context, &desc, &context.render_target, &context.rtv);