radeonsi/compute: Free program and program.kernels on shutdown

v2: Fix indentation

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>

CC: "10.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 35dad4a1e2)
This commit is contained in:
Aaron Watry 2013-11-06 16:49:22 -06:00 committed by Ian Romanick
parent 531637feee
commit 3a98fc6abe

View file

@ -245,7 +245,21 @@ static void radeonsi_launch_grid(
}
static void si_delete_compute_state(struct pipe_context *ctx, void* state){}
static void si_delete_compute_state(struct pipe_context *ctx, void* state){
struct si_pipe_compute *program = (struct si_pipe_compute *)state;
if (!state) {
return;
}
if (program->kernels) {
FREE(program->kernels);
}
//And then free the program itself.
FREE(program);
}
static void si_set_compute_resources(struct pipe_context * ctx_,
unsigned start, unsigned count,
struct pipe_surface ** surfaces) { }