[Mesa-dev] [PATCH] st/mesa: fix levels in initial texture creation

Brian Paul brianp at vmware.com
Mon Apr 8 07:22:35 PDT 2013


On 04/06/2013 10:31 PM, Dave Airlie wrote:
> From: Dave Airlie<airlied at redhat.com>
>
> calim pointed out we were getting mipmap levels for array multisamples,
> this didn't make sense. So then I noticed this function takes last_level
> so we are passing in a too high value here.
>
> I think this should fix the case he was seeing.
>
> Signed-off-by: Dave Airlie<airlied at redhat.com>
> ---
>   src/mesa/state_tracker/st_cb_texture.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
> index 25ee352..85b5609 100644
> --- a/src/mesa/state_tracker/st_cb_texture.c
> +++ b/src/mesa/state_tracker/st_cb_texture.c
> @@ -1691,7 +1691,7 @@ st_AllocTextureStorage(struct gl_context *ctx,
>      stObj->pt = st_texture_create(st,
>                                    gl_target_to_pipe(texObj->Target),
>                                    fmt,
> -                                 levels,
> +                                 levels - 1,
>                                    ptWidth,
>                                    ptHeight,
>                                    ptDepth,

Reviewed-by: Brian Paul <brianp at vmware.com>


More information about the mesa-dev mailing list