[Mesa-dev] [PATCH 07/58] mesa: pass gl_program to _mesa_append_uniforms_to_file()

Timothy Arceri timothy.arceri at collabora.com
Wed Nov 30 00:32:37 UTC 2016


On Mon, 2016-11-28 at 19:05 -0800, Ian Romanick wrote:
> On 11/20/2016 05:28 AM, Timothy Arceri wrote:
> > 
> > This now contains everything we need.
> > ---
> >  src/mesa/main/api_validate.c  | 2 +-
> >  src/mesa/program/prog_print.c | 5 ++---
> >  src/mesa/program/prog_print.h | 2 +-
> >  3 files changed, 4 insertions(+), 5 deletions(-)
> > 
> > diff --git a/src/mesa/main/api_validate.c
> > b/src/mesa/main/api_validate.c
> > index d3b4cab..cb6e203 100644
> > --- a/src/mesa/main/api_validate.c
> > +++ b/src/mesa/main/api_validate.c
> > @@ -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++) {
> > diff --git a/src/mesa/program/prog_print.c
> > b/src/mesa/program/prog_print.c
> > index bdeb8fd..6522803 100644
> > --- a/src/mesa/program/prog_print.c
> > +++ b/src/mesa/program/prog_print.c
> > @@ -997,14 +997,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 *const 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";
> > diff --git a/src/mesa/program/prog_print.h
> > b/src/mesa/program/prog_print.h
> > index 7b1e1fe..a4c84a5 100644
> > --- a/src/mesa/program/prog_print.h
> > +++ b/src/mesa/program/prog_print.h
> > @@ -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 *const
> > prog);
>                                                           ^^^^^
> Does the compiler give a warning for the second const?

Whoops copy and paste error. No it gave no warning. Will fix.

> 
> > 
> >  
> >  
> >  #ifdef __cplusplus
> > 
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list