[Glamor] [PATCH 11/34] glamor: Don't forget to set GL_INVALIDATE_RANGE_BIT on GL_ARB_mbr.

Alex Deucher alexdeucher at gmail.com
Fri Feb 28 10:02:06 PST 2014


From: Eric Anholt <eric at anholt.net>

We don't need any current contents of the buffer, and this allows an
implementation to make a temporary BO for a streamed upload if it
wants to.

Ported from Eric's glamor xserver tree.

Signed-off-by: Eric Anholt <eric at anholt.net>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
 src/glamor_render.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/glamor_render.c b/src/glamor_render.c
index b03b4c3..607a636 100644
--- a/src/glamor_render.c
+++ b/src/glamor_render.c
@@ -751,7 +751,9 @@ glamor_setup_composite_vbo(ScreenPtr screen, int n_verts)
 		glamor_priv->vb = dispatch->glMapBufferRange(GL_ARRAY_BUFFER,
 							     glamor_priv->vbo_offset,
 							     vert_size,
-							     GL_MAP_WRITE_BIT | GL_MAP_UNSYNCHRONIZED_BIT);
+							     GL_MAP_WRITE_BIT |
+							     GL_MAP_UNSYNCHRONIZED_BIT |
+							     GL_MAP_INVALIDATE_RANGE_BIT);
 		assert(glamor_priv->vb != NULL);
 		glamor_priv->vb -= glamor_priv->vbo_offset;
 	} else
-- 
1.8.3.1



More information about the Glamor mailing list