diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 315b0133420..a503f38d6ca 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -1606,11 +1606,17 @@ iris_bind_sampler_states(struct pipe_context *ctx, assert(start + count <= IRIS_MAX_TEXTURE_SAMPLERS); + bool dirty = false; + for (int i = 0; i < count; i++) { - shs->samplers[start + i] = states[i]; + if (shs->samplers[start + i] != states[i]) { + shs->samplers[start + i] = states[i]; + dirty = true; + } } - ice->state.dirty |= IRIS_DIRTY_SAMPLER_STATES_VS << stage; + if (dirty) + ice->state.dirty |= IRIS_DIRTY_SAMPLER_STATES_VS << stage; } /**