summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/cso_cache
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2014-12-07 14:21:41 +0100
committerMarek Olšák <[email protected]>2014-12-10 21:59:36 +0100
commit0a60ebe30c186daf1fbe569e07bfe2e75f765824 (patch)
tree280a661cbf9b49842ffb8009867055e30a6c9df4 /src/gallium/auxiliary/cso_cache
parentee5fb8d1ba7f50ed94e1a34fa0f6e15a0588145e (diff)
cso: put cso_release_all into cso_destroy_context
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/cso_cache')
-rw-r--r--src/gallium/auxiliary/cso_cache/cso_context.c20
-rw-r--r--src/gallium/auxiliary/cso_cache/cso_context.h4
2 files changed, 5 insertions, 19 deletions
diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c
index 3d8860f7b88..5d597ba5c29 100644
--- a/src/gallium/auxiliary/cso_cache/cso_context.c
+++ b/src/gallium/auxiliary/cso_cache/cso_context.c
@@ -286,9 +286,9 @@ out:
}
/**
- * Prior to context destruction, this function unbinds all state objects.
+ * Free the CSO context.
*/
-void cso_release_all( struct cso_context *ctx )
+void cso_destroy_context( struct cso_context *ctx )
{
unsigned i, shader;
@@ -355,20 +355,10 @@ void cso_release_all( struct cso_context *ctx )
cso_cache_delete( ctx->cache );
ctx->cache = NULL;
}
-}
-
-/**
- * Free the CSO context. NOTE: the state tracker should have previously called
- * cso_release_all().
- */
-void cso_destroy_context( struct cso_context *ctx )
-{
- if (ctx) {
- if (ctx->vbuf)
- u_vbuf_destroy(ctx->vbuf);
- FREE( ctx );
- }
+ if (ctx->vbuf)
+ u_vbuf_destroy(ctx->vbuf);
+ FREE( ctx );
}
diff --git a/src/gallium/auxiliary/cso_cache/cso_context.h b/src/gallium/auxiliary/cso_cache/cso_context.h
index f0a08bb0d2c..aa56c589dad 100644
--- a/src/gallium/auxiliary/cso_cache/cso_context.h
+++ b/src/gallium/auxiliary/cso_cache/cso_context.h
@@ -42,13 +42,9 @@ struct cso_context;
struct u_vbuf;
struct cso_context *cso_create_context( struct pipe_context *pipe );
-
-void cso_release_all( struct cso_context *ctx );
-
void cso_destroy_context( struct cso_context *cso );
-
enum pipe_error cso_set_blend( struct cso_context *cso,
const struct pipe_blend_state *blend );
void cso_save_blend(struct cso_context *cso);