Mesa (master): vc4: Dump NIR at shader state creation time as well.
Eric Anholt
anholt at kemper.freedesktop.org
Wed Aug 3 17:59:15 UTC 2016
Module: Mesa
Branch: master
Commit: 36b9eb82c1077af4e30182e13e77e6890ad30105
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=36b9eb82c1077af4e30182e13e77e6890ad30105
Author: Eric Anholt <eric at anholt.net>
Date: Tue Jul 26 17:21:46 2016 -0700
vc4: Dump NIR at shader state creation time as well.
I keep wanting to see this version of the NIR.
---
src/gallium/drivers/vc4/vc4_program.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c
index 9057b86..0afd8c6 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;
}
More information about the mesa-commit
mailing list