svga: avoid provoking vertex conversion when possible
authorBrian Paul <brianp@vmware.com>
Fri, 16 Oct 2015 22:12:19 +0000 (16:12 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 22 Oct 2015 23:19:20 +0000 (17:19 -0600)
commit129d34da494840628b2bb1cbb6397d50dab3c999
tree9064b2b6cf130588332dbfaa834e44d7d3bf7c37
parent1082735bb69e9f64cb3991a52f0e270902917855
svga: avoid provoking vertex conversion when possible

Provoking vertex comes into play when doing flat shading.  But if we know
that all fragments in a primitive are the same color, the provoking vertex
doesn't matter.  Check for that case and use whichever provoking vertex
convention is supported by the device.

This avoids generating an index buffer to do the PV conversion.

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
src/gallium/drivers/svga/svga_draw_arrays.c