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:
James Green
2026-09-25 15:35:15 -07:00
committed by GitHub
parent d79de7ac63
commit d8b2a448aa
2 changed files with 21 additions and 9 deletions
+2
View File
@@ -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