From e020a8eaf7dbc2adf9064b3e3794dc289264ebab Mon Sep 17 00:00:00 2001 From: Andy Nichols Date: Thu, 25 Aug 2022 14:53:59 +0200 Subject: [PATCH] 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 --- src/gui/rhi/qshader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/rhi/qshader.cpp b/src/gui/rhi/qshader.cpp index cd4a9f38549..8a0e8411327 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; } /*!