diff --git a/src/renderer_d3d11.cpp b/src/renderer_d3d11.cpp index e226a9e3a..d13241efa 100644 --- a/src/renderer_d3d11.cpp +++ b/src/renderer_d3d11.cpp @@ -2343,18 +2343,18 @@ BX_PRAGMA_DIAGNOSTIC_POP(); m_rasterizerStateCache.invalidate(); } - uint32_t flags = _resolution.m_flags & ~(0 + const uint32_t maskFlags = ~(0 | BGFX_RESET_HMD_RECENTER | BGFX_RESET_MAXANISOTROPY | BGFX_RESET_DEPTH_CLAMP | BGFX_RESET_SUSPEND ); - if (m_resolution.m_width != _resolution.m_width - || m_resolution.m_height != _resolution.m_height - || m_resolution.m_flags != flags) + if (m_resolution.m_width != _resolution.m_width + || m_resolution.m_height != _resolution.m_height + || (m_resolution.m_flags&maskFlags) != (_resolution.m_flags&maskFlags) ) { - flags &= ~BGFX_RESET_INTERNAL_FORCE; + uint32_t flags = _resolution.m_flags & (~BGFX_RESET_INTERNAL_FORCE); bool resize = true && !BX_ENABLED(BX_PLATFORM_XBOXONE || BX_PLATFORM_WINRT) // can't use ResizeBuffers on Windows Phone diff --git a/src/renderer_d3d12.cpp b/src/renderer_d3d12.cpp index b94303eb9..3a35feacd 100644 --- a/src/renderer_d3d12.cpp +++ b/src/renderer_d3d12.cpp @@ -367,6 +367,9 @@ namespace bgfx { namespace d3d12 static const GUID IID_ID3D12RootSignature = { 0xc54a6b66, 0x72df, 0x4ee8, { 0x8b, 0xe5, 0xa9, 0x46, 0xa1, 0x42, 0x92, 0x14 } }; static const GUID IID_ID3D12QueryHeap = { 0x0d9658ae, 0xed45, 0x469e, { 0xa6, 0x1d, 0x97, 0x0e, 0xc5, 0x83, 0xca, 0xb4 } }; static const GUID IID_IDXGIFactory4 = { 0x1bc6ea02, 0xef36, 0x464f, { 0xbf, 0x0c, 0x21, 0xca, 0x39, 0xe5, 0x16, 0x8a } }; +#else + static const GUID IID_ID3D12CommandSignature = { 0xc36a797c, 0xec80, 0x4f0a, { 0x89, 0x85, 0xa7, 0xb2, 0x47, 0x50, 0x82, 0xd1 } }; + static const GUID IID_ID3D12QueryHeap = { 0x0d9658ae, 0xed45, 0x469e, { 0xa6, 0x1d, 0x97, 0x0e, 0xc5, 0x83, 0xca, 0xb4 } }; #endif // USE_D3D12_DYNAMIC_LIB struct HeapProperty @@ -1868,18 +1871,18 @@ data.NumQualityLevels = 0; m_pipelineStateCache.invalidate(); } - uint32_t flags = _resolution.m_flags & ~(0 + const uint32_t maskFlags = ~(0 | BGFX_RESET_HMD_RECENTER | BGFX_RESET_MAXANISOTROPY | BGFX_RESET_DEPTH_CLAMP | BGFX_RESET_SUSPEND ); - if (m_resolution.m_width != _resolution.m_width - || m_resolution.m_height != _resolution.m_height - || m_resolution.m_flags != flags) + if (m_resolution.m_width != _resolution.m_width + || m_resolution.m_height != _resolution.m_height + || (m_resolution.m_flags&maskFlags) != (_resolution.m_flags&maskFlags) ) { - flags &= ~BGFX_RESET_INTERNAL_FORCE; + uint32_t flags = _resolution.m_flags & (~BGFX_RESET_INTERNAL_FORCE); bool resize = (m_resolution.m_flags&BGFX_RESET_MSAA_MASK) == (_resolution.m_flags&BGFX_RESET_MSAA_MASK); diff --git a/src/renderer_d3d9.cpp b/src/renderer_d3d9.cpp index 9b939b62a..84230d317 100644 --- a/src/renderer_d3d9.cpp +++ b/src/renderer_d3d9.cpp @@ -1291,18 +1291,18 @@ namespace bgfx { namespace d3d9 ? m_caps.MaxAnisotropy : 1 ; - uint32_t flags = _resolution.m_flags & ~(0 + const uint32_t maskFlags = ~(0 | BGFX_RESET_HMD_RECENTER | BGFX_RESET_MAXANISOTROPY | BGFX_RESET_DEPTH_CLAMP | BGFX_RESET_SUSPEND ); - if (m_resolution.m_width != _resolution.m_width - || m_resolution.m_height != _resolution.m_height - || m_resolution.m_flags != flags) + if (m_resolution.m_width != _resolution.m_width + || m_resolution.m_height != _resolution.m_height + || (m_resolution.m_flags&maskFlags) != (_resolution.m_flags&maskFlags) ) { - flags &= ~BGFX_RESET_INTERNAL_FORCE; + uint32_t flags = _resolution.m_flags & (~BGFX_RESET_INTERNAL_FORCE); m_resolution = _resolution; m_resolution.m_flags = flags; diff --git a/src/renderer_gl.cpp b/src/renderer_gl.cpp index 68e4b952c..914db7db1 100644 --- a/src/renderer_gl.cpp +++ b/src/renderer_gl.cpp @@ -2507,18 +2507,18 @@ namespace bgfx { namespace gl } } - uint32_t flags = _resolution.m_flags & ~(0 + const uint32_t maskFlags = ~(0 | BGFX_RESET_HMD_RECENTER | BGFX_RESET_MAXANISOTROPY | BGFX_RESET_DEPTH_CLAMP | BGFX_RESET_SUSPEND ); - if (m_resolution.m_width != _resolution.m_width - || m_resolution.m_height != _resolution.m_height - || m_resolution.m_flags != flags) + if (m_resolution.m_width != _resolution.m_width + || m_resolution.m_height != _resolution.m_height + || (m_resolution.m_flags&maskFlags) != (_resolution.m_flags&maskFlags) ) { - flags &= ~BGFX_RESET_INTERNAL_FORCE; + uint32_t flags = _resolution.m_flags & (~BGFX_RESET_INTERNAL_FORCE); m_resolution = _resolution; m_resolution.m_flags = flags;