Mesa (master): cso: check if pipe_context:: bind_vertex_sampler_states is non-null
Brian Paul
brianp at kemper.freedesktop.org
Wed Dec 2 19:25:10 UTC 2009
Module: Mesa
Branch: master
Commit: debc0b6fa8ce110eb4febc376d8327336259742c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=debc0b6fa8ce110eb4febc376d8327336259742c
Author: Brian Paul <brianp at vmware.com>
Date: Wed Dec 2 12:24:24 2009 -0700
cso: check if pipe_context::bind_vertex_sampler_states is non-null
Fixes segfaults upon exit when the CSO module is releasing its objects.
---
src/gallium/auxiliary/cso_cache/cso_context.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c
index b6f7b88..80bd0c9 100644
--- a/src/gallium/auxiliary/cso_cache/cso_context.c
+++ b/src/gallium/auxiliary/cso_cache/cso_context.c
@@ -260,7 +260,8 @@ void cso_release_all( struct cso_context *ctx )
ctx->pipe->bind_blend_state( ctx->pipe, NULL );
ctx->pipe->bind_rasterizer_state( ctx->pipe, NULL );
ctx->pipe->bind_fragment_sampler_states( ctx->pipe, 0, NULL );
- ctx->pipe->bind_vertex_sampler_states(ctx->pipe, 0, NULL);
+ if (ctx->pipe->bind_vertex_sampler_states)
+ ctx->pipe->bind_vertex_sampler_states(ctx->pipe, 0, NULL);
ctx->pipe->bind_depth_stencil_alpha_state( ctx->pipe, NULL );
ctx->pipe->bind_fs_state( ctx->pipe, NULL );
ctx->pipe->bind_vs_state( ctx->pipe, NULL );
More information about the mesa-commit
mailing list