Skip to content

Instantly share code, notes, and snippets.

Created Oct 10, 2013
Embed
What would you like to do?
diff --git a/src/gallium/drivers/radeon/radeon_llvm_emit.c b/src/gallium/drivers/radeon/radeon_llvm_emit.c
index 2dd7bf7..5bf00fe 100644
--- a/src/gallium/drivers/radeon/radeon_llvm_emit.c
+++ b/src/gallium/drivers/radeon/radeon_llvm_emit.c
@@ -163,6 +163,10 @@ unsigned radeon_llvm_compile(LLVMModuleRef M, struct radeon_llvm_binary *binary,
binary->config_size = section_data->d_size;
binary->config = MALLOC(binary->config_size * sizeof(unsigned char));
memcpy(binary->config, section_data->d_buf, binary->config_size);
+ } else if (dump && !strcmp(name, ".AMDGPU.disasm")) {
+ section_data = elf_getdata(section, section_data);
+ fprintf(stderr, "\nShader Disassembly:\n\n");
+ fprintf(stderr, "%.*s\n", section_data->d_size, section_data->d_buf);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment