diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-05-07 15:20:07 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-05-07 20:43:45 +0200 |
commit | 1fc230c774ff599d14a40682c74f09118db04b2f (patch) | |
tree | fac5a2e6fea8ff9fc05e9d9eebe3d63153f5b7c1 /src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h | |
parent | 0c2ac3f6a5f80f5269a7247806e240bf9ef925e7 (diff) |
Avoid stale renderpass references in ShaderManager's pipeline list
A similar problem popped up for Quick3D before, and it seems the same
applies to Qt Quick layers as well: these can get released before the
(per-rendercontext) resource caches, thus leaving invalid references in
the cache keys.
Solve this by simply notifying the renderer to clean up the relevant
cache entries. Also utilize a very handy QRhi convenience, which allows
us to schedule and defer the destruction of a QRhiResource to endFrame()
(i.e. until after the current frame is submitted) with a single function
call.
Change-Id: I6db4914555f9504a2599e6ce1b0dc03b2b4b74de
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Diffstat (limited to 'src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h')
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h b/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h index da58b98a72..3db93bee41 100644 --- a/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h +++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h @@ -847,6 +847,8 @@ private: void setCustomRenderMode(const QByteArray &mode) override; bool hasCustomRenderModeWithContinuousUpdate() const override; + void invalidatePipelineCacheDependency(QRhiRenderPassDescriptor *rpDesc) override; + QSGDefaultRenderContext *m_context; QSet<Node *> m_taggedRoots; QDataBuffer<Element *> m_opaqueRenderList; |