Commit 0d7b84af authored by Laszlo Agocs's avatar Laszlo Agocs
Browse files

Clean up after the renderpass refactor

parent b6f98270
......@@ -752,7 +752,7 @@ public:
// To be called before build() with relevant parameters like depthStencil and sampleCount set.
// (things like the window or the size of depthStencil are irrelevant here)
// Note setRenderPass(), that must still be called after (but before buildOrResize).
// Note setRenderPass(), that must still be called afterwards (but before buildOrResize).
virtual QRhiRenderPass *buildCompatibleRenderPass() = 0;
// As an exception to the typical build+release pattern, note that
......@@ -760,7 +760,7 @@ public:
// - buildOrResize. A swapchain is often able to, depending on the
// underlying APIs, accomodate changed output sizes in a manner that is
// more efficient than a full destroy - create. So use the former when a
// window is resized, never the latter.
// window is resized.
virtual bool buildOrResize() = 0;
protected:
......
......@@ -2875,6 +2875,9 @@ bool QVkTextureRenderTarget::build()
d.dsAttCount = 0;
}
if (!m_renderPass)
qWarning("QVkTextureRenderTarget: No renderpass set. See buildCompatibleRenderPass() and setRenderPass().");
d.rp = QRHI_RES(QVkRenderPass, m_renderPass);
Q_ASSERT(d.rp && d.rp->rp);
......@@ -3311,6 +3314,9 @@ bool QVkSwapChain::buildOrResize()
if (!rhiD->recreateSwapChain(surface, m_requestedPixelSize, m_flags, this))
return false;
if (!m_renderPass)
qWarning("QVkSwapChain: No renderpass set. See buildCompatibleRenderPass() and setRenderPass().");
rtWrapper.d.rp = QRHI_RES(QVkRenderPass, m_renderPass);
Q_ASSERT(rtWrapper.d.rp && rtWrapper.d.rp->rp);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment