diff options
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/vulkan/radv_shader.c | 9 | ||||
-rw-r--r-- | src/amd/vulkan/radv_shader.h | 1 |
2 files changed, 9 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); } diff --git a/src/amd/vulkan/radv_shader.h b/src/amd/vulkan/radv_shader.h index 3f8dd92392d..9de3c27550d 100644 --- a/src/amd/vulkan/radv_shader.h +++ b/src/amd/vulkan/radv_shader.h @@ -49,6 +49,7 @@ struct radv_shader_variant { struct ac_shader_variant_info info; unsigned rsrc1; unsigned rsrc2; + char *disasm_string; /* debug only */ struct list_head slab_list; }; |