summaryrefslogtreecommitdiffstats
path: root/src/mesa/tnl/t_save_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/tnl/t_save_api.c')
-rw-r--r--src/mesa/tnl/t_save_api.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/tnl/t_save_api.c b/src/mesa/tnl/t_save_api.c
index 27685b558b7..f72cde2fe4a 100644
--- a/src/mesa/tnl/t_save_api.c
+++ b/src/mesa/tnl/t_save_api.c
@@ -183,6 +183,9 @@ static void _save_reset_counters( GLcontext *ctx )
else
tnl->save.initial_counter = 0;
+ if (tnl->save.initial_counter > ctx->Const.MaxArrayLockSize )
+ tnl->save.initial_counter = ctx->Const.MaxArrayLockSize;
+
tnl->save.counter = tnl->save.initial_counter;
tnl->save.prim_count = 0;
tnl->save.prim_max = SAVE_PRIM_SIZE - tnl->save.prim_store->used;