From fe18bfa3f67c02e23fc7a46c2b3898dc79802bbc Mon Sep 17 00:00:00 2001 From: Stenzek Date: Mon, 19 Oct 2026 02:39:14 +1000 Subject: [PATCH] D3D12Device: End render pass when submitting command list Texture uploads submit when the upload buffer is full, which could happen with a render pass still open. --- src/util/d3d12_device.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/util/d3d12_device.cpp b/src/util/d3d12_device.cpp index 64c6d711d..8d9b4b98f 100644 --- a/src/util/d3d12_device.cpp +++ b/src/util/d3d12_device.cpp @@ -590,7 +590,9 @@ ID3D12GraphicsCommandList4* D3D12Device::GetInitCommandList() void D3D12Device::SubmitCommandList(bool wait_for_completion) { - DebugAssert(!InRenderPass()); + if (InRenderPass()) + EndRenderPass(); + if (m_device_was_lost) [[unlikely]] return;