aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickwindow.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2023-12-07 20:20:06 +0100
committerLaszlo Agocs <laszlo.agocs@qt.io>2024-01-15 21:25:12 +0100
commit7295ece36399f25e3a3226b3222261e803140c94 (patch)
tree2342c8cbf21af204a016f343fcec83a81bded297 /src/quick/items/qquickwindow.cpp
parentb5a05e4e7e97f8ef5c4cc65fee0cfcfd9e4c5cc4 (diff)
Allow QQuickRt adopt a native texture array for multiview rendering
Limiting multiview to fromRhiRenderTarget() is quite limiting, since in practice it often involves duplicating the convenience logic that is built into Qt Quick for fromVulkanImage() and similar. We should also support passing in a texture array object to from fromOpenGLTexture, fromVulkanImage, etc. The array size then implies the view count. We are also required to use a texture array for depth/stencil as well in this case. Add the necessary plumbing so that clients, such as an OpenXR integration, can continue to use fromXxxxx(), just the *MultiView variants, instead of forcing them to create a QRhiTextureRenderTarget themselves upfront. Task-number: QTBUG-119850 Task-number: QTBUG-114871 Change-Id: I79978e5ff5f154c8914afbe2478d002291219aaf Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/quick/items/qquickwindow.cpp')
-rw-r--r--src/quick/items/qquickwindow.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index 1893c269cb..36bfc52aeb 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -484,6 +484,7 @@ void QQuickWindowRenderTarget::reset(QRhi *rhi)
delete texture;
delete renderBuffer;
delete depthStencil;
+ delete depthStencilTexture;
}
delete paintDevice;
@@ -494,6 +495,7 @@ void QQuickWindowRenderTarget::reset(QRhi *rhi)
texture = nullptr;
renderBuffer = nullptr;
depthStencil = nullptr;
+ depthStencilTexture = nullptr;
paintDevice = nullptr;
owns = false;
multiViewCount = 1;