We can allow rendering flat shaded polygons using tri fans if we check
the provoking vertex convention.
v2 (idr): Remove _EXT suffixes from GL_FIRST_VERTEX_CONVENTION.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
}
FLUSH();
- } else if (ctx->Light.ShadeModel == GL_SMOOTH) {
+ } else if (ctx->Light.ShadeModel == GL_SMOOTH ||
+ ctx->Light.ProvokingVertex == GL_FIRST_VERTEX_CONVENTION) {
TAG(render_tri_fan_verts)( ctx, start, count, flags );
} else {
unreachable("Cannot draw primitive; validate_render should have "
ok = true;
break;
case GL_POLYGON:
- ok = (HAVE_POLYGONS) || ctx->Light.ShadeModel == GL_SMOOTH;
+ ok = (HAVE_POLYGONS) || ctx->Light.ShadeModel == GL_SMOOTH ||
+ ctx->Light.ProvokingVertex == GL_FIRST_VERTEX_CONVENTION;
break;
case GL_QUAD_STRIP:
ok = VB->Elts ||