diff --git a/src/renderer_vk.cpp b/src/renderer_vk.cpp index 511a445f8..46ed823f5 100644 --- a/src/renderer_vk.cpp +++ b/src/renderer_vk.cpp @@ -3221,6 +3221,19 @@ VK_IMPORT_DEVICE if (NULL == m_backBuffer.m_nwh) { + if (m_resolution.width != _resolution.width + || m_resolution.height != _resolution.height) + { + m_resolution.width = _resolution.width; + m_resolution.height = _resolution.height; + + for (uint32_t ii = 0; ii < BX_COUNTOF(m_frameBuffers); ++ii) + { + m_frameBuffers[ii].preReset(); + m_frameBuffers[ii].postReset(); + } + } + return suspended; } diff --git a/src/renderer_webgpu.cpp b/src/renderer_webgpu.cpp index d1bc54232..762a54845 100644 --- a/src/renderer_webgpu.cpp +++ b/src/renderer_webgpu.cpp @@ -2599,6 +2599,19 @@ WGPU_IMPORT if (!m_backBuffer.isSwapChain() ) { + if (m_resolution.width != _resolution.width + || m_resolution.height != _resolution.height) + { + m_resolution.width = _resolution.width; + m_resolution.height = _resolution.height; + + for (uint32_t ii = 0; ii < BX_COUNTOF(m_frameBuffers); ++ii) + { + m_frameBuffers[ii].preReset(); + m_frameBuffers[ii].postReset(); + } + } + return suspended; } @@ -6088,6 +6101,7 @@ m_resolution.formatColor = TextureFormat::BGRA8; const bool direct = (1 == numRows*depth || 0 == rowPitch % 256) && 0 == bufferOffset % offsetAlign + && 0 == bufferOffset % 512 ; const uint32_t numCopies = direct ? 1 : numRows*depth;