summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_context.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/state_tracker/st_context.c')
-rw-r--r--src/mesa/state_tracker/st_context.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index 75fd69540f3..d0dcdd4e29b 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -236,6 +236,13 @@ void st_destroy_context( struct st_context *st )
}
pipe_surface_reference(&st->state.framebuffer.zsbuf, NULL);
+ pipe->set_index_buffer(pipe, NULL);
+
+ for (i = 0; i < PIPE_SHADER_TYPES; i++) {
+ pipe->set_constant_buffer(pipe, PIPE_SHADER_VERTEX, 0, NULL);
+ pipe_resource_reference(&st->state.constants[PIPE_SHADER_VERTEX], NULL);
+ }
+
_mesa_delete_program_cache(st->ctx, st->pixel_xfer.cache);
_vbo_DestroyContext(st->ctx);