primconvert: select pv convention only from flatshade_first
authorIlia Mirkin <imirkin@alum.mit.edu>
Tue, 7 Apr 2015 15:43:52 +0000 (11:43 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Sat, 18 Apr 2015 22:27:09 +0000 (18:27 -0400)
This should match to how drivers program hardware. flatshade relates to
whether color inputs are interpolated, not the provoking vertex
convention.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
src/gallium/auxiliary/indices/u_primconvert.c

index 00e65aaea31585e842613c0a2f2d76b9b3d925c9..70d3e8530b8811f53f93ba6bbd15d179a8775688 100644 (file)
@@ -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