|
|
@@ -1725,18 +1725,29 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
|
|
|
|
|
DX_RELEASE(m_swapChain, 0);
|
|
|
|
|
|
+ SWAP_CHAIN_DESC_TYPE* scd = &m_scd;
|
|
|
+#if BGFX_CONFIG_USE_OVR
|
|
|
+ SWAP_CHAIN_DESC_TYPE swapChainScd;
|
|
|
+ if ((m_flags & BGFX_RESET_HMD) && m_ovr.isInitialized())
|
|
|
+ {
|
|
|
+ swapChainScd = m_scd;
|
|
|
+ swapChainScd.SampleDesc = s_msaa[0];
|
|
|
+ scd = &swapChainScd;
|
|
|
+ }
|
|
|
+#endif // BGFX_CONFIG_USE_OVR
|
|
|
+
|
|
|
#if BX_PLATFORM_WINRT
|
|
|
HRESULT hr;
|
|
|
hr = m_factory->CreateSwapChainForCoreWindow(m_device
|
|
|
, (::IUnknown*)g_platformData.nwh
|
|
|
- , &m_scd
|
|
|
+ , scd
|
|
|
, NULL
|
|
|
, &m_swapChain
|
|
|
);
|
|
|
#else
|
|
|
HRESULT hr;
|
|
|
hr = m_factory->CreateSwapChain(m_device
|
|
|
- , &m_scd
|
|
|
+ , scd
|
|
|
, &m_swapChain
|
|
|
);
|
|
|
#endif // BX_PLATFORM_WINRT
|
|
|
@@ -2294,7 +2305,7 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
|
|
bx::write(&writer, magic);
|
|
|
|
|
|
TextureCreate tc;
|
|
|
- tc.m_flags = BGFX_TEXTURE_RT;
|
|
|
+ tc.m_flags = BGFX_TEXTURE_RT|(((m_flags & BGFX_RESET_MSAA_MASK) >> BGFX_RESET_MSAA_SHIFT) << BGFX_TEXTURE_RT_MSAA_SHIFT);
|
|
|
tc.m_width = m_ovr.m_rtSize.w;
|
|
|
tc.m_height = m_ovr.m_rtSize.h;
|
|
|
tc.m_sides = 0;
|
|
|
@@ -2702,10 +2713,11 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
|
|
bool m_wireframe;
|
|
|
|
|
|
#if BX_PLATFORM_WINRT
|
|
|
- DXGI_SWAP_CHAIN_DESC1 m_scd;
|
|
|
+ typedef DXGI_SWAP_CHAIN_DESC1 SWAP_CHAIN_DESC_TYPE;
|
|
|
#else
|
|
|
- DXGI_SWAP_CHAIN_DESC m_scd;
|
|
|
+ typedef DXGI_SWAP_CHAIN_DESC SWAP_CHAIN_DESC_TYPE;
|
|
|
#endif
|
|
|
+ SWAP_CHAIN_DESC_TYPE m_scd;
|
|
|
uint32_t m_flags;
|
|
|
uint32_t m_maxAnisotropy;
|
|
|
|