Mesa (master): mesa: also pass the GPU program to _mesa_append_uniforms_to_file()

Brian Paul brianp at kemper.freedesktop.org
Fri Aug 14 19:07:43 UTC 2009


Module: Mesa
Branch: master
Commit: 12199ed96ca0dd2307e9893c58300623cfa6c0ee
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=12199ed96ca0dd2307e9893c58300623cfa6c0ee

Author: Brian Paul <brianp at vmware.com>
Date:   Fri Aug 14 12:57:39 2009 -0600

mesa: also pass the GPU program to _mesa_append_uniforms_to_file()

We want the post-link program at this points.

---

 src/mesa/shader/prog_print.c |    5 +++--
 src/mesa/shader/prog_print.h |    3 ++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c
index 1bc2109..3c1c17e 100644
--- a/src/mesa/shader/prog_print.c
+++ b/src/mesa/shader/prog_print.c
@@ -964,7 +964,8 @@ _mesa_write_shader_to_file(const struct gl_shader *shader)
  * _mesa_write_shader_to_file function.
  */
 void
-_mesa_append_uniforms_to_file(const struct gl_shader *shader)
+_mesa_append_uniforms_to_file(const struct gl_shader *shader,
+                              const struct gl_program *prog)
 {
    const char *type;
    char filename[100];
@@ -984,7 +985,7 @@ _mesa_append_uniforms_to_file(const struct gl_shader *shader)
 
    fprintf(f, "/* First-draw parameters / constants */\n");
    fprintf(f, "/*\n");
-   _mesa_fprint_parameter_list(f, shader->Program->Parameters);
+   _mesa_fprint_parameter_list(f, prog->Parameters);
    fprintf(f, "*/\n");
 
    fclose(f);
diff --git a/src/mesa/shader/prog_print.h b/src/mesa/shader/prog_print.h
index 460426f..fc286de 100644
--- a/src/mesa/shader/prog_print.h
+++ b/src/mesa/shader/prog_print.h
@@ -87,7 +87,8 @@ extern void
 _mesa_write_shader_to_file(const struct gl_shader *shader);
 
 extern void
-_mesa_append_uniforms_to_file(const struct gl_shader *shader);
+_mesa_append_uniforms_to_file(const struct gl_shader *shader,
+                              const struct gl_program *prog);
 
 
 #endif /* PROG_PRINT_H */




More information about the mesa-commit mailing list