[Mesa-dev] [PATCH] radv: fix a little memleak when we keep shader info
Samuel Pitoiset
samuel.pitoiset at gmail.com
Mon Jul 23 11:50:34 UTC 2018
When we keep shader info for eg. RADV_TRACE_FILE, we don't
free the NIR when creating the pipelines. Though, we have to
free it when destroying the shader module.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
src/amd/vulkan/radv_shader.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index aac5b8a21a..ef7c41af9e 100644
--- a/src/amd/vulkan/radv_shader.c
+++ b/src/amd/vulkan/radv_shader.c
@@ -599,8 +599,8 @@ shader_variant_create(struct radv_device *device,
if (device->keep_shader_info) {
variant->disasm_string = binary.disasm_string;
variant->llvm_ir_string = binary.llvm_ir_string;
+ variant->nir = *shaders;
if (!gs_copy_shader && !module->nir) {
- variant->nir = *shaders;
variant->spirv = (uint32_t *)module->data;
variant->spirv_size = module->size;
}
--
2.18.0
More information about the mesa-dev
mailing list