aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorVille Syrjälä <[email protected]>2015-03-23 14:47:19 +0200
committerIan Romanick <[email protected]>2015-10-06 11:16:19 -0700
commit83d511e1904b565490e6c8335a1d329e0fcf9c41 (patch)
treedee2faf31947063ae57613ca68f8e899c38b99e4 /src/mesa
parentb15b4581d15684d59e1fc4d7cad72ece4dd9fcb0 (diff)
t_dd_dmatmp: Disallow flat shading when rendering quad strips via tri strips
When rendering quad strips via tri strips we can't get the provoking vertex right, so disallow flat shading. v2: Major rebase on top of Ian's other t_dd_dmatmp.h work. Signed-off-by: Ville Syrjälä <[email protected]> Signed-off-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/tnl_dd/t_dd_dmatmp.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/mesa/tnl_dd/t_dd_dmatmp.h b/src/mesa/tnl_dd/t_dd_dmatmp.h
index 7d03b026bd5..04182f02059 100644
--- a/src/mesa/tnl_dd/t_dd_dmatmp.h
+++ b/src/mesa/tnl_dd/t_dd_dmatmp.h
@@ -332,8 +332,7 @@ static void TAG(render_quad_strip_verts)(struct gl_context *ctx,
{
GLuint j, nr;
- if (ctx->Light.ShadeModel != GL_FLAT ||
- !TNL_CONTEXT(ctx)->vb.AttribPtr[_TNL_ATTRIB_COLOR0]->stride) {
+ if (ctx->Light.ShadeModel == GL_SMOOTH) {
LOCAL_VARS;
const unsigned dmasz = GET_SUBSEQUENT_VB_MAX_VERTS() & ~1;
unsigned currentsz;
@@ -463,9 +462,7 @@ static bool TAG(validate_render)(struct gl_context *ctx,
ctx->Light.ProvokingVertex == GL_FIRST_VERTEX_CONVENTION;
break;
case GL_QUAD_STRIP:
- ok = VB->Elts ||
- (ctx->Light.ShadeModel != GL_FLAT ||
- VB->AttribPtr[_TNL_ATTRIB_COLOR0]->stride == 0);
+ ok = VB->Elts || ctx->Light.ShadeModel == GL_SMOOTH;
break;
case GL_QUADS:
ok = true; /* flatshading is ok. */