mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 20:18:12 +02:00
nv50: zero out unbound samplers
Samplers are only defined up to num_samplers, so set all samplers above
nr to NULL so that we don't try to read them again later.
Tested-by: Christian Ruppert <idl0r@qasl.de>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "10.2 10.3" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 362cd26960)
This commit is contained in:
parent
836b0ae8b6
commit
eb38556137
1 changed files with 5 additions and 2 deletions
|
|
@ -585,9 +585,12 @@ nv50_stage_sampler_states_bind(struct nv50_context *nv50, int s,
|
|||
nv50_screen_tsc_unlock(nv50->screen, old);
|
||||
}
|
||||
assert(nv50->num_samplers[s] <= PIPE_MAX_SAMPLERS);
|
||||
for (; i < nv50->num_samplers[s]; ++i)
|
||||
if (nv50->samplers[s][i])
|
||||
for (; i < nv50->num_samplers[s]; ++i) {
|
||||
if (nv50->samplers[s][i]) {
|
||||
nv50_screen_tsc_unlock(nv50->screen, nv50->samplers[s][i]);
|
||||
nv50->samplers[s][i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
nv50->num_samplers[s] = nr;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue