summaryrefslogtreecommitdiffstats
path: root/src/gui/rhi/qrhi_p_p.h
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2023-02-17 13:16:20 +0100
committerLaszlo Agocs <laszlo.agocs@qt.io>2023-02-20 18:06:32 +0100
commit6cf3447f1d119a5e61c5abf3ac546ec4746ee5fe (patch)
treef930c2c1ed84cb6b47491712efcdff27d6e14025 /src/gui/rhi/qrhi_p_p.h
parentc6b7737436fb375b3b637e05076d82628d616e4c (diff)
rhi: backends: Get color attachment count in a saner way
Also bring all list-like data to the same level when it comes to the interface exposed in QRhi*. Change-Id: I90296a49ff1f52c1ce4e787167c99006fab3c4c3 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhi_p_p.h')
-rw-r--r--src/gui/rhi/qrhi_p_p.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gui/rhi/qrhi_p_p.h b/src/gui/rhi/qrhi_p_p.h
index 95b307b675..860133bef1 100644
--- a/src/gui/rhi/qrhi_p_p.h
+++ b/src/gui/rhi/qrhi_p_p.h
@@ -739,9 +739,8 @@ inline bool operator!=(const QRhiRenderTargetAttachmentTracker::ResId &a, const
template<typename TexType, typename RenderBufferType>
void QRhiRenderTargetAttachmentTracker::updateResIdList(const QRhiTextureRenderTargetDescription &desc, ResIdList *dst)
{
- const quintptr colorAttCount = desc.cendColorAttachments() - desc.cbeginColorAttachments();
const bool hasDepthStencil = desc.depthStencilBuffer() || desc.depthTexture();
- dst->resize(colorAttCount * 2 + (hasDepthStencil ? 1 : 0));
+ dst->resize(desc.colorAttachmentCount() * 2 + (hasDepthStencil ? 1 : 0));
int n = 0;
for (auto it = desc.cbeginColorAttachments(), itEnd = desc.cendColorAttachments(); it != itEnd; ++it, ++n) {
const QRhiColorAttachment &colorAtt(*it);