diff options
author | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2017-05-19 17:42:20 +0200 |
---|---|---|
committer | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2017-07-05 12:33:48 +0200 |
commit | 632de8590376764c2f102cbfff404b52d266466e (patch) | |
tree | 50444d6655263dfb9015ead65fab1f3add3c7320 | |
parent | e6ec3e8ceb96503bd389dc7430093c3562205ade (diff) |
radeonsi: dump NIR instead of TGSI when appropriate
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 5ff16f5fd1..2340b20ecc 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -46,6 +46,7 @@ #include "si_pipe.h" #include "sid.h" +#include "compiler/nir/nir.h" static const char *scratch_rsrc_dword0_symbol = "SCRATCH_RSRC_DWORD0"; @@ -6179,7 +6180,10 @@ int si_compile_tgsi_shader(struct si_screen *sscreen, * conversion fails. */ if (r600_can_dump_shader(&sscreen->b, sel->info.processor) && !(sscreen->b.debug_flags & DBG_NO_TGSI)) { - tgsi_dump(sel->tokens, 0); + if (sel->tokens) + tgsi_dump(sel->tokens, 0); + else + nir_print_shader(sel->nir, stderr); si_dump_streamout(&sel->so); } |