diff options
author | Keith Whitwell <[email protected]> | 2006-11-22 13:53:21 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2006-11-22 13:53:21 +0000 |
commit | b72fbcbe63bd53460da07ce840094924f04d38e0 (patch) | |
tree | 082db9f259b6bb909d3cabfa8668191e797d3e96 /src/mesa | |
parent | 96228d952de153424d66ee87ceb8f06dc2b5ca46 (diff) |
Another fix
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/api_arrayelt.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/main/api_arrayelt.c b/src/mesa/main/api_arrayelt.c index b3c33f2a79f..49aa427d1a3 100644 --- a/src/mesa/main/api_arrayelt.c +++ b/src/mesa/main/api_arrayelt.c @@ -1076,6 +1076,7 @@ static void check_vbo( AEcontext *actx, for (i = 0; i < actx->nr_vbos; i++) if (actx->vbo[i] == vbo) return; + assert(actx->nr_vbos < VERT_ATTRIB_MAX); actx->vbo[actx->nr_vbos++] = vbo; } } @@ -1094,6 +1095,8 @@ static void _ae_update_state( GLcontext *ctx ) AEattrib *at = actx->attribs; GLuint i; + actx->nr_vbos = 0; + /* conventional vertex arrays */ if (ctx->Array.ArrayObj->Index.Enabled) { aa->array = &ctx->Array.ArrayObj->Index; @@ -1296,6 +1299,11 @@ void _ae_invalidate_state( GLcontext *ctx, GLuint new_state ) { AEcontext *actx = AE_CONTEXT(ctx); + /* It is possible to raise a statechange between begin/end pairs as + * the glMaterial calls will raise _NEW_LIGHT eventually. However, + * within a DrawArrays or DrawElements call (which cannot emit + * material data), it should never be possible. + */ assert(!actx->mapped_vbos); actx->NewState |= new_state; } |