Commit c5e6fffb authored by Eric Anholt's avatar Eric Anholt

glamor: Drop CloseScreen-time GL resource cleanup code.

These will all be freed when the context is freed.
Signed-off-by: Eric Anholt's avatarEric Anholt <eric@anholt.net>
Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
parent 3d6dcad0
......@@ -585,13 +585,8 @@ glamor_release_screen_priv(ScreenPtr screen)
glamor_screen_private *glamor_priv;
glamor_priv = glamor_get_screen_private(screen);
glamor_fini_composite_shaders(screen);
glamor_fini_vbo(screen);
glamor_fini_pixmap_fbo(screen);
glamor_fini_finish_access_shaders(screen);
#ifdef GLAMOR_GRADIENT_SHADER
glamor_fini_gradient_shader(screen);
#endif
glamor_pixmap_fini(screen);
free(glamor_priv);
......
......@@ -283,17 +283,6 @@ glamor_init_finish_access_shaders(ScreenPtr screen)
glUniform1i(glamor_priv->finish_access_swap_rb[1], 0);
}
void
glamor_fini_finish_access_shaders(ScreenPtr screen)
{
glamor_screen_private *glamor_priv;
glamor_priv = glamor_get_screen_private(screen);
glamor_make_current(glamor_priv);
glDeleteProgram(glamor_priv->finish_access_prog[0]);
glDeleteProgram(glamor_priv->finish_access_prog[1]);
}
GCOps glamor_gc_ops = {
.FillSpans = glamor_fill_spans,
.SetSpans = glamor_set_spans,
......
......@@ -582,27 +582,6 @@ glamor_init_gradient_shader(ScreenPtr screen)
_glamor_create_radial_gradient_program(screen, RADIAL_LARGE_STOPS, 0);
}
void
glamor_fini_gradient_shader(ScreenPtr screen)
{
glamor_screen_private *glamor_priv;
int i = 0;
glamor_priv = glamor_get_screen_private(screen);
glamor_make_current(glamor_priv);
for (i = 0; i < 3; i++) {
/* Linear Gradient */
if (glamor_priv->gradient_prog[SHADER_GRADIENT_LINEAR][i])
glDeleteProgram(glamor_priv->gradient_prog
[SHADER_GRADIENT_LINEAR][i]);
if (glamor_priv->gradient_prog[SHADER_GRADIENT_RADIAL][i])
glDeleteProgram(glamor_priv->gradient_prog
[SHADER_GRADIENT_RADIAL][i]);
}
}
static void
_glamor_gradient_convert_trans_matrix(PictTransform *from, float to[3][3],
int width, int height, int normalize)
......
......@@ -645,7 +645,6 @@ glamor_pixmap_fbo *glamor_create_fbo_array(glamor_screen_private *glamor_priv,
/* glamor_core.c */
void glamor_init_finish_access_shaders(ScreenPtr screen);
void glamor_fini_finish_access_shaders(ScreenPtr screen);
Bool glamor_get_drawable_location(const DrawablePtr drawable);
void glamor_get_drawable_deltas(DrawablePtr drawable, PixmapPtr pixmap,
......@@ -703,7 +702,6 @@ void glamor_composite(CARD8 op,
INT16 xDst, INT16 yDst, CARD16 width, CARD16 height);
void glamor_init_composite_shaders(ScreenPtr screen);
void glamor_fini_composite_shaders(ScreenPtr screen);
void glamor_composite_rects(CARD8 op,
PicturePtr pDst,
xRenderColor *color, int nRect, xRectangle *rects);
......@@ -722,7 +720,6 @@ void glamor_trapezoids(CARD8 op,
/* glamor_gradient.c */
void glamor_init_gradient_shader(ScreenPtr screen);
void glamor_fini_gradient_shader(ScreenPtr screen);
PicturePtr glamor_generate_linear_gradient_picture(ScreenPtr screen,
PicturePtr src_picture,
int x_source, int y_source,
......
......@@ -414,27 +414,6 @@ glamor_init_composite_shaders(ScreenPtr screen)
free(eb);
}
void
glamor_fini_composite_shaders(ScreenPtr screen)
{
glamor_screen_private *glamor_priv;
glamor_composite_shader *shader;
int i, j, k;
glamor_priv = glamor_get_screen_private(screen);
glamor_make_current(glamor_priv);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
glDeleteBuffers(1, &glamor_priv->ebo);
for (i = 0; i < SHADER_SOURCE_COUNT; i++)
for (j = 0; j < SHADER_MASK_COUNT; j++)
for (k = 0; k < SHADER_IN_COUNT; k++) {
shader = &glamor_priv->composite_shader[i][j][k];
if (shader->prog)
glDeleteProgram(shader->prog);
}
}
static Bool
glamor_set_composite_op(ScreenPtr screen,
CARD8 op, struct blendinfo *op_info_result,
......
......@@ -171,7 +171,6 @@ glamor_fini_vbo(ScreenPtr screen)
glamor_make_current(glamor_priv);
glDeleteBuffers(1, &glamor_priv->vbo);
if (!glamor_priv->has_map_buffer_range)
free(glamor_priv->vb);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment