[Mesa-dev] [PATCH] llvmpipe: fix incorrect 'j' array index in dummy texture code

Roland Scheidegger sroland at vmware.com
Wed Mar 6 07:43:44 PST 2013


Am 06.03.2013 02:09, schrieb Brian Paul:
> Use 0 instead.
> ---
>  src/gallium/drivers/llvmpipe/lp_setup.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/gallium/drivers/llvmpipe/lp_setup.c b/src/gallium/drivers/llvmpipe/lp_setup.c
> index 4529775..299fd65 100644
> --- a/src/gallium/drivers/llvmpipe/lp_setup.c
> +++ b/src/gallium/drivers/llvmpipe/lp_setup.c
> @@ -720,9 +720,9 @@ lp_setup_set_fragment_sampler_views(struct lp_setup_context *setup,
>                 jit_tex->depth = 1;
>                 jit_tex->first_level = 0;
>                 jit_tex->last_level = 0;
> -               jit_tex->mip_offsets[j] = 0;
> -               jit_tex->row_stride[j] = 0;
> -               jit_tex->img_stride[j] = 0;
> +               jit_tex->mip_offsets[0] = 0;
> +               jit_tex->row_stride[0] = 0;
> +               jit_tex->img_stride[0] = 0;
>              }
>              else {
>                 jit_tex->width = res->width0;
> 

Oops I think I introduced that bug recently when I needed to restructure
the code to handle buffer textures.

Reviewed-by: Roland Scheidegger <sroland at vmware.com>


More information about the mesa-dev mailing list