blitter: add blitter destruction path

Reviewed-by: Jakob Bornecrantz <jakob@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
macos/master
Dave Airlie 6 years ago committed by Jakob Bornecrantz
parent 2d6713c6cd
commit 8498354597
  1. 12
      src/vrend_blitter.c
  2. 2
      src/vrend_renderer.c
  3. 1
      src/vrend_renderer.h

@ -838,8 +838,18 @@ void vrend_renderer_blit_gl(UNUSED struct vrend_context *ctx,
glBufferData(GL_ARRAY_BUFFER, sizeof(blit_ctx->vertices), blit_ctx->vertices, GL_STATIC_DRAW);
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
}
glUseProgram(0);
glDeleteProgram(prog_id);
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_STENCIL_ATTACHMENT,
GL_TEXTURE_2D, 0, 0);
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0,
GL_TEXTURE_2D, 0, 0);
}
}
void vrend_blitter_fini(void)
{
vrend_blit_ctx.initialised = false;
vrend_clicbs->destroy_gl_context(vrend_blit_ctx.gl_context);
memset(&vrend_blit_ctx, 0, sizeof(vrend_blit_ctx));
}

@ -5211,6 +5211,7 @@ vrend_renderer_fini(void)
vrend_state.eventfd = -1;
}
vrend_blitter_fini();
vrend_decode_reset(false);
vrend_object_fini_resource_table();
vrend_decode_reset(true);
@ -8579,6 +8580,7 @@ void vrend_renderer_reset(void)
vrend_state.stop_sync_thread = false;
}
vrend_reset_fences();
vrend_blitter_fini();
vrend_decode_reset(false);
vrend_object_fini_resource_table();
vrend_decode_reset(true);

@ -399,6 +399,7 @@ void vrend_renderer_blit_gl(struct vrend_context *ctx,
struct vrend_resource *dst_res,
const struct pipe_blit_info *info,
bool has_texture_srgb_decode);
void vrend_blitter_fini(void);
void vrend_renderer_reset(void);
int vrend_renderer_get_poll_fd(void);

Loading…
Cancel
Save