From ff50bfc95e0db4df36950539772962ca202ad909 Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 27 Jan 2020 18:16:57 +0000 Subject: [PATCH] Use correct command list when doing manual clears for D3D12 render pass --- renderdoc/driver/d3d12/d3d12_command_list4_wrap.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/renderdoc/driver/d3d12/d3d12_command_list4_wrap.cpp b/renderdoc/driver/d3d12/d3d12_command_list4_wrap.cpp index 0962886cf..19daddf21 100644 --- a/renderdoc/driver/d3d12/d3d12_command_list4_wrap.cpp +++ b/renderdoc/driver/d3d12/d3d12_command_list4_wrap.cpp @@ -183,7 +183,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_BeginRenderPass( { if(pRenderTargets[i].BeginningAccess.Type == D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_CLEAR) { - Unwrap(m_Cmd->RerecordCmdList(m_Cmd->m_LastCmdListID)) + Unwrap(pCommandList) ->ClearRenderTargetView(pRenderTargets[i].cpuDescriptor, pRenderTargets[i].BeginningAccess.Clear.ClearValue.Color, 0, NULL); @@ -204,7 +204,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_BeginRenderPass( // we can safely read from either depth/stencil clear values because if the access // type isn't clear the corresponding flag will be unset - so whatever garbage value // we have isn't used. - Unwrap(m_Cmd->RerecordCmdList(m_Cmd->m_LastCmdListID)) + Unwrap(pCommandList) ->ClearDepthStencilView( pDepthStencil->cpuDescriptor, flags, pDepthStencil->DepthBeginningAccess.Clear.ClearValue.DepthStencil.Depth,