diff options
author | Keith Whitwell <[email protected]> | 2005-01-18 08:41:55 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2005-01-18 08:41:55 +0000 |
commit | af72b4dd8e7f752786ae785795c726c2aada6ae8 (patch) | |
tree | 6130ccd1191147171dc2ba75b0511998394f8c61 /src/mesa | |
parent | 7443c2caa6313bbc1655a41e25a192c8ad88817a (diff) |
Fix calculation of last_count in _tnl_wrap_buffers()
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/tnl/t_vtx_api.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/tnl/t_vtx_api.c b/src/mesa/tnl/t_vtx_api.c index a6b8cc30130..d92e03e58d9 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) |