diff options
author | Marek Olšák <[email protected]> | 2015-07-25 16:15:48 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2015-07-31 16:49:17 +0200 |
commit | 3063c5e3d3fefdc5eed7600882bd08f56bf86db8 (patch) | |
tree | b124552489ac8f1d0dc68e8e0523cf855e6941e6 /src/gallium/drivers/radeonsi | |
parent | 2dcbd427da74c8f2b6f46e789924a7ced67be260 (diff) |
radeonsi: add a debug flag that disables printing ISA in shader dumps
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index dec68b3a8f0..4151e011d58 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -3811,15 +3811,17 @@ int si_shader_binary_read(struct si_screen *sscreen, struct si_shader *shader) si_shader_binary_upload(sscreen, shader); if (dump) { - if (binary->disasm_string) { - fprintf(stderr, "\nShader Disassembly:\n\n"); - fprintf(stderr, "%s\n", binary->disasm_string); - } else { - fprintf(stderr, "SI CODE:\n"); - for (i = 0; i < binary->code_size; i+=4 ) { - fprintf(stderr, "@0x%x: %02x%02x%02x%02x\n", i, binary->code[i + 3], - binary->code[i + 2], binary->code[i + 1], - binary->code[i]); + if (!(sscreen->b.debug_flags & DBG_NO_ASM)) { + if (binary->disasm_string) { + fprintf(stderr, "\nShader Disassembly:\n\n"); + fprintf(stderr, "%s\n", binary->disasm_string); + } else { + fprintf(stderr, "SI CODE:\n"); + for (i = 0; i < binary->code_size; i+=4 ) { + fprintf(stderr, "@0x%x: %02x%02x%02x%02x\n", i, binary->code[i + 3], + binary->code[i + 2], binary->code[i + 1], + binary->code[i]); + } } } |