nir/print: show shader name/label if set
authorRob Clark <robclark@freedesktop.org>
Mon, 26 Oct 2015 17:29:45 +0000 (13:29 -0400)
committerRob Clark <robclark@freedesktop.org>
Fri, 20 Nov 2015 01:03:32 +0000 (20:03 -0500)
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/glsl/nir/nir_print.c

index f7f5fdf3181c0f76430c159a5bf57c8e4369cd19..c4160e6b50f9260b9a91d686fe03a5bc9ad20789 100644 (file)
@@ -977,6 +977,12 @@ nir_print_shader(nir_shader *shader, FILE *fp)
 
    fprintf(fp, "shader: %s\n", gl_shader_stage_name(shader->stage));
 
+   if (shader->info.name)
+      fprintf(fp, "name: %s\n", shader->info.name);
+
+   if (shader->info.label)
+      fprintf(fp, "label: %s\n", shader->info.label);
+
    nir_foreach_variable(var, &shader->uniforms) {
       print_var_decl(var, &state);
    }