diff options
author | Ilia Mirkin <[email protected]> | 2014-08-30 13:35:47 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2014-09-01 18:38:02 -0400 |
commit | 362cd26960aff2e997584064443dcc0418516ae6 (patch) | |
tree | f033c5c9a4a98f7be1e1ae3d17b6ea1bc03648ea /src/gallium/drivers/nouveau | |
parent | c4bb436f7660c951cd27e52660cf825da68793e5 (diff) |
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 <[email protected]>
Signed-off-by: Ilia Mirkin <[email protected]>
Cc: "10.2 10.3" <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau')
-rw-r--r-- | src/gallium/drivers/nouveau/nv50/nv50_state.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_state.c b/src/gallium/drivers/nouveau/nv50/nv50_state.c index 48bc07974a2..cf84f886662 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_state.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_state.c @@ -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; |