From 7ad4b549442472e8c950189dd78b2e83098baa48 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Thu, 14 May 2020 11:19:19 +0200 Subject: RHI: Fix crash in QQuickWindow when updating render target The crash is reproducible e.g. when a resize event comes after a render target has been created, and it has to be recreated. It would then delete the render pass descriptor but it would still be in the pipeline cache in the renderer. We need to tell the renderer it is invalidated before deleting it. Discovered as part of making QQuickWidget work on RHI. The crash was reproducible by creating a new tab widget in the qquickwidget example. Task-number: QTBUG-78638 Change-Id: Ia840cc423a811aee18c568d43624b6bf852246f7 Reviewed-by: Laszlo Agocs --- src/quick/items/qquickwindow_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/quick/items/qquickwindow_p.h') diff --git a/src/quick/items/qquickwindow_p.h b/src/quick/items/qquickwindow_p.h index ba8691cba3..3d629cd74f 100644 --- a/src/quick/items/qquickwindow_p.h +++ b/src/quick/items/qquickwindow_p.h @@ -110,7 +110,7 @@ public: class QQuickWindowRenderTarget { public: - void reset(QRhi *rhi); + void reset(QRhi *rhi, QSGRenderer *renderer); QRhiRenderTarget *renderTarget = nullptr; QRhiRenderPassDescriptor *rpDesc = nullptr; QRhiTexture *texture = nullptr; -- cgit v1.2.3