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ä <ville.syrjala@linux.intel.com>
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
{
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;
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. */