예제 #1
0
파일: xa_context.c 프로젝트: DirectFB/mesa
XA_EXPORT void
xa_context_destroy(struct xa_context *r)
{
    struct pipe_resource **vsbuf = &r->vs_const_buffer;
    struct pipe_resource **fsbuf = &r->fs_const_buffer;

    if (*vsbuf)
	pipe_resource_reference(vsbuf, NULL);

    if (*fsbuf)
	pipe_resource_reference(fsbuf, NULL);

    if (r->shaders) {
	xa_shaders_destroy(r->shaders);
	r->shaders = NULL;
    }

    xa_ctx_sampler_views_destroy(r);

    if (r->cso) {
	cso_release_all(r->cso);
	cso_destroy_context(r->cso);
	r->cso = NULL;
    }

    r->pipe->destroy(r->pipe);
}
예제 #2
0
파일: xa_composite.c 프로젝트: Sheph/mesa
XA_EXPORT void
xa_composite_done(struct xa_context *ctx)
{
    renderer_draw_flush(ctx);

    ctx->comp = NULL;
    ctx->has_solid_color = FALSE;
    xa_ctx_sampler_views_destroy(ctx);
}