vbo: fix glPrimitiveRestartNV crash inside a display list
glPrimitiveRestartNV crashes when it is called during the compilation of a display list. There are two reasons: - ctx->Driver.CurrentSavePrimitive is not set to the current primitive - save_PrimitiveRestartNV() calls _save_Begin() which only sets an OpenGL error, instead of calling vbo_save_NotifyBegin(). This patch correctly calls vbo_save_NotifyBegin() but it detects the current primitive mode by looking at the latest saved primitive. Additional work by Brian Paul Signed-off-by:Olivier Lauffenburger <o.lauffenburger@topsolid.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101464 Reviewed-by:
Brian Paul <brianp@vmware.com> Reviewed-by:
Charmaine Lee <charmainel@vmware.com>