From: Mathias Fröhlich Date: Mon, 29 Oct 2018 05:13:19 +0000 (+0100) Subject: vbo: Remove VBO_SAVE_PRIM_WEAK from vbo_save_NotifyBegin calls. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cee0dd8d5aa528077c7886b1c05f6a55371ff190;p=mesa.git vbo: Remove VBO_SAVE_PRIM_WEAK from vbo_save_NotifyBegin calls. Now looking at the implementation of vbo_save_NotifyBegin. The VBO_SAVE_PRIM_WEAK flag, delivered in the primitive mode argument to vbo_save_NotifyBegin, is not evaluated anymore. The two users of the mode argument are the primitive mode itself, where the VBO_SAVE_PRIM_WEAK bit is masked out to retrieve the underlying OpenGL primitive mode. The other user is to check for the VBO_SAVE_PRIM_NO_CURRENT_UPDATE bit which is different from VBO_SAVE_PRIM_WEAK. So, since vbo_save_NotifyBegin does not care about VBO_SAVE_PRIM_WEAK, we can savely remove it from the call arguments of vbo_save_NotifyBegin. Reviewed-by: Brian Paul Signed-off-by: Mathias Fröhlich --- diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c index f1c8d5e4b1a..4cc315136c7 100644 --- a/src/mesa/vbo/vbo_save_api.c +++ b/src/mesa/vbo/vbo_save_api.c @@ -1296,7 +1296,7 @@ static void GLAPIENTRY _save_OBE_Rectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2) { GET_CURRENT_CONTEXT(ctx); - vbo_save_NotifyBegin(ctx, GL_QUADS | VBO_SAVE_PRIM_WEAK); + vbo_save_NotifyBegin(ctx, GL_QUADS); CALL_Vertex2f(GET_DISPATCH(), (x1, y1)); CALL_Vertex2f(GET_DISPATCH(), (x2, y1)); CALL_Vertex2f(GET_DISPATCH(), (x2, y2)); @@ -1329,8 +1329,7 @@ _save_OBE_DrawArrays(GLenum mode, GLint start, GLsizei count) _ae_map_vbos(ctx); - vbo_save_NotifyBegin(ctx, (mode | VBO_SAVE_PRIM_WEAK - | VBO_SAVE_PRIM_NO_CURRENT_UPDATE)); + vbo_save_NotifyBegin(ctx, (mode | VBO_SAVE_PRIM_NO_CURRENT_UPDATE)); for (i = 0; i < count; i++) CALL_ArrayElement(GET_DISPATCH(), (start + i)); @@ -1413,8 +1412,7 @@ _save_OBE_DrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type, indices = ADD_POINTERS(indexbuf->Mappings[MAP_INTERNAL].Pointer, indices); - vbo_save_NotifyBegin(ctx, (mode | VBO_SAVE_PRIM_WEAK | - VBO_SAVE_PRIM_NO_CURRENT_UPDATE)); + vbo_save_NotifyBegin(ctx, (mode | VBO_SAVE_PRIM_NO_CURRENT_UPDATE)); switch (type) { case GL_UNSIGNED_BYTE: