From: Nicolai Hähnle Date: Fri, 19 May 2017 15:42:20 +0000 (+0200) Subject: radeonsi: dump NIR instead of TGSI when appropriate X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d77526ee3094293b62d08f6c04f28801d7868354;p=mesa.git radeonsi: dump NIR instead of TGSI when appropriate Reviewed-by: Marek Olšák --- 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); }