[Mesa-dev] [PATCH 3/4] r600g/compute: Stop leaking CL shader RAM/VRAM
Aaron Watry
awatry at gmail.com
Thu Nov 13 15:43:11 PST 2014
shader->code_bo was leaked VRAM
shader->bc.bytecode, shader->binary.* were leaked system memory.
Signed-off-by: Aaron Watry <awatry at gmail.com>
---
src/gallium/drivers/r600/evergreen_compute.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/gallium/drivers/r600/evergreen_compute.c b/src/gallium/drivers/r600/evergreen_compute.c
index 5389f96..f3ccffd 100644
--- a/src/gallium/drivers/r600/evergreen_compute.c
+++ b/src/gallium/drivers/r600/evergreen_compute.c
@@ -268,6 +268,13 @@ void evergreen_delete_compute_state(struct pipe_context *ctx, void* state)
FREE(shader->kernels);
shader->kernels = NULL;
}
+#else
+ pipe_resource_reference(&shader->code_bo, NULL);
+ FREE(shader->bc.bytecode);
+ FREE(shader->binary.code);
+ FREE(shader->binary.config);
+ FREE(shader->binary.global_symbol_offsets);
+ FREE(shader->binary.rodata);
#endif
#endif
--
2.1.0
More information about the mesa-dev
mailing list