From 5ad54217ff88e34706995b8645a1be35e0c76441 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mathias=20Fr=C3=B6hlich?= Date: Mon, 29 Apr 2019 07:23:58 +0200 Subject: [PATCH] mesa: Set CurrentSavePrimitive in vbo_save_NotifyBegin. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit That seems to be lost somewhere. Is needed for correct outside begin/end detection in display list compilation. And is needed for correct aliasing in dlists restablished in the next changes. Reviewed-by: Brian Paul Signed-off-by: Mathias Fröhlich --- src/mesa/vbo/vbo_save_api.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c index f9f0e641a5d..b33dfa5fd8e 100644 --- a/src/mesa/vbo/vbo_save_api.c +++ b/src/mesa/vbo/vbo_save_api.c @@ -1198,6 +1198,8 @@ vbo_save_NotifyBegin(struct gl_context *ctx, GLenum mode, struct vbo_save_context *save = &vbo_context(ctx)->save; const GLuint i = save->prim_count++; + ctx->Driver.CurrentSavePrimitive = mode; + assert(i < save->prim_max); save->prims[i].mode = mode & VBO_SAVE_PRIM_MODE_MASK; save->prims[i].begin = 1; -- 2.30.2