summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2017-05-19 17:42:20 +0200
committerNicolai Hähnle <[email protected]>2017-07-31 14:55:33 +0200
commitd77526ee3094293b62d08f6c04f28801d7868354 (patch)
tree8c1055576a0409cf12e50f57c024ce21b40fc253 /src/gallium/drivers
parentc5f70a517442ac98861f7c84eb04bbe3b8823a2d (diff)
radeonsi: dump NIR instead of TGSI when appropriate
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.c6
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 3903d163d18..ac58d87784a 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";
@@ -6215,7 +6216,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);
}