summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_shader.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/amd/vulkan/radv_shader.c')
-rw-r--r--src/amd/vulkan/radv_shader.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index de7d9a27524..1e25ea378ea 100644
--- a/src/amd/vulkan/radv_shader.c
+++ b/src/amd/vulkan/radv_shader.c
@@ -425,8 +425,14 @@ shader_variant_create(struct radv_device *device,
free(binary.rodata);
free(binary.global_symbol_offsets);
free(binary.relocs);
- free(binary.disasm_string);
variant->ref_count = 1;
+
+ if (device->trace_bo) {
+ variant->disasm_string = binary.disasm_string;
+ } else {
+ free(binary.disasm_string);
+ }
+
return variant;
}
@@ -477,6 +483,7 @@ radv_shader_variant_destroy(struct radv_device *device,
list_del(&variant->slab_list);
mtx_unlock(&device->shader_slab_mutex);
+ free(variant->disasm_string);
free(variant);
}