mesa: also pass the GPU program to _mesa_append_uniforms_to_file()
authorBrian Paul <brianp@vmware.com>
Fri, 14 Aug 2009 18:57:39 +0000 (12:57 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 14 Aug 2009 18:57:39 +0000 (12:57 -0600)
We want the post-link program at this points.

src/mesa/shader/prog_print.c
src/mesa/shader/prog_print.h

index 1bc210995707c0e7d00ba2d2c1f7e0ffc6c5c974..3c1c17e0996866021fc3ce170eb8aa599a7fa580 100644 (file)
@@ -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);
index 460426fd5105a05b90d58c52797cea2ee4ab84fb..fc286ded540e1855ccb57bc7d49e58c96382eeb3 100644 (file)
@@ -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 */