From 2d0e312b304f42cea652e6f8d9e70070afa74f1c Mon Sep 17 00:00:00 2001 From: jpark37 Date: Wed, 17 Aug 2022 22:00:36 -0700 Subject: [PATCH] libobs-d3d11: Unbind framebuffer before Present D3D debug layer would INFO spam about RTV0 unbind for FLIP chains. --- libobs-d3d11/d3d11-subsystem.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libobs-d3d11/d3d11-subsystem.cpp b/libobs-d3d11/d3d11-subsystem.cpp index e3a35e7e4..ed4033a21 100644 --- a/libobs-d3d11/d3d11-subsystem.cpp +++ b/libobs-d3d11/d3d11-subsystem.cpp @@ -2362,6 +2362,9 @@ void device_present(gs_device_t *device) { gs_swap_chain *const curSwapChain = device->curSwapChain; if (curSwapChain) { + device->context->OMSetRenderTargets(0, nullptr, nullptr); + device->curFramebufferInvalidate = true; + const UINT interval = curSwapChain->hWaitable ? 1 : 0; const HRESULT hr = curSwapChain->swap->Present(interval, 0); if (hr == DXGI_ERROR_DEVICE_REMOVED ||