Mesa (master): st/mesa: Reset the constant buffers before destroying the pipe context.
Tilman Sauerbeck
tilman at kemper.freedesktop.org
Thu Nov 4 19:10:40 UTC 2010
Module: Mesa
Branch: master
Commit: 646a8b7e1dfbd126819d577a94102e64748d0b9d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=646a8b7e1dfbd126819d577a94102e64748d0b9d
Author: Tilman Sauerbeck <tilman at code-monkey.de>
Date: Tue Nov 2 22:15:15 2010 +0100
st/mesa: Reset the constant buffers before destroying the pipe context.
Signed-off-by: Tilman Sauerbeck <tilman at code-monkey.de>
---
src/mesa/state_tracker/st_context.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index b5ea6d0..d0dcdd4 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -238,6 +238,11 @@ void st_destroy_context( struct st_context *st )
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);
More information about the mesa-commit
mailing list