[Glamor] [PATCH 2/3] Use GL_STATIC_DRAW for element index buffer
Grigori Goronzy
greg at chown.ath.cx
Tue Oct 1 15:37:56 PDT 2013
The buffer never changes anyway.
---
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);
--
1.8.1.2
More information about the Glamor
mailing list