diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-03-17 18:40:02 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-03-18 10:17:01 +0100 |
commit | b1e89b57667c95f3ad81076b5fd3c57272435450 (patch) | |
tree | 7a62a919594bb5c8e8688a13f4d649b8b88bbed6 /src/quick/scenegraph/qsgdefaultrendercontext_p.h | |
parent | 869efe4a49c5286493d7f039325992725bcac6c3 (diff) |
rhi: Enable layer updateTexture(), and so grabs, in the sync phase
Calling updateTexture() from an updatePaintNode() implementation means
we are still in the synchronization phase, with the render step (as in
QQuickWindow::renderSceneGraph()) not started yet. Make sure the
QRhiCommandBuffer is sent around early enough, so it is usable by
QSGRhiLayer already during sync.
There is no use case for this in Qt Quick itself since all standard
items invoke updateTexture() from QSGNode::preprocess() (which is part
of the render, not the sync, step), but Qt Quick 3D relies on this in
Texture.sourceItem.
This should fix the sourceitem manual test in Qt Quick 3D, so that it
will not crash anymore when running with RHI enabled.
Task-number: QTBUG-82927
Change-Id: I38adf512e49b1c6eef4730cd23663d351725d6cd
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/quick/scenegraph/qsgdefaultrendercontext_p.h')
-rw-r--r-- | src/quick/scenegraph/qsgdefaultrendercontext_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/scenegraph/qsgdefaultrendercontext_p.h b/src/quick/scenegraph/qsgdefaultrendercontext_p.h index 2fdb3a48dd..97ed681f9a 100644 --- a/src/quick/scenegraph/qsgdefaultrendercontext_p.h +++ b/src/quick/scenegraph/qsgdefaultrendercontext_p.h @@ -104,7 +104,7 @@ public: void initialize(const QSGRenderContext::InitParams *params) override; void invalidate() override; - void prepareSync(qreal devicePixelRatio) override; + void prepareSync(qreal devicePixelRatio, QRhiCommandBuffer *cb) override; void beginNextFrame(QSGRenderer *renderer, RenderPassCallback mainPassRecordingStart, RenderPassCallback mainPassRecordingEnd, |