summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2005-04-05 10:30:05 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2005-04-05 10:30:05 +0000
commit5234d17514d88ad4e32bbe256aed31583df92c9b (patch)
treeb9a30dad3cf2be299923629609524bfcc7fb0584
parentc39a4bc83c076a84669dcaac48d79a6eda094477 (diff)
Don't call PrimitiveNotify with an invalid primitive. Fix ipers
wireframe mode.
-rw-r--r--src/mesa/drivers/dri/unichrome/via_tris.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_tris.c b/src/mesa/drivers/dri/unichrome/via_tris.c
index 5e697e32f7a..8b9dbe873f2 100644
--- a/src/mesa/drivers/dri/unichrome/via_tris.c
+++ b/src/mesa/drivers/dri/unichrome/via_tris.c
@@ -324,7 +324,7 @@ do { \
* Helpers for rendering unfilled primitives *
***********************************************************************/
-static const GLenum hwPrim[GL_POLYGON + 1] = {
+static const GLenum hwPrim[GL_POLYGON + 2] = {
GL_POINTS,
GL_LINES,
GL_LINES,
@@ -334,7 +334,8 @@ static const GLenum hwPrim[GL_POLYGON + 1] = {
GL_TRIANGLES,
GL_TRIANGLES,
GL_TRIANGLES,
- GL_TRIANGLES
+ GL_TRIANGLES,
+ GL_POLYGON+1
};
@@ -560,7 +561,8 @@ static void viaRenderClippedPoly(GLcontext *ctx, const GLuint *elts,
/* Restore the render primitive
*/
- if (prim != GL_POLYGON)
+ if (prim != GL_POLYGON &&
+ prim != GL_POLYGON + 1)
tnl->Driver.Render.PrimitiveNotify( ctx, prim );
}