diff options
-rw-r--r-- | src/gui/rhi/qrhid3d11.cpp | 1 | ||||
-rw-r--r-- | src/gui/rhi/qrhigles2.cpp | 1 | ||||
-rw-r--r-- | src/gui/rhi/qrhimetal.mm | 1 | ||||
-rw-r--r-- | src/gui/rhi/qrhinull.cpp | 1 | ||||
-rw-r--r-- | src/gui/rhi/qrhivulkan.cpp | 1 | ||||
-rw-r--r-- | tests/auto/gui/rhi/qrhi/tst_qrhi.cpp | 1 |
6 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/rhi/qrhid3d11.cpp b/src/gui/rhi/qrhid3d11.cpp index c90dbd6e7d..c521bdb19b 100644 --- a/src/gui/rhi/qrhid3d11.cpp +++ b/src/gui/rhi/qrhid3d11.cpp @@ -4827,6 +4827,7 @@ bool QD3D11SwapChain::createOrResize() frameCount = 0; ds = m_depthStencil ? QRHI_RES(QD3D11RenderBuffer, m_depthStencil) : nullptr; + rt.setRenderPassDescriptor(m_renderPassDesc); // for the public getter in QRhiRenderTarget QD3D11SwapChainRenderTarget *rtD = QRHI_RES(QD3D11SwapChainRenderTarget, &rt); rtD->d.rp = QRHI_RES(QD3D11RenderPassDescriptor, m_renderPassDesc); rtD->d.pixelSize = pixelSize; diff --git a/src/gui/rhi/qrhigles2.cpp b/src/gui/rhi/qrhigles2.cpp index 18defa36aa..bdcdfd908a 100644 --- a/src/gui/rhi/qrhigles2.cpp +++ b/src/gui/rhi/qrhigles2.cpp @@ -5795,6 +5795,7 @@ bool QGles2SwapChain::createOrResize() m_depthStencil->create(); } + rt.setRenderPassDescriptor(m_renderPassDesc); // for the public getter in QRhiRenderTarget rt.d.rp = QRHI_RES(QGles2RenderPassDescriptor, m_renderPassDesc); rt.d.pixelSize = pixelSize; rt.d.dpr = float(m_window->devicePixelRatio()); diff --git a/src/gui/rhi/qrhimetal.mm b/src/gui/rhi/qrhimetal.mm index 385aedbd7e..08d70d16fc 100644 --- a/src/gui/rhi/qrhimetal.mm +++ b/src/gui/rhi/qrhimetal.mm @@ -4179,6 +4179,7 @@ bool QMetalSwapChain::createOrResize() } } + rtWrapper.setRenderPassDescriptor(m_renderPassDesc); // for the public getter in QRhiRenderTarget rtWrapper.d->pixelSize = pixelSize; rtWrapper.d->dpr = float(window->devicePixelRatio()); rtWrapper.d->sampleCount = samples; diff --git a/src/gui/rhi/qrhinull.cpp b/src/gui/rhi/qrhinull.cpp index f567894a9e..17d6df2c6f 100644 --- a/src/gui/rhi/qrhinull.cpp +++ b/src/gui/rhi/qrhinull.cpp @@ -1015,6 +1015,7 @@ bool QNullSwapChain::createOrResize() window = m_window; m_currentPixelSize = surfacePixelSize(); + rt.setRenderPassDescriptor(m_renderPassDesc); // for the public getter in QRhiRenderTarget rt.d.rp = QRHI_RES(QNullRenderPassDescriptor, m_renderPassDesc); rt.d.pixelSize = m_currentPixelSize; frameCount = 0; diff --git a/src/gui/rhi/qrhivulkan.cpp b/src/gui/rhi/qrhivulkan.cpp index 4729bb51ca..483bf14a61 100644 --- a/src/gui/rhi/qrhivulkan.cpp +++ b/src/gui/rhi/qrhivulkan.cpp @@ -7507,6 +7507,7 @@ bool QVkSwapChain::createOrResize() if (!m_renderPassDesc) qWarning("QVkSwapChain: No renderpass descriptor set. See newCompatibleRenderPassDescriptor() and setRenderPassDescriptor()."); + rtWrapper.setRenderPassDescriptor(m_renderPassDesc); // for the public getter in QRhiRenderTarget rtWrapper.d.rp = QRHI_RES(QVkRenderPassDescriptor, m_renderPassDesc); Q_ASSERT(rtWrapper.d.rp && rtWrapper.d.rp->rp); diff --git a/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp b/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp index feefd849cd..d0978484e5 100644 --- a/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp +++ b/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp @@ -3456,6 +3456,7 @@ void tst_QRhi::renderToWindowSimple() QRhiCommandBuffer *cb = swapChain->currentFrameCommandBuffer(); QRhiRenderTarget *rt = swapChain->currentFrameRenderTarget(); QCOMPARE(rt->resourceType(), QRhiResource::SwapChainRenderTarget); + QVERIFY(rt->renderPassDescriptor()); QCOMPARE(static_cast<QRhiSwapChainRenderTarget *>(rt)->swapChain(), swapChain.data()); const QSize outputSize = swapChain->currentPixelSize(); QCOMPARE(rt->pixelSize(), outputSize); |