mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 09:18:04 +02: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) {
|
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);
|
FREE(program->kernels);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue