diff --git a/src/renderer_d3d11.cpp b/src/renderer_d3d11.cpp index e23565886..8e82412a1 100644 --- a/src/renderer_d3d11.cpp +++ b/src/renderer_d3d11.cpp @@ -1041,6 +1041,12 @@ namespace bgfx { namespace d3d11 if (FAILED(hr) ) { + BX_TRACE( + "CreateSwapChain with DXGI_SWAP_EFFECT(%d) failed with HRESULT(%x)" + , m_scd.swapEffect + , hr + ); + // DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL is not available on win7 // Try again with DXGI_SWAP_EFFECT_DISCARD m_swapEffect = DXGI_SWAP_EFFECT_DISCARD; @@ -1404,7 +1410,11 @@ namespace bgfx { namespace d3d11 } else { - BX_TRACE("CheckFeatureSupport failed with %x for format %s.", hr, getName(TextureFormat::Enum(ii) ) ); + BX_TRACE( + "CheckFeatureSupport failed with HRESULT(%x) for format %s." + , hr + , getName(TextureFormat::Enum(ii) ) + ); } if (0 != (support & BGFX_CAPS_FORMAT_TEXTURE_IMAGE) ) @@ -1480,7 +1490,11 @@ namespace bgfx { namespace d3d11 } else { - BX_TRACE("CheckFeatureSupport failed with %x for sRGB format %s.", hr, getName(TextureFormat::Enum(ii) ) ); + BX_TRACE( + "CheckFeatureSupport failed with HRESULT(%x) for sRGB format %s." + , hr + , getName(TextureFormat::Enum(ii) ) + ); } } else @@ -2262,9 +2276,10 @@ namespace bgfx { namespace d3d11 } m_lost = isLost(hr); - BGFX_FATAL(!m_lost + BGFX_FATAL( + !m_lost , bgfx::Fatal::DeviceLost - , "Device is lost. FAILED 0x%08x %s (%s)" + , "Device is lost. FAILED HRESULT(%x) %s (%s)" , hr , getLostReason(hr) , DXGI_ERROR_DEVICE_REMOVED == hr ? getLostReason(m_device->GetDeviceRemovedReason() ) : "no info"