diff --git a/src/debug_renderdoc.cpp b/src/debug_renderdoc.cpp index 8c81ec9a1..202d3bd9b 100644 --- a/src/debug_renderdoc.cpp +++ b/src/debug_renderdoc.cpp @@ -70,7 +70,7 @@ namespace bgfx s_renderDoc->SetCaptureKeys(captureKeys, BX_COUNTOF(captureKeys) ); s_renderDoc->SetCaptureOptionU32(eRENDERDOC_Option_AllowVSync, 1); - s_renderDoc->SetCaptureOptionU32(eRENDERDOC_Option_APIValidation, 1); + s_renderDoc->SetCaptureOptionU32(eRENDERDOC_Option_APIValidation, 0); s_renderDoc->MaskOverlayBits(eRENDERDOC_Overlay_None, eRENDERDOC_Overlay_None); diff --git a/src/renderer_d3d12.cpp b/src/renderer_d3d12.cpp index 343a5265b..b0de16695 100644 --- a/src/renderer_d3d12.cpp +++ b/src/renderer_d3d12.cpp @@ -925,7 +925,18 @@ namespace bgfx { namespace d3d12 // Setting SetEnableSynchronizedCommandQueueValidation below to false avoids the bug // It was fixed in (probably) the first windows 11 sdk, 22000 // However, the fix causes any dx12 context with validation to break if this is set to false, so we can't do that anymore - if (windowsVersionIs(Condition::GreaterEqual, 0x0A00, 22000) ) + const bool graphicsDebugger = false + || NULL != m_renderDocDll + || NULL != m_winPixEvent + ; + + if (graphicsDebugger) + { + // RenderDoc/PIX already hook and wrap the D3D12 device. GPU-based validation conflicts + // with that wrapping and can intermittently deadlock CreateGraphicsPipelineState during + // heavy PSO creation. + } + else if (windowsVersionIs(Condition::GreaterEqual, 0x0A00, 22000) ) { debug1->SetEnableGPUBasedValidation(true); }