From fb40f1f532b5ea9fb9069f81af9e80835c18b3de Mon Sep 17 00:00:00 2001 From: Marcin Slusarz Date: Sun, 5 Jun 2011 21:00:28 +0200 Subject: nv50: fix nv50_sampler_state_delete array overflow num_samplers is array of 3 elements, not 5 --- src/gallium/drivers/nv50/nv50_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gallium/drivers') 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; -- cgit v1.2.3