[Mesa-dev] [PATCH] llvmpipe: Color slot interpolation can be flat or perspective, not linear.

Jose Fonseca jfonseca at vmware.com
Wed May 16 02:38:47 PDT 2012


It might make things slightly slower (usually just an extra multiply if there are other perspective correct interpolated attributes), but it sounds like the right thing to do.

Jose

----- Original Message -----
> Fixes a bunch of glsl 1.10 interpolation piglit tests.
> 
> Signed-off-by: Olivier Galibert <galibert at pobox.com>
> ---
>  src/gallium/drivers/llvmpipe/lp_bld_interp.h  |    2 +-
>  src/gallium/drivers/llvmpipe/lp_state_fs.c    |    2 +-
>  src/gallium/drivers/llvmpipe/lp_state_setup.c |    2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/gallium/drivers/llvmpipe/lp_bld_interp.h
> b/src/gallium/drivers/llvmpipe/lp_bld_interp.h
> index 5f72b0b..b0cbd9b 100644
> --- a/src/gallium/drivers/llvmpipe/lp_bld_interp.h
> +++ b/src/gallium/drivers/llvmpipe/lp_bld_interp.h
> @@ -55,7 +55,7 @@
>   * src_index.
>   *
>   * LP_INTERP_COLOR is translated to either LP_INTERP_CONSTANT or
> - * LINEAR depending on flatshade state.
> + * PERSPECTIVE depending on flatshade state.
>   */
>  enum lp_interp {
>     LP_INTERP_CONSTANT,
> diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c
> b/src/gallium/drivers/llvmpipe/lp_state_fs.c
> index 2d2391e..7807403 100644
> --- a/src/gallium/drivers/llvmpipe/lp_state_fs.c
> +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c
> @@ -555,7 +555,7 @@ generate_fragment(struct llvmpipe_context *lp,
>  	 if (key->flatshade)
>  	    inputs[i].interp = LP_INTERP_CONSTANT;
>  	 else
> -	    inputs[i].interp = LP_INTERP_LINEAR;
> +	    inputs[i].interp = LP_INTERP_PERSPECTIVE;
>        }
>     }
>  
> diff --git a/src/gallium/drivers/llvmpipe/lp_state_setup.c
> b/src/gallium/drivers/llvmpipe/lp_state_setup.c
> index ab38357..212bc1b 100644
> --- a/src/gallium/drivers/llvmpipe/lp_state_setup.c
> +++ b/src/gallium/drivers/llvmpipe/lp_state_setup.c
> @@ -790,7 +790,7 @@ lp_make_setup_variant_key(struct llvmpipe_context
> *lp,
>           if (lp->rasterizer->flatshade)
>  	    key->inputs[i].interp = LP_INTERP_CONSTANT;
>  	 else
> -	    key->inputs[i].interp = LP_INTERP_LINEAR;
> +	    key->inputs[i].interp = LP_INTERP_PERSPECTIVE;
>        }
>     }
>  
> --
> 1.7.10.280.gaa39
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 


More information about the mesa-dev mailing list