vc4: Dump NIR at shader state creation time as well.
authorEric Anholt <eric@anholt.net>
Wed, 27 Jul 2016 00:21:46 +0000 (17:21 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 3 Aug 2016 17:25:08 +0000 (10:25 -0700)
I keep wanting to see this version of the NIR.

src/gallium/drivers/vc4/vc4_program.c

index 9057b86068e38cebccc079a8fa9c38b004dc7f7f..0afd8c6e36eba2f0a1a3d31babecf1b3f5432c15 100644 (file)
@@ -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;
 }