mesa: pass gl_program to _mesa_append_uniforms_to_file()
authorTimothy Arceri <timothy.arceri@collabora.com>
Mon, 31 Oct 2016 10:51:40 +0000 (21:51 +1100)
committerTimothy Arceri <timothy.arceri@collabora.com>
Thu, 29 Dec 2016 23:57:16 +0000 (10:57 +1100)
This now contains everything we need.

Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/main/api_validate.c
src/mesa/program/prog_print.c
src/mesa/program/prog_print.h

index f68011ebbf9acd4d0999263d00a738a9e6ba5eaf..33e808638423461c0ea1d82e93eef58c82154f02 100644 (file)
@@ -210,7 +210,7 @@ _mesa_valid_to_render(struct gl_context *ctx, const char *where)
          * program isn't also bound to the fragment shader target we don't
          * want to log its fragment data.
          */
-        _mesa_append_uniforms_to_file(shProg[i]->_LinkedShaders[i]);
+        _mesa_append_uniforms_to_file(shProg[i]->_LinkedShaders[i]->Program);
       }
 
       for (i = 0; i < MESA_SHADER_STAGES; i++) {
index 0a4bc51e954ffbfb2f54b608b0823bac9eea2f23..6d04a382865416143c3d205a00a482eca3a317bb 100644 (file)
@@ -1001,14 +1001,13 @@ _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_linked_shader *shader)
+_mesa_append_uniforms_to_file(const struct gl_program *prog)
 {
-   const struct gl_program *const prog = shader->Program;
    const char *type;
    char filename[100];
    FILE *f;
 
-   if (shader->Stage == MESA_SHADER_FRAGMENT)
+   if (prog->info.stage == MESA_SHADER_FRAGMENT)
       type = "frag";
    else
       type = "vert";
index 7b1e1fe3b18e696127a18aa954396c71fbea04be..98a43e63a0039cf21c32cb45273f2c3268fb7329 100644 (file)
@@ -118,7 +118,7 @@ extern void
 _mesa_write_shader_to_file(const struct gl_shader *shader);
 
 extern void
-_mesa_append_uniforms_to_file(const struct gl_linked_shader *shader);
+_mesa_append_uniforms_to_file(const struct gl_program *prog);
 
 
 #ifdef __cplusplus