diff options
author | Samuel Pitoiset <[email protected]> | 2017-09-22 16:44:08 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-10-04 19:37:08 +0200 |
commit | a2a350a3be1a4f3dec8cc3264a19eb877d606628 (patch) | |
tree | 32d8830a1ba76ef648e3ad2a6333fb9e0eded04f /src/amd/vulkan/radv_debug.c | |
parent | 94d800bfa364601faee73826c941015e2f15ae05 (diff) |
radv: dump NIR when a GPU hang is detected
This looks a bit ugly to me, but the existing codepath
is not terribly elegant as well.
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_debug.c')
-rw-r--r-- | src/amd/vulkan/radv_debug.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/amd/vulkan/radv_debug.c b/src/amd/vulkan/radv_debug.c index 97ccfac694f..08ee54c9765 100644 --- a/src/amd/vulkan/radv_debug.c +++ b/src/amd/vulkan/radv_debug.c @@ -495,8 +495,14 @@ radv_dump_shader(struct radv_pipeline *pipeline, if (!shader) return; - fprintf(f, "%s:\n%s\n\n", radv_get_shader_name(shader, stage), - shader->disasm_string); + fprintf(f, "%s:\n\n", radv_get_shader_name(shader, stage)); + + if (shader->nir) { + fprintf(f, "NIR:\n"); + nir_print_shader(shader->nir, f); + } + + fprintf(stderr, "DISASM:\n%s\n", shader->disasm_string); radv_shader_dump_stats(pipeline->device, shader, stage, f); } |