Mesa (gallium-mesa-7.4): mesa: tweak output of _mesa_write_shader_to_file()

Alan Hourihane alanh at kemper.freedesktop.org
Fri Feb 20 01:30:25 UTC 2009


Module: Mesa
Branch: gallium-mesa-7.4
Commit: 334841694d304bdb0b95e2c0f9b197e972b66e9c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=334841694d304bdb0b95e2c0f9b197e972b66e9c

Author: Brian Paul <brianp at vmware.com>
Date:   Fri Feb  6 10:20:33 2009 -0700

mesa: tweak output of _mesa_write_shader_to_file()

Enclose GPU code in comments to the file can be re-fed back into GLSL compiler.

---

 src/mesa/shader/prog_print.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c
index 8edf5c7..0fa51d8 100644
--- a/src/mesa/shader/prog_print.c
+++ b/src/mesa/shader/prog_print.c
@@ -917,7 +917,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);




More information about the mesa-commit mailing list