summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo/vbo_save_api.c
diff options
context:
space:
mode:
authorMathias Fröhlich <[email protected]>2018-10-29 06:13:19 +0100
committerMathias Fröhlich <[email protected]>2018-11-01 06:08:49 +0100
commitcee0dd8d5aa528077c7886b1c05f6a55371ff190 (patch)
treea3b1646d6c173cac19f4fee02c3e0d9e8495f001 /src/mesa/vbo/vbo_save_api.c
parentb632c072b26998acd1d6e0fa7b5f794965a5238a (diff)
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 <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]>
Diffstat (limited to 'src/mesa/vbo/vbo_save_api.c')
-rw-r--r--src/mesa/vbo/vbo_save_api.c8
1 files changed, 3 insertions, 5 deletions
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: