mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 08:50:13 +01:00
radeonsi/compute: Fix memory leak
Free shader buffer object for all kernels when deleting compute state. Signed-off-by: Aaron Watry <awatry@gmail.com>
This commit is contained in:
parent
8199d149ed
commit
ec1ada7327
1 changed files with 6 additions and 0 deletions
|
|
@ -301,6 +301,12 @@ static void si_delete_compute_state(struct pipe_context *ctx, void* state){
|
|||
}
|
||||
|
||||
if (program->kernels) {
|
||||
for (int i = 0; i < program->num_kernels; i++){
|
||||
if (program->kernels[i].bo){
|
||||
si_pipe_shader_destroy(ctx, &program->kernels[i]);
|
||||
}
|
||||
}
|
||||
|
||||
FREE(program->kernels);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue