Skip to content

Instantly share code, notes, and snippets.

Created October 10, 2013 01:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/6911363 to your computer and use it in GitHub Desktop.
Save anonymous/6911363 to your computer and use it in GitHub Desktop.
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