[Mesa-dev] [PATCH v2 1/2] primconvert: select pv convention only from flatshade_first

Roland Scheidegger sroland at vmware.com
Tue Apr 7 09:50:49 PDT 2015


This looks good to me. Note that generally it is not true that this
doesn't affect things when flatshading isn't in effect - this is only
true if you only have old-style semantics, where color is the only
attribute which can be flatshaded (and is done so with the rasterizer
setting). But not true if you have attributes which just are
interpolated with the flat qualifier. Though this is probably another
problem...

Roland

Am 07.04.2015 um 18:12 schrieb Ilia Mirkin:
> This should match to how drivers program hardware. It shouldn't matter
> when flatshading isn't in effect, but somehow it seems to.
> 
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> ---
>  src/gallium/auxiliary/indices/u_primconvert.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/src/gallium/auxiliary/indices/u_primconvert.c b/src/gallium/auxiliary/indices/u_primconvert.c
> index 00e65aa..70d3e85 100644
> --- a/src/gallium/auxiliary/indices/u_primconvert.c
> +++ b/src/gallium/auxiliary/indices/u_primconvert.c
> @@ -104,8 +104,7 @@ util_primconvert_save_rasterizer_state(struct primconvert_context *pc,
>      * we would actually need to save/restore rasterizer state.  As
>      * it is, we just need to make note of the pv.
>      */
> -   pc->api_pv = (rast->flatshade
> -                 && !rast->flatshade_first) ? PV_LAST : PV_FIRST;
> +   pc->api_pv = rast->flatshade_first ? PV_FIRST : PV_LAST;
>  }
>  
>  void
> 



More information about the mesa-dev mailing list