aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/glamor/glamor_tile.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/glamor/glamor_tile.c')
-rw-r--r--xorg-server/glamor/glamor_tile.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/xorg-server/glamor/glamor_tile.c b/xorg-server/glamor/glamor_tile.c
index 9e115cad1..4e479763e 100644
--- a/xorg-server/glamor/glamor_tile.c
+++ b/xorg-server/glamor/glamor_tile.c
@@ -62,7 +62,7 @@ glamor_init_tile_shader(ScreenPtr screen)
GLint sampler_uniform_location;
glamor_priv = glamor_get_screen_private(screen);
- glamor_get_context(glamor_priv);
+ glamor_make_current(glamor_priv);
glamor_priv->tile_prog = glCreateProgram();
vs_prog = glamor_compile_glsl_prog(GL_VERTEX_SHADER, tile_vs);
fs_prog = glamor_compile_glsl_prog(GL_FRAGMENT_SHADER, tile_fs);
@@ -82,7 +82,6 @@ glamor_init_tile_shader(ScreenPtr screen)
glamor_priv->tile_wh =
glGetUniformLocation(glamor_priv->tile_prog, "wh");
- glamor_put_context(glamor_priv);
}
void
@@ -91,9 +90,8 @@ glamor_fini_tile_shader(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->tile_prog);
- glamor_put_context(glamor_priv);
}
static void
@@ -123,7 +121,7 @@ _glamor_tile(PixmapPtr pixmap, PixmapPtr tile,
glamor_set_destination_pixmap_priv_nc(dst_pixmap_priv);
pixmap_priv_get_dest_scale(dst_pixmap_priv, &dst_xscale, &dst_yscale);
pixmap_priv_get_scale(src_pixmap_priv, &src_xscale, &src_yscale);
- glamor_get_context(glamor_priv);
+ glamor_make_current(glamor_priv);
glUseProgram(glamor_priv->tile_prog);
glamor_pixmap_fbo_fix_wh_ratio(wh, src_pixmap_priv);
@@ -155,7 +153,6 @@ _glamor_tile(PixmapPtr pixmap, PixmapPtr tile,
glDisableVertexAttribArray(GLAMOR_VERTEX_SOURCE);
glDisableVertexAttribArray(GLAMOR_VERTEX_POS);
- glamor_put_context(glamor_priv);
glamor_priv->state = RENDER_STATE;
glamor_priv->render_idle_cnt = 0;
@@ -193,10 +190,9 @@ glamor_tile(PixmapPtr pixmap, PixmapPtr tile,
goto fail;
}
- glamor_get_context(glamor_priv);
+ glamor_make_current(glamor_priv);
if (!glamor_set_alu(screen, alu)) {
glamor_fallback("unsupported alu %x\n", alu);
- glamor_put_context(glamor_priv);
goto fail;
}
@@ -290,7 +286,6 @@ glamor_tile(PixmapPtr pixmap, PixmapPtr tile,
_glamor_tile(pixmap, tile, x, y, width, height, tile_x, tile_y);
glamor_set_alu(screen, GXcopy);
- glamor_put_context(glamor_priv);
return TRUE;
fail:
return FALSE;