This will allow to dump the active shaders when a hang is
detected. Only the ASM will be dumped for now.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
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;
}
list_del(&variant->slab_list);
mtx_unlock(&device->shader_slab_mutex);
+ free(variant->disasm_string);
free(variant);
}
struct ac_shader_variant_info info;
unsigned rsrc1;
unsigned rsrc2;
+ char *disasm_string; /* debug only */
struct list_head slab_list;
};