vbo: Preserve vbo_save::no_current_update on primitive restart.

With this change we preserve the no_current_update property when we
observe a glPrimitiveRestart call. That means that we now also get the
no_current_update optimization for display lists that are made
out of indexed draws using primitive restart.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
This commit is contained in:
Mathias Fröhlich 2018-10-29 06:13:19 +01:00
parent f2a52b3c25
commit b00cb994ef

View file

@ -1277,10 +1277,11 @@ _save_PrimitiveRestartNV(void)
} else {
/* get current primitive mode */
GLenum curPrim = save->prims[save->prim_count - 1].mode;
bool no_current_update = save->no_current_update;
/* restart primitive */
CALL_End(GET_DISPATCH(), ());
vbo_save_NotifyBegin(ctx, curPrim, false);
vbo_save_NotifyBegin(ctx, curPrim, no_current_update);
}
}