mesa: tweak output of _mesa_write_shader_to_file()
authorBrian Paul <brianp@vmware.com>
Fri, 6 Feb 2009 17:20:33 +0000 (10:20 -0700)
committerBrian Paul <brianp@vmware.com>
Fri, 6 Feb 2009 17:20:33 +0000 (10:20 -0700)
Enclose GPU code in comments to the file can be re-fed back into GLSL compiler.

src/mesa/shader/prog_print.c

index fa1d3614bfa7079e33909004dda5c5c04f694353..8b0f16e688fb929b3312b0ec95610e9fb69a28ed 100644 (file)
@@ -902,7 +902,9 @@ _mesa_write_shader_to_file(const struct gl_shader *shader)
    }
    else {
       fprintf(f, "/* GPU code */\n");
+      fprintf(f, "/*\n");
       _mesa_fprint_program_opt(f, shader->Program, PROG_PRINT_DEBUG, GL_TRUE);
+      fprintf(f, "*/\n");
    }
 
    fclose(f);