summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2014-02-28 13:02:06 -0500
committerZhigang Gong <zhigang.gong@gmail.com>2014-03-13 21:52:24 +0800
commitc3e8136b9ab926be252dada4e9fb40bd749896a6 (patch)
treefd749d4b728cc5df452643650797bc6cc7f78914
parent4ea6805ae90a9e1e041f424f4e80d15e5649f4a8 (diff)
glamor: Don't forget to set GL_INVALIDATE_RANGE_BIT on GL_ARB_mbr.
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@anholt.net> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--src/glamor_render.c4
1 files changed, 3 insertions, 1 deletions
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