Merge branch 'arb_half_float_vertex'
[mesa.git] / src / gallium / drivers / svga / svga_pipe_fs.c
index a461a86dd316ea0915569fa4598caa527b0560ee..32f07fb2616c744fc4e74b525c5c823ebd35effd 100644 (file)
 
 #include "svga_screen.h"
 #include "svga_context.h"
-#include "svga_state.h"
 #include "svga_tgsi.h"
 #include "svga_hw_reg.h"
 #include "svga_cmd.h"
-#include "svga_draw.h"
 #include "svga_debug.h"
 
 
@@ -111,6 +109,13 @@ void svga_delete_fs_state(struct pipe_context *pipe, void *shader)
       util_bitmask_clear( svga->fs_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.fs)
+         svga->state.hw_draw.fs = NULL;
    }
 
    FREE((void *)fs->base.tokens);