diff options
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/cso_cache/cso_context.c | 20 | ||||
-rw-r--r-- | src/gallium/auxiliary/cso_cache/cso_context.h | 4 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_tests.c | 1 |
3 files changed, 5 insertions, 20 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); diff --git a/src/gallium/auxiliary/util/u_tests.c b/src/gallium/auxiliary/util/u_tests.c index c0f6327b6e9..b42f5e137ba 100644 --- a/src/gallium/auxiliary/util/u_tests.c +++ b/src/gallium/auxiliary/util/u_tests.c @@ -248,7 +248,6 @@ tgsi_vs_window_space_position(struct pipe_context *ctx) cb->width0, cb->height0, red); /* Cleanup. */ - cso_release_all(cso); cso_destroy_context(cso); ctx->delete_vs_state(ctx, vs); ctx->delete_fs_state(ctx, fs); |