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:
parent
6dd2dbaef6
commit
cb7707f855
@ -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;
|
||||
}
|
||||
|
||||
/*!
|
||||
|
Loading…
x
Reference in New Issue
Block a user