mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 13:10:10 +01:00
iris: Handle states=NULL in iris_bind_sampler_states
Clover likes to do this to clear our a bunch of samplers without actually passing an array of NULL pointers. It's easy enough to handle in iris. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13072>
This commit is contained in:
parent
5a9f907d94
commit
5f8e043fb6
1 changed files with 3 additions and 2 deletions
|
|
@ -2081,8 +2081,9 @@ iris_bind_sampler_states(struct pipe_context *ctx,
|
|||
bool dirty = false;
|
||||
|
||||
for (int i = 0; i < count; i++) {
|
||||
if (shs->samplers[start + i] != states[i]) {
|
||||
shs->samplers[start + i] = states[i];
|
||||
struct iris_sampler_state *state = states ? states[i] : NULL;
|
||||
if (shs->samplers[start + i] != state) {
|
||||
shs->samplers[start + i] = state;
|
||||
dirty = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue