diff options
author | Alan Hourihane <alanh@tungstengraphics.com> | 2005-02-11 14:04:11 +0000 |
---|---|---|
committer | Alan Hourihane <alanh@tungstengraphics.com> | 2005-02-11 14:04:11 +0000 |
commit | f5edc874fb660f92360b5aa8647a7d19f3a237dd (patch) | |
tree | 381b05b9bc211e23fa586f5ff59545a8071befdf | |
parent | 0ac51bbbe55984e7f8964e9684c2ade0c4dd9a82 (diff) |
pull in a fix from the trunk
-rw-r--r-- | src/mesa/tnl/t_context.h | 2 | ||||
-rw-r--r-- | src/mesa/tnl/t_vtx_api.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/tnl/t_context.h b/src/mesa/tnl/t_context.h index 41f9445f97..2d99c8576f 100644 --- a/src/mesa/tnl/t_context.h +++ b/src/mesa/tnl/t_context.h @@ -552,7 +552,7 @@ struct tnl_clipspace_attr GLuint vertattrsize; /* size of the attribute in bytes */ GLubyte *inputptr; GLuint inputstride; - tnl_insert_func *insert; + const tnl_insert_func *insert; tnl_insert_func emit; tnl_extract_func extract; const GLfloat *vp; /* NDC->Viewport mapping matrix */ diff --git a/src/mesa/tnl/t_vtx_api.c b/src/mesa/tnl/t_vtx_api.c index a6b8cc3013..d92e03e58d 100644 --- a/src/mesa/tnl/t_vtx_api.c +++ b/src/mesa/tnl/t_vtx_api.c @@ -64,7 +64,7 @@ static void _tnl_wrap_buffers( GLcontext *ctx ) } else { GLuint last_prim = tnl->vtx.prim[tnl->vtx.prim_count-1].mode; - GLuint last_count = tnl->vtx.prim[tnl->vtx.prim_count-1].count; + GLuint last_count; if (ctx->Driver.CurrentExecPrimitive != GL_POLYGON+1) { GLint i = tnl->vtx.prim_count - 1; @@ -74,6 +74,8 @@ static void _tnl_wrap_buffers( GLcontext *ctx ) tnl->vtx.prim[i].start); } + last_count = tnl->vtx.prim[tnl->vtx.prim_count-1].count; + /* Execute the buffer and save copied vertices. */ if (tnl->vtx.counter != tnl->vtx.initial_counter) |