diff options
author | Aaron Watry <[email protected]> | 2013-11-06 16:49:22 -0600 |
---|---|---|
committer | Tom Stellard <[email protected]> | 2013-11-15 09:16:49 -0800 |
commit | 35dad4a1e235b2bf7fb3ecdb82aed0214db69a35 (patch) | |
tree | 3322847e4c6e49d2446206789d16e47a5a88fd90 /src/gallium/drivers/radeonsi | |
parent | d41b10f811a89c76248f195a6b4ade62322b8c3c (diff) |
radeonsi/compute: Free program and program.kernels on shutdown
v2: Fix indentation
Reviewed-by: Tom Stellard <[email protected]>
CC: "10.0" <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/radeonsi_compute.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/radeonsi_compute.c b/src/gallium/drivers/radeonsi/radeonsi_compute.c index 49caa2c6a87..e7bf5a4a597 100644 --- a/src/gallium/drivers/radeonsi/radeonsi_compute.c +++ b/src/gallium/drivers/radeonsi/radeonsi_compute.c @@ -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) { } |