summaryrefslogtreecommitdiffstats
path: root/src/mesa/tnl
diff options
context:
space:
mode:
authorDaniel Borca <[email protected]>2004-01-07 12:39:45 +0000
committerDaniel Borca <[email protected]>2004-01-07 12:39:45 +0000
commit17f2e550099db465f56081e4086c171b354e4faf (patch)
treee24380a5065e286af9068feceeeb85b6b5e85b76 /src/mesa/tnl
parent722cb89a1300e59725a5e584017f18d1946efa6e (diff)
sanity check for vertex counter
Diffstat (limited to 'src/mesa/tnl')
-rw-r--r--src/mesa/tnl/t_save_api.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/tnl/t_save_api.c b/src/mesa/tnl/t_save_api.c
index 08a5036c6d1..76cc12e084f 100644
--- a/src/mesa/tnl/t_save_api.c
+++ b/src/mesa/tnl/t_save_api.c
@@ -440,6 +440,10 @@ static void _save_upgrade_vertex( GLcontext *ctx,
tnl->save.vertex_size += newsz - oldsz;
tnl->save.counter = ((SAVE_BUFFER_SIZE - tnl->save.vertex_store->used) /
tnl->save.vertex_size);
+ /* [dBorca] begin shameless plug */
+ if (tnl->save.counter > ctx->Const.MaxArrayLockSize )
+ tnl->save.counter = ctx->Const.MaxArrayLockSize;
+ /* [dBorca] end shameless plug */
tnl->save.initial_counter = tnl->save.counter;