From 92e3c21bafde4f035f4e79ca35338e95338a0e31 Mon Sep 17 00:00:00 2001 From: baldurk Date: Tue, 19 Oct 2021 17:05:30 +0100 Subject: [PATCH] Always set pipeline state on D3D12 on all types of command buffer * Notably this meant the pipeline state wasn't bound on compute-only command buffers --- renderdoc/driver/d3d12/d3d12_state.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/renderdoc/driver/d3d12/d3d12_state.cpp b/renderdoc/driver/d3d12/d3d12_state.cpp index 23eb8c4ec..e56ace9ac 100644 --- a/renderdoc/driver/d3d12/d3d12_state.cpp +++ b/renderdoc/driver/d3d12/d3d12_state.cpp @@ -50,11 +50,11 @@ void D3D12RenderState::ApplyState(WrappedID3D12Device *dev, ID3D12GraphicsComman { D3D12_COMMAND_LIST_TYPE type = cmd->GetType(); + if(pipe != ResourceId()) + cmd->SetPipelineState(GetResourceManager()->GetCurrentAs(pipe)); + if(type == D3D12_COMMAND_LIST_TYPE_DIRECT || type == D3D12_COMMAND_LIST_TYPE_BUNDLE) { - if(pipe != ResourceId()) - cmd->SetPipelineState(GetResourceManager()->GetCurrentAs(pipe)); - if(!views.empty()) cmd->RSSetViewports((UINT)views.size(), &views[0]);