diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2019-09-23 14:43:43 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2019-09-30 09:00:37 +0200 |
commit | cf51a723ffbddc5338628b99fa4a5b5b4d17295c (patch) | |
tree | bb2faccafb31d856f20ef4244e2295717274bac1 /src/quick/scenegraph/qsgrenderloop.cpp | |
parent | 6bb678bad25eafe76dcebcd1ff184be9de9125bb (diff) |
Remove depth-stencil buffer sizing on the rhi path
...as this will be done automatically by QRhiSwapChain after the
corresponding QtGui changes.
Task-number: QTBUG-78641
Change-Id: I8edeb728f3aba07bfa6bc6331966fba4bdee71f4
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/quick/scenegraph/qsgrenderloop.cpp')
-rw-r--r-- | src/quick/scenegraph/qsgrenderloop.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/quick/scenegraph/qsgrenderloop.cpp b/src/quick/scenegraph/qsgrenderloop.cpp index a5b5fe04f5..e69d25aab3 100644 --- a/src/quick/scenegraph/qsgrenderloop.cpp +++ b/src/quick/scenegraph/qsgrenderloop.cpp @@ -667,9 +667,6 @@ void QSGGuiThreadRenderLoop::renderWindow(QQuickWindow *window) if (cd->swapchainJustBecameRenderable) qCDebug(QSG_LOG_RENDERLOOP, "just became exposed"); - cd->depthStencilForSwapchain->setPixelSize(effectiveOutputSize); - cd->depthStencilForSwapchain->build(); - cd->hasActiveSwapchain = cd->swapchain->buildOrResize(); if (!cd->hasActiveSwapchain && rhi->isDeviceLost()) { handleDeviceLoss(); @@ -679,10 +676,15 @@ void QSGGuiThreadRenderLoop::renderWindow(QQuickWindow *window) cd->swapchainJustBecameRenderable = false; cd->hasRenderableSwapchain = cd->hasActiveSwapchain; - if (!cd->hasActiveSwapchain) - qWarning("Failed to build or resize swapchain"); - else + if (cd->hasActiveSwapchain) { + // surface size atomicity: now that buildOrResize() succeeded, + // query the size that was used in there by the swapchain, and + // that is the size we will use while preparing the next frame. + effectiveOutputSize = cd->swapchain->currentPixelSize(); qCDebug(QSG_LOG_RENDERLOOP) << "rhi swapchain size" << effectiveOutputSize; + } else { + qWarning("Failed to build or resize swapchain"); + } } Q_ASSERT(rhi == cd->rhi); |