> 
> Author: Corbin Simpson <mostawesomed...@gmail.com>
> Date:   Fri Apr  9 03:38:23 2010 -0700
> 
> st/xorg: Fix bad paramf.
> 
> Should be an integer param, according to docs.
> 
> ---
> 
>  src/gallium/state_trackers/xorg/xorg_driver.c |    4 +---
>  1 files changed, 1 insertions(+), 3 deletions(-)
> 
> diff --git a/src/gallium/state_trackers/xorg/xorg_driver.c 
> b/src/gallium/state_trackers/xorg/xorg_driver.c
> index 8ac5179..d5dd0d7 100644
> --- a/src/gallium/state_trackers/xorg/xorg_driver.c
> +++ b/src/gallium/state_trackers/xorg/xorg_driver.c
> @@ -676,10 +676,8 @@ drv_screen_init(int scrnIndex, ScreenPtr pScreen, int 
> argc, char **argv)
>      }
> 
>      if (ms->screen) {
> -       float maxf;
>         int max;
> -       maxf = ms->screen->get_paramf(ms->screen, 
> PIPE_CAP_MAX_TEXTURE_2D_LEVELS);
> -       max = (1 << (int)(maxf - 1.0f));
> +       max = ms->screen->get_param(ms->screen, 
> PIPE_CAP_MAX_TEXTURE_2D_LEVELS);
>         max_width = max < max_width ? max : max_width;
>         max_height = max < max_height ? max : max_height;
>      }
> 

This doesn't look right.  The shift line is missing.  
PIPE_CAP_MAX_TEXTURE_2D_LEVELS is not a width/height value.  To compute the max 
width and height from max_levels:

max_width = 1 << (max_levels - 1)

-Brian

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to