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.

Change-Id: I8b6ff99fbda04ea66e3cb7970d7c33df066734cf
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit e020a8eaf7dbc2adf9064b3e3794dc289264ebab)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Andy Nichols 2022-08-25 14:53:59 +02:00 committed by Qt Cherry-pick Bot
parent 6dd2dbaef6
commit cb7707f855

View File

@ -516,8 +516,8 @@ QShaderKey::QShaderKey(QShader::Source s,
bool operator==(const QShader &lhs, const QShader &rhs) noexcept bool operator==(const QShader &lhs, const QShader &rhs) noexcept
{ {
return lhs.d->stage == rhs.d->stage return lhs.d->stage == rhs.d->stage
&& lhs.d->shaders == rhs.d->shaders; && 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->bindings == rhs.d->bindings;
} }
/*! /*!