From: Eric Anholt Date: Wed, 27 Jul 2016 00:21:46 +0000 (-0700) Subject: vc4: Dump NIR at shader state creation time as well. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=36b9eb82c1077af4e30182e13e77e6890ad30105;p=mesa.git vc4: Dump NIR at shader state creation time as well. I keep wanting to see this version of the NIR. --- diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c index 9057b86068e..0afd8c6e36e 100644 --- a/src/gallium/drivers/vc4/vc4_program.c +++ b/src/gallium/drivers/vc4/vc4_program.c @@ -2173,6 +2173,14 @@ vc4_shader_state_create(struct pipe_context *pctx, so->base.type = PIPE_SHADER_IR_NIR; so->base.ir.nir = s; + if (vc4_debug & VC4_DEBUG_NIR) { + fprintf(stderr, "%s prog %d NIR:\n", + gl_shader_stage_name(s->stage), + so->program_id); + nir_print_shader(s, stderr); + fprintf(stderr, "\n"); + } + return so; }