From 38d8b180038eef692cbc75731d340c9fcc721784 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Tue, 5 Jan 2010 17:56:26 +0000 Subject: svga: Remove stale references to delete shader results. To ensure that a new result that happens to have the same address of the old one will be detected as a change. --- src/gallium/drivers/svga/svga_pipe_vs.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/gallium/drivers/svga/svga_pipe_vs.c') diff --git a/src/gallium/drivers/svga/svga_pipe_vs.c b/src/gallium/drivers/svga/svga_pipe_vs.c index 02709e12bd..fd9864c51a 100644 --- a/src/gallium/drivers/svga/svga_pipe_vs.c +++ b/src/gallium/drivers/svga/svga_pipe_vs.c @@ -176,6 +176,13 @@ static void svga_delete_vs_state(struct pipe_context *pipe, void *shader) util_bitmask_clear( svga->vs_bm, result->id ); svga_destroy_shader_result( result ); + + /* + * Remove stale references to this result to ensure a new result on the + * same address will be detected as a change. + */ + if(result == svga->state.hw_draw.vs) + svga->state.hw_draw.vs = NULL; } FREE((void *)vs->base.tokens); -- cgit v1.2.3