diff options
Diffstat (limited to 'src/gui/rhi')
-rw-r--r-- | src/gui/rhi/qrhi.cpp | 6 | ||||
-rw-r--r-- | src/gui/rhi/qrhivulkan.cpp | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/gui/rhi/qrhi.cpp b/src/gui/rhi/qrhi.cpp index d4ffc4d180..a54d7ac405 100644 --- a/src/gui/rhi/qrhi.cpp +++ b/src/gui/rhi/qrhi.cpp @@ -2800,6 +2800,12 @@ QRhiResource::Type QRhiShaderResourceBindings::resourceType() const */ bool QRhiShaderResourceBindings::isLayoutCompatible(const QRhiShaderResourceBindings *other) const { + if (other == this) + return true; + + if (!other) + return false; + const int count = m_bindings.count(); if (count != other->m_bindings.count()) return false; diff --git a/src/gui/rhi/qrhivulkan.cpp b/src/gui/rhi/qrhivulkan.cpp index 1a0431e19d..7abfe37be1 100644 --- a/src/gui/rhi/qrhivulkan.cpp +++ b/src/gui/rhi/qrhivulkan.cpp @@ -5845,6 +5845,9 @@ static inline bool attachmentDescriptionEquals(const VkAttachmentDescription &a, bool QVkRenderPassDescriptor::isCompatible(const QRhiRenderPassDescriptor *other) const { + if (other == this) + return true; + if (!other) return false; |