diff --git a/src/util/d3d12_texture.cpp b/src/util/d3d12_texture.cpp index 48600f7ac..19d21c116 100644 --- a/src/util/d3d12_texture.cpp +++ b/src/util/d3d12_texture.cpp @@ -553,7 +553,8 @@ void D3D12Texture::CommitClear() return; D3D12Device& dev = D3D12Device::GetInstance(); - dev.EndRenderPass(); + if (dev.InRenderPass()) + dev.EndRenderPass(); ActuallyCommitClear(dev.GetCommandList()); }