From: Marcin Slusarz Date: Sun, 5 Jun 2011 19:00:28 +0000 (+0200) Subject: nv50: fix nv50_sampler_state_delete array overflow X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fb40f1f532b5ea9fb9069f81af9e80835c18b3de;p=mesa.git nv50: fix nv50_sampler_state_delete array overflow num_samplers is array of 3 elements, not 5 --- diff --git a/src/gallium/drivers/nv50/nv50_state.c b/src/gallium/drivers/nv50/nv50_state.c index 8d75dd07c4d..fb125f3a8d8 100644 --- a/src/gallium/drivers/nv50/nv50_state.c +++ b/src/gallium/drivers/nv50/nv50_state.c @@ -508,7 +508,7 @@ nv50_sampler_state_delete(struct pipe_context *pipe, void *hwcso) { unsigned s, i; - for (s = 0; s < 5; ++s) + for (s = 0; s < 3; ++s) for (i = 0; i < nv50_context(pipe)->num_samplers[s]; ++i) if (nv50_context(pipe)->samplers[s][i] == hwcso) nv50_context(pipe)->samplers[s][i] = NULL;