projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8199d14
)
radeonsi/compute: Fix memory leak
author
Aaron Watry
<awatry@gmail.com>
Wed, 12 Mar 2014 18:26:10 +0000
(13:26 -0500)
committer
Aaron Watry
<awatry@gmail.com>
Sat, 15 Mar 2014 16:59:19 +0000
(11:59 -0500)
Free shader buffer object for all kernels when deleting compute state.
Signed-off-by: Aaron Watry <awatry@gmail.com>
src/gallium/drivers/radeonsi/si_compute.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/radeonsi/si_compute.c
b/src/gallium/drivers/radeonsi/si_compute.c
index
e16feab
..
c0637f6
100644
(file)
--- a/
src/gallium/drivers/radeonsi/si_compute.c
+++ b/
src/gallium/drivers/radeonsi/si_compute.c
@@
-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);
}