summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2021-03-22 14:55:52 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-03-25 21:25:21 +0000
commitcc3260b37a3cb41b40a206fdf3dee1bd1ac4e66f (patch)
treefe128e3f122616875f34da10dd16056ed5199494 /src
parent9a72beca560e6953cc67f7d9b442cd644ee63a0a (diff)
rhi: vulkan: Prevent a misplaced assert from triggering in debug builds
One place where this popped up was the qrhi autotest (in debug builds). This check is meant for VkRenderpass objects for texture render targets, should not bother with it for the "main" renderpass. Amends 19384f2e8f50bad0a0775f7b2e10aff3372bcbb5 Change-Id: I877a2458fe17fe339b4741d4aa8af3fbda4dabcc Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 3c85f8e9fc1977cf2a650b17b43d3eac4960155e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r--src/gui/rhi/qrhivulkan.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/rhi/qrhivulkan.cpp b/src/gui/rhi/qrhivulkan.cpp
index 3d5048df1c..f6b1654acd 100644
--- a/src/gui/rhi/qrhivulkan.cpp
+++ b/src/gui/rhi/qrhivulkan.cpp
@@ -1181,7 +1181,6 @@ static void fillRenderPassCreateInfo(VkRenderPassCreateInfo *rpInfo,
memset(subpassDesc, 0, sizeof(VkSubpassDescription));
subpassDesc->pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS;
subpassDesc->colorAttachmentCount = uint32_t(rpD->colorRefs.count());
- Q_ASSERT(rpD->colorRefs.count() == rpD->resolveRefs.count());
subpassDesc->pColorAttachments = !rpD->colorRefs.isEmpty() ? rpD->colorRefs.constData() : nullptr;
subpassDesc->pDepthStencilAttachment = rpD->hasDepthStencil ? &rpD->dsRef : nullptr;
subpassDesc->pResolveAttachments = !rpD->resolveRefs.isEmpty() ? rpD->resolveRefs.constData() : nullptr;
@@ -1378,6 +1377,7 @@ bool QRhiVulkan::createOffscreenRenderPass(QVkRenderPassDescriptor *rpD,
rpD->resolveRefs.append(ref);
}
}
+ Q_ASSERT(rpD->colorRefs.count() == rpD->resolveRefs.count());
// rpD->subpassDeps stays empty: don't yet know the correct initial/final
// access and stage stuff for the implicit deps at this point, so leave it