diff options
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/attrib.c | 7 | ||||
-rw-r--r-- | src/mesa/main/mtypes.h | 3 | ||||
-rw-r--r-- | src/mesa/main/polygon.c | 4 |
3 files changed, 12 insertions, 2 deletions
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index 9e86faee346..8d4a4f0bc59 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -1287,7 +1287,12 @@ _mesa_PopAttrib(void) break; case GL_POLYGON_STIPPLE_BIT: memcpy( ctx->PolygonStipple, attr->data, 32*sizeof(GLuint) ); - ctx->NewState |= _NEW_POLYGONSTIPPLE; + + if (ctx->DriverFlags.NewPolygonStipple) + ctx->NewDriverState |= ctx->DriverFlags.NewPolygonStipple; + else + ctx->NewState |= _NEW_POLYGONSTIPPLE; + if (ctx->Driver.PolygonStipple) ctx->Driver.PolygonStipple( ctx, (const GLubyte *) attr->data ); break; diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index d55451a1eac..bc99da97f3e 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -4526,6 +4526,9 @@ struct gl_driver_flags /** gl_context::Polygon */ uint64_t NewPolygonState; + /** gl_context::PolygonStipple */ + uint64_t NewPolygonStipple; + /** gl_context::ViewportArray */ uint64_t NewViewport; }; diff --git a/src/mesa/main/polygon.c b/src/mesa/main/polygon.c index 8153c5ec0be..03c63628dfc 100644 --- a/src/mesa/main/polygon.c +++ b/src/mesa/main/polygon.c @@ -199,7 +199,9 @@ _mesa_PolygonStipple(const GLubyte *pattern) if (MESA_VERBOSE & VERBOSE_API) _mesa_debug(ctx, "glPolygonStipple\n"); - FLUSH_VERTICES(ctx, _NEW_POLYGONSTIPPLE); + FLUSH_VERTICES(ctx, ctx->DriverFlags.NewPolygonStipple ? 0 : + _NEW_POLYGONSTIPPLE); + ctx->NewDriverState |= ctx->DriverFlags.NewPolygonStipple; pattern = _mesa_map_validate_pbo_source(ctx, 2, &ctx->Unpack, 32, 32, 1, |