llvmpipe: destroy setup variants on context destruction
authorRoland Scheidegger <sroland@vmware.com>
Mon, 18 Jun 2012 18:37:34 +0000 (20:37 +0200)
committerJosé Fonseca <jfonseca@vmware.com>
Mon, 16 Jul 2012 18:00:54 +0000 (19:00 +0100)
lp_delete_setup_variants() used to be called in garbage collection,
but this no longer exists hence the setup shaders never got freed.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
src/gallium/drivers/llvmpipe/lp_context.c

index 7f92a5f..9e4c7d6 100644 (file)
@@ -126,6 +126,8 @@ static void llvmpipe_destroy( struct pipe_context *pipe )
       pipe_resource_reference(&llvmpipe->vertex_buffer[i].buffer, NULL);
    }
 
+   lp_delete_setup_variants(llvmpipe);
+
    gallivm_destroy(llvmpipe->gallivm);
 
    align_free( llvmpipe );