From 6cf3447f1d119a5e61c5abf3ac546ec4746ee5fe Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Fri, 17 Feb 2023 13:16:20 +0100 Subject: 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 --- src/gui/rhi/qrhid3d11.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/gui/rhi/qrhid3d11.cpp') diff --git a/src/gui/rhi/qrhid3d11.cpp b/src/gui/rhi/qrhid3d11.cpp index 93a1eb8cd6..ac93bbe479 100644 --- a/src/gui/rhi/qrhid3d11.cpp +++ b/src/gui/rhi/qrhid3d11.cpp @@ -3671,8 +3671,7 @@ bool QD3D11TextureRenderTarget::create() if (rtv[0] || dsv) destroy(); - const bool hasColorAttachments = m_desc.cbeginColorAttachments() != m_desc.cendColorAttachments(); - Q_ASSERT(hasColorAttachments || m_desc.depthTexture()); + Q_ASSERT(m_desc.colorAttachmentCount() > 0 || m_desc.depthTexture()); Q_ASSERT(!m_desc.depthStencilBuffer() || !m_desc.depthTexture()); const bool hasDepthStencil = m_desc.depthStencilBuffer() || m_desc.depthTexture(); -- cgit v1.2.3