OSDN Git Service

gallium: assert that we're not deleting the currently bound shader
authorBrian Paul <brian.paul@tungstengraphics.com>
Thu, 17 Apr 2008 17:13:05 +0000 (11:13 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Thu, 17 Apr 2008 17:13:49 +0000 (11:13 -0600)
src/gallium/drivers/softpipe/sp_state_fs.c

index 4eefd1d..2921066 100644 (file)
@@ -82,7 +82,10 @@ softpipe_bind_fs_state(struct pipe_context *pipe, void *fs)
 void
 softpipe_delete_fs_state(struct pipe_context *pipe, void *fs)
 {
+   struct softpipe_context *softpipe = softpipe_context(pipe);
    struct sp_fragment_shader *state = fs;
+
+   assert(fs != softpipe->fs);
    
    state->delete( state );
 }