From: Brian Paul Date: Wed, 10 Mar 2010 22:11:49 +0000 (-0700) Subject: llvmpipe: fix loop over mipmap levels X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=19371fb60da8ec27a6024d0bf38b82cf3ca787e4;p=mesa.git llvmpipe: fix loop over mipmap levels --- diff --git a/src/gallium/drivers/llvmpipe/lp_setup.c b/src/gallium/drivers/llvmpipe/lp_setup.c index fbe14924cb1..d6d37c48090 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup.c +++ b/src/gallium/drivers/llvmpipe/lp_setup.c @@ -475,7 +475,7 @@ lp_setup_set_sampler_textures( struct setup_context *setup, if (!lp_tex->dt) { /* regular texture - setup array of mipmap level pointers */ int j; - for (j = 0; j < LP_MAX_TEXTURE_2D_LEVELS; j++) { + for (j = 0; j <= tex->last_level; j++) { jit_tex->data[j] = (ubyte *) lp_tex->data + lp_tex->level_offset[j]; }