瀏覽代碼

libobs-d3d11: Unbind framebuffer before Present

D3D debug layer would INFO spam about RTV0 unbind for FLIP chains.
jpark37 3 年之前
父節點
當前提交
2d0e312b30
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      libobs-d3d11/d3d11-subsystem.cpp

+ 3 - 0
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 ||