aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2021-02-04 17:37:51 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-02-05 10:28:46 +0000
commitcfb8f4ce7d024fda5470e5741cc3c0fcb7bbef2c (patch)
treed2655aae12b4dfd8ec2d30fa4243aa5ece936843 /src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
parentba01d787b6de3779e4d2e622eba407ab8081280c (diff)
Invalidate external renderpass descriptors from Quick3D
Change-Id: I362b35b3d038d4fb24fab0e73cb120027f2308ea Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 93fe74ca433850e505f8f8940e99f3bf6a6dc050) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp')
-rw-r--r--src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
index 903a98c8ed..aa46b5a509 100644
--- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
+++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
@@ -959,6 +959,11 @@ static void qsg_wipeBatch(Batch *batch, bool separateIndexBuffer)
Renderer::~Renderer()
{
if (m_rhi) {
+ // If setExternalRenderPassDescriptor() was called, we have to
+ // aggressively invalidate to prevent an object, the lifetime of which
+ // we have no control over, staying in the (per-window) caches.
+ invalidatePipelineCacheDependency(m_external_rp_desc);
+
// Clean up batches and buffers
const bool separateIndexBuffer = m_context->separateIndexBuffer();
for (int i = 0; i < m_opaqueBatches.size(); ++i)