diff options
author | Tom Stellard <[email protected]> | 2015-02-26 21:27:27 -0500 |
---|---|---|
committer | Tom Stellard <[email protected]> | 2015-03-09 13:53:33 +0000 |
commit | 51b43c559f40eed2d02a35014c86b6a3e232c6fa (patch) | |
tree | 8b58d6d394d1cbec4611b585f3c8f3807d4ef163 /src/gallium/drivers/radeonsi | |
parent | bbfa1c323917cc54162a64e7882cecaaaa9a7b70 (diff) |
radeonsi: Add additional information to shader dumps
This adds SGPR count, VGPR count, shader size, LDS size, and scratch
usage to shader dumps.
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 87aef4d77a7..0ef58a7310e 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -2605,17 +2605,23 @@ int si_shader_binary_read(struct si_screen *sscreen, bool dump = r600_can_dump_shader(&sscreen->b, shader->selector ? shader->selector->tokens : NULL); - if (dump && !binary->disassembled) { - 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], + si_shader_binary_read_config(sscreen, shader, 0); + + if (dump) { + if (!binary->disassembled) { + 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]); + } } + fprintf(stderr, "SGPRS: %d\nVGPRS: %d\nCode Size: %d bytes\nLDS: %d blocks\n" + "Scratch: %d bytes per wave\n", + shader->num_sgprs, shader->num_vgprs, binary->code_size, + shader->lds_size, shader->scratch_bytes_per_wave); } - si_shader_binary_read_config(sscreen, shader, 0); - /* copy new shader */ code_size = binary->code_size + binary->rodata_size; r600_resource_reference(&shader->bo, NULL); |