diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2023-02-17 13:16:20 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2023-02-20 18:06:32 +0100 |
commit | 6cf3447f1d119a5e61c5abf3ac546ec4746ee5fe (patch) | |
tree | f930c2c1ed84cb6b47491712efcdff27d6e14025 /src/gui/rhi/qrhid3d11.cpp | |
parent | c6b7737436fb375b3b637e05076d82628d616e4c (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/qrhid3d11.cpp')
-rw-r--r-- | src/gui/rhi/qrhid3d11.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
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(); |