From 406bb6ae20471cf9bba6d910256b416792c99322 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 24 Jan 2022 15:28:20 +0100 Subject: rhi: Make sure pixelSize() to a texture rt is always up to date MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is an issue for QQuickWindow in practice, although it is not hit by our current tests. Pick-to: 6.3 Change-Id: Ia73704c1af6a82b2689ce7b844d3b0eb9a17ec18 Reviewed-by: Christian Strømme --- src/gui/rhi/qrhid3d11.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gui/rhi/qrhid3d11.cpp') diff --git a/src/gui/rhi/qrhid3d11.cpp b/src/gui/rhi/qrhid3d11.cpp index d029cd2fbf..fc6fd59f4f 100644 --- a/src/gui/rhi/qrhid3d11.cpp +++ b/src/gui/rhi/qrhid3d11.cpp @@ -3631,6 +3631,9 @@ bool QD3D11TextureRenderTarget::create() QSize QD3D11TextureRenderTarget::pixelSize() const { + if (!QRhiRenderTargetAttachmentTracker::isUpToDate(m_desc, d.currentResIdList)) + const_cast(this)->create(); + return d.pixelSize; } -- cgit v1.2.3