Fixed reset flags.

This commit is contained in:
Branimir Karadžić 2016-05-31 12:50:28 -07:00
parent ee25aa1b80
commit 918f18c668
4 changed files with 23 additions and 20 deletions

View File

@ -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

View File

@ -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);

View File

@ -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;

View File

@ -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;