diff options
author | Eric Anholt <eric@anholt.net> | 2014-03-14 17:31:18 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2014-04-23 10:32:23 -0700 |
commit | fab0a4a4c9dad2275bb398d09632f4274b5e16f2 (patch) | |
tree | 0c32caee6cefb480f03c53e8c8aa189500a880be /glamor/glamor_core.c | |
parent | 11ff12d4e74c0b514cb62cc47df9770c91e5002a (diff) |
glamor: Replace glamor_get/put_context() with just glamor_make_current().
Now that we have the DIX global state for the current context, we
don't need to track nesting to try to reduce MakeCurrent overhead.
v2: Fix a mistaken replacement of a put_context with make_current in
glamor_fill_spans_gl() (caught by keithp).
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> (v1)
Reviewed-by: Adam Jackson <ajax@redhat.com> (v1)
Diffstat (limited to 'glamor/glamor_core.c')
-rw-r--r-- | glamor/glamor_core.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/glamor/glamor_core.c b/glamor/glamor_core.c index 5b341d3aa..b34943761 100644 --- a/glamor/glamor_core.c +++ b/glamor/glamor_core.c @@ -241,7 +241,7 @@ glamor_init_finish_access_shaders(ScreenPtr screen) char *source; glamor_priv = glamor_get_screen_private(screen); - glamor_get_context(glamor_priv); + glamor_make_current(glamor_priv); glamor_priv->finish_access_prog[0] = glCreateProgram(); glamor_priv->finish_access_prog[1] = glCreateProgram(); @@ -300,7 +300,6 @@ glamor_init_finish_access_shaders(ScreenPtr screen) glUniform1i(glamor_priv->finish_access_revert[1], 0); glUniform1i(sampler_uniform_location, 0); glUniform1i(glamor_priv->finish_access_swap_rb[1], 0); - glamor_put_context(glamor_priv); } void @@ -309,10 +308,9 @@ glamor_fini_finish_access_shaders(ScreenPtr screen) glamor_screen_private *glamor_priv; glamor_priv = glamor_get_screen_private(screen); - glamor_get_context(glamor_priv); + glamor_make_current(glamor_priv); glDeleteProgram(glamor_priv->finish_access_prog[0]); glDeleteProgram(glamor_priv->finish_access_prog[1]); - glamor_put_context(glamor_priv); } void @@ -341,11 +339,10 @@ glamor_finish_access(DrawablePtr drawable) if (pixmap_priv->base.fbo->pbo != 0 && pixmap_priv->base.fbo->pbo_valid) { assert(glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP); - glamor_get_context(glamor_priv); + glamor_make_current(glamor_priv); glBindBuffer(GL_PIXEL_PACK_BUFFER, 0); glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0); glDeleteBuffers(1, &pixmap_priv->base.fbo->pbo); - glamor_put_context(glamor_priv); pixmap_priv->base.fbo->pbo_valid = FALSE; pixmap_priv->base.fbo->pbo = 0; |