[Fix] (MG_Backend/DirectVulkan): prevent operation in assert getting compiled out in release

This commit is contained in:
2026-02-27 15:05:10 +08:00
parent b64309edfc
commit 1a75bcba5e
@@ -2046,11 +2046,11 @@ namespace MobileGL::MG_Backend::DirectVulkan {
renderPassInitInfo.device = m_device; renderPassInitInfo.device = m_device;
renderPassInitInfo.colorFormat = m_swapchainObject.GetSurfaceFormat().format; renderPassInitInfo.colorFormat = m_swapchainObject.GetSurfaceFormat().format;
renderPassInitInfo.depthStencilFormat = m_depthStencilFormat; renderPassInitInfo.depthStencilFormat = m_depthStencilFormat;
MOBILEGL_ASSERT(m_renderPassManager->Initialize(renderPassInitInfo), Bool ok = m_renderPassManager->Initialize(renderPassInitInfo);
"RecreateSwapchain: render pass manager initialization failed"); MOBILEGL_ASSERT(ok, "RecreateSwapchain: render pass manager initialization failed");
MOBILEGL_ASSERT(m_renderPassManager->RecreateDefaultFramebuffers( ok = m_renderPassManager->RecreateDefaultFramebuffers(
m_swapchainObject.GetImageViews(), m_depthStencilImageViews, m_swapchainObject.GetExtent()), m_swapchainObject.GetImageViews(), m_depthStencilImageViews, m_swapchainObject.GetExtent());
"RecreateSwapchain: default framebuffers initialization failed"); MOBILEGL_ASSERT(ok, "RecreateSwapchain: default framebuffers initialization failed");
if (m_pipelineFactory) { if (m_pipelineFactory) {
m_pipelineFactory->DestroyAll(); m_pipelineFactory->DestroyAll();
} }