summaryrefslogtreecommitdiff
path: root/glamor/glamor.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2014-01-06 09:29:57 +0800
committerEric Anholt <eric@anholt.net>2014-03-10 13:57:21 -0700
commitd310d566b18e55bce27301e9ac78a7894d5194dd (patch)
tree4f49c3caa123776608ee551b180162fed831f791 /glamor/glamor.c
parentffc8423077d8b5af36ab59f59e4e18109586aec9 (diff)
glamor: Extract the streamed vertex data code used by Render.
We should be uploading any vertex data using this kind of upload style, since it saves a bunch of extra copies of our vertex data. v2: - Add a simple comment about what the function does. - Use get_vbo_space()'s return in trapezoids, instead of dereffing glamor_priv->vb (by Markus Wick). - Fix the double-unmapping by moving put_vbo_space() outside of flush_composite_rects(). - Remove the rest of the composite_vbo_offset usage, and just always use get_vbo_space()'s return value. v3: - Fix failure to put_vbo_space in traps when no prims were generated. - Unbind the VBO from put_vbo_space(). Keeps callers from forgetting to do so. v4: - Split out some changes into the previous 3 commits while trying to track down a regression. - Fix regression due to rebase fail where glamor_priv->vbo_offset wasn't incremented. v5: - Fix GLES2 VBO sizing. - Add a comment about resize behavior. - Move glamor_vbo.c init code to glamor_vbo.c from glamor_render.c. (Derived from Markus's changes, but the GLES2 fix dropped almost all of the code in the functions). v6: - Drop the initial BufferData on GLES2 (it happens at put() time). - Don't forget to set vbo_offset to the size on GLES2. - Use char * instead of void * in the cast to return the vbo_offset. - Resize the default FBO to 512kb, to be similar to previous behavior. +1.66124% +/- 0.284223% (n=679) on aa10text. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Markus Wick <markus at selfnet.de>
Diffstat (limited to 'glamor/glamor.c')
-rw-r--r--glamor/glamor.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/glamor/glamor.c b/glamor/glamor.c
index fe9f76179..dc69c7229 100644
--- a/glamor/glamor.c
+++ b/glamor/glamor.c
@@ -439,6 +439,7 @@ glamor_init(ScreenPtr screen, unsigned int flags)
ps->DestroyPicture = glamor_destroy_picture;
glamor_init_composite_shaders(screen);
#endif
+ glamor_init_vbo(screen);
glamor_init_pixmap_fbo(screen);
glamor_init_solid_shader(screen);
glamor_init_tile_shader(screen);
@@ -478,6 +479,7 @@ glamor_release_screen_priv(ScreenPtr screen)
#ifdef RENDER
glamor_fini_composite_shaders(screen);
#endif
+ glamor_fini_vbo(screen);
glamor_fini_pixmap_fbo(screen);
glamor_fini_solid_shader(screen);
glamor_fini_tile_shader(screen);