summaryrefslogtreecommitdiffstats
path: root/src/gui/rhi/qrhid3d11.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2022-01-24 15:28:20 +0100
committerLaszlo Agocs <laszlo.agocs@qt.io>2022-01-25 01:04:07 +0100
commit406bb6ae20471cf9bba6d910256b416792c99322 (patch)
tree39c7e88a17f715ec1d2dafb090f77ee2caae4d4f /src/gui/rhi/qrhid3d11.cpp
parent4b6064aef434baf7e382b3994f046a2f96fa7111 (diff)
rhi: Make sure pixelSize() to a texture rt is always up to date
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 <christian.stromme@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhid3d11.cpp')
-rw-r--r--src/gui/rhi/qrhid3d11.cpp3
1 files changed, 3 insertions, 0 deletions
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<QD3D11Texture, QD3D11RenderBuffer>(m_desc, d.currentResIdList))
+ const_cast<QD3D11TextureRenderTarget *>(this)->create();
+
return d.pixelSize;
}