summaryrefslogtreecommitdiffstats
path: root/src/gui/rhi
diff options
context:
space:
mode:
authorAndy Nichols <nezticle@gmail.com>2022-08-25 14:53:59 +0200
committerAndy Nichols <nezticle@gmail.com>2022-08-25 20:36:57 +0200
commite020a8eaf7dbc2adf9064b3e3794dc289264ebab (patch)
tree4e6cff4d2050181f6107eb3db7d90caccb04c81e /src/gui/rhi
parent612c345108dca3e6c67e75bcf08912641f3f6f13 (diff)
RHI: Make sure to compare bindings when comparing QShaders
It is possible, at least with Metal, that after the shader is converted to the native shader that the native bindings will changes, so it is important to also make a comparison against the bindings as well. Pick-to: 6.4 Change-Id: I8b6ff99fbda04ea66e3cb7970d7c33df066734cf Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/gui/rhi')
-rw-r--r--src/gui/rhi/qshader.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/rhi/qshader.cpp b/src/gui/rhi/qshader.cpp
index cd4a9f3854..8a0e841132 100644
--- a/src/gui/rhi/qshader.cpp
+++ b/src/gui/rhi/qshader.cpp
@@ -516,8 +516,8 @@ QShaderKey::QShaderKey(QShader::Source s,
bool operator==(const QShader &lhs, const QShader &rhs) noexcept
{
return lhs.d->stage == rhs.d->stage
- && lhs.d->shaders == rhs.d->shaders;
- // do not bother with desc and bindings, if the shader code is the same, the description must match too
+ && lhs.d->shaders == rhs.d->shaders
+ && lhs.d->bindings == rhs.d->bindings;
}
/*!