summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrigori Goronzy <greg@chown.ath.cx>2013-10-02 00:37:56 +0200
committerroot <root@gongzg-ivb>2013-10-08 15:52:21 +0800
commit773bf99a078207cc7c796d5dd33cccfcfe727ff1 (patch)
tree844751a27db0c44580788611574d929fdd776920
parent2b37fc5c7ba3eb438b76470a9212f2c3d067e859 (diff)
Use GL_STATIC_DRAW for element index buffer
The buffer never changes anyway. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
-rw-r--r--src/glamor_render.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/glamor_render.c b/src/glamor_render.c
index d2ac381..ca8e509 100644
--- a/src/glamor_render.c
+++ b/src/glamor_render.c
@@ -408,7 +408,7 @@ glamor_init_composite_shaders(ScreenPtr screen)
if (glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP) {
dispatch->glBufferData(GL_ELEMENT_ARRAY_BUFFER,
eb_size,
- NULL, GL_DYNAMIC_DRAW);
+ NULL, GL_STATIC_DRAW);
eb = dispatch->glMapBuffer(GL_ELEMENT_ARRAY_BUFFER, GL_WRITE_ONLY);
}
else {
@@ -428,7 +428,7 @@ glamor_init_composite_shaders(ScreenPtr screen)
} else {
dispatch->glBufferData(GL_ELEMENT_ARRAY_BUFFER,
eb_size,
- eb, GL_DYNAMIC_DRAW);
+ eb, GL_STATIC_DRAW);
dispatch->glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
dispatch->glBindBuffer(GL_ARRAY_BUFFER, glamor_priv->vbo);