summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/radeonsi_shader.c
diff options
context:
space:
mode:
authorJay Cornwall <jay@jcornwall.me>2013-10-10 20:06:48 -0500
committerTom Stellard <thomas.stellard@amd.com>2013-10-12 00:03:58 -0400
commitd7d539a1cb8dcf50cb7cd534e6ae7df3f42914c8 (patch)
treeaf25fab3bed8553f9089060b4f3754aca01e316f /src/gallium/drivers/radeonsi/radeonsi_shader.c
parent7681beedd19cf437252fbc1041b19328ad773ea5 (diff)
downloadexternal_mesa3d-d7d539a1cb8dcf50cb7cd534e6ae7df3f42914c8.zip
external_mesa3d-d7d539a1cb8dcf50cb7cd534e6ae7df3f42914c8.tar.gz
external_mesa3d-d7d539a1cb8dcf50cb7cd534e6ae7df3f42914c8.tar.bz2
radeon/llvm: show LLVM disassembly when available
With code dump enabled LLVM may generate disassembly during compilation. Show this disassembly when available and prefer it to SI bytecode dump. Reviewed-by: Tom Stellard <thomas.stellard@amd.com> Signed-off-by: Jay Cornwall <jay@jcornwall.me>
Diffstat (limited to 'src/gallium/drivers/radeonsi/radeonsi_shader.c')
-rw-r--r--src/gallium/drivers/radeonsi/radeonsi_shader.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/radeonsi_shader.c b/src/gallium/drivers/radeonsi/radeonsi_shader.c
index 97ed4e3..88fc040 100644
--- a/src/gallium/drivers/radeonsi/radeonsi_shader.c
+++ b/src/gallium/drivers/radeonsi/radeonsi_shader.c
@@ -1764,7 +1764,7 @@ int si_compile_llvm(struct r600_context *rctx, struct si_pipe_shader *shader,
memset(&binary, 0, sizeof(binary));
radeon_llvm_compile(mod, &binary,
r600_get_llvm_processor_name(rctx->screen->b.family), dump);
- if (dump) {
+ if (dump && ! binary.disassembled) {
fprintf(stderr, "SI CODE:\n");
for (i = 0; i < binary.code_size; i+=4 ) {
fprintf(stderr, "%02x%02x%02x%02x\n", binary.code[i + 3],