diff options
author | Ville Syrjälä <[email protected]> | 2015-03-23 14:47:18 +0200 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2015-10-06 11:16:19 -0700 |
commit | b15b4581d15684d59e1fc4d7cad72ece4dd9fcb0 (patch) | |
tree | c336d22b5f9f146412d2fdf4fced4e7c839e4193 /src/mesa/tnl_dd/t_dd_dmatmp.h | |
parent | 5ca00e0b8dff529f33c8b1685a9109a78090987c (diff) |
t_dd_dmatmp: Allow flat shaded polygons with tri fans
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ä <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/tnl_dd/t_dd_dmatmp.h')
-rw-r--r-- | src/mesa/tnl_dd/t_dd_dmatmp.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/tnl_dd/t_dd_dmatmp.h b/src/mesa/tnl_dd/t_dd_dmatmp.h index 181cf6701dd..7d03b026bd5 100644 --- a/src/mesa/tnl_dd/t_dd_dmatmp.h +++ b/src/mesa/tnl_dd/t_dd_dmatmp.h @@ -316,7 +316,8 @@ static void TAG(render_poly_verts)(struct gl_context *ctx, } 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 " @@ -458,7 +459,8 @@ static bool TAG(validate_render)(struct gl_context *ctx, 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 || |