diff options
author | Marek Olšák <[email protected]> | 2014-12-07 14:21:41 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2014-12-10 21:59:36 +0100 |
commit | 0a60ebe30c186daf1fbe569e07bfe2e75f765824 (patch) | |
tree | 280a661cbf9b49842ffb8009867055e30a6c9df4 /src/mesa/state_tracker | |
parent | ee5fb8d1ba7f50ed94e1a34fa0f6e15a0588145e (diff) |
cso: put cso_release_all into cso_destroy_context
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_context.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 9da0c776d96..9fd6caece73 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -136,6 +136,8 @@ st_destroy_context_priv(struct st_context *st) if (st->constbuf_uploader) { u_upload_destroy(st->constbuf_uploader); } + + cso_destroy_context(st->cso_context); free( st ); } @@ -348,15 +350,11 @@ destroy_tex_sampler_cb(GLuint id, void *data, void *userData) void st_destroy_context( struct st_context *st ) { struct pipe_context *pipe = st->pipe; - struct cso_context *cso = st->cso_context; struct gl_context *ctx = st->ctx; GLuint i; _mesa_HashWalk(ctx->Shared->TexObjects, destroy_tex_sampler_cb, st); - /* need to unbind and destroy CSO objects before anything else */ - cso_release_all(st->cso_context); - st_reference_fragprog(st, &st->fp, NULL); st_reference_geomprog(st, &st->gp, NULL); st_reference_vertprog(st, &st->vp, NULL); @@ -386,8 +384,6 @@ void st_destroy_context( struct st_context *st ) st_destroy_context_priv(st); st = NULL; - cso_destroy_context(cso); - pipe->destroy( pipe ); free(ctx); |