From 773bf99a078207cc7c796d5dd33cccfcfe727ff1 Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Wed, 2 Oct 2013 00:37:56 +0200 Subject: Use GL_STATIC_DRAW for element index buffer The buffer never changes anyway. Reviewed-by: Alex Deucher Reviewed-by: Zhigang Gong --- src/glamor_render.c | 4 ++-- 1 file 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); -- cgit v1.2.3