summaryrefslogtreecommitdiff
path: root/glamor
diff options
context:
space:
mode:
authorGrigori Goronzy <greg@chown.ath.cx>2013-10-02 00:37:56 +0200
committerEric Anholt <eric@anholt.net>2013-12-18 11:23:54 -0800
commit5695708ecd2a26fcb9c05985c6758e719071995a (patch)
tree7065f22d90e81e4c387e4b8ae6fb1366f76f24de /glamor
parent8afa008ec4b393666bb3c506a711b4d50cc4e756 (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>
Diffstat (limited to 'glamor')
-rw-r--r--glamor/glamor_render.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c
index d2ac38103..ca8e509da 100644
--- a/glamor/glamor_render.c
+++ b/glamor/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);