mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-10-25 18:25:29 +00:00
D3D11: Fixed the DXGI_SWAP_EFFECT_DISCARD fallback swap chain. (#3997)
The retry kept DXGI_SCALING_NONE, and createSwapChain/resizeBuffers added DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING for every swap effect; both are flip-model only, so the fallback failed with DXGI_ERROR_INVALID_CALL and a bitblt chain could not be resized.
This commit is contained in:
@@ -1208,6 +1208,8 @@ namespace bgfx { namespace d3d11
|
||||
|
||||
m_scd.bufferCount = m_swapBufferCount;
|
||||
m_scd.swapEffect = m_swapEffect;
|
||||
// DXGI_SCALING_NONE is only valid for flip-model swap chains.
|
||||
m_scd.scaling = DXGI_SCALING_STRETCH;
|
||||
hr = m_dxgi.createSwapChain(m_device
|
||||
, m_scd
|
||||
, &mainFrameBuffer().m_swapChain
|
||||
|
||||
Reference in New Issue
Block a user