On 4 September 2013 08:17, Ian Romanick <i...@freedesktop.org> wrote:
> On 09/03/2013 09:41 AM, Paul Berry wrote: > > On 30 August 2013 16:07, Ian Romanick <i...@freedesktop.org > > <mailto:i...@freedesktop.org>> wrote: > > > > From: Ian Romanick <ian.d.roman...@intel.com > > <mailto:ian.d.roman...@intel.com>> > > > > The new function, cross_validate_types_and_qualifiers, will have > > multiple callers from this file in future commits. > > > > Signed-off-by: Ian Romanick <ian.d.roman...@intel.com > > <mailto:ian.d.roman...@intel.com>> > > --- > > src/glsl/link_varyings.cpp | 171 > > +++++++++++++++++++++++++-------------------- > > 1 file changed, 94 insertions(+), 77 deletions(-) > > > > diff --git a/src/glsl/link_varyings.cpp b/src/glsl/link_varyings.cpp > > index 4ceb1d3..a1899f7 100644 > > --- a/src/glsl/link_varyings.cpp > > +++ b/src/glsl/link_varyings.cpp > > @@ -41,6 +41,97 @@ > > > > > > /** > > + * Validate the types and qualifiers of an output from one stage > > against the > > + * matching input to another stage. > > + */ > > +static void > > +cross_validate_types_and_qualifiers(struct gl_shader_program *prog, > > + const ir_variable *input, > > + const ir_variable *output, > > + GLenum consumer_type, > > + const char *consumer_stage, > > + const char *producer_stage) > > > > > > It seems redundant to pass both consumer_type and consumer_stage as > > arguments, since the latter is just > > _mesa_glsl_shader_target_name(consumer_type). You might want to just > > pass consumer_type and producer_type, and use > > _mesa_glsl_shader_target_name() to convert them to strings in the event > > of an error. > > I thought about doing that. I decided against it for a couple > reasons... but now that I've looked at it again, I like it. :) I've > changed the signature to > > static void > cross_validate_types_and_qualifiers(struct gl_shader_program *prog, > const ir_variable *input, > const ir_variable *output, > GLenum consumer_type, > GLenum producer_type); > > And I just call _mesa_glsl_shader_target_name in the linker_error calls. > I pushed this to master of my repo on fdo. Does that look good to you? > Yeah, that looks great. Thanks!
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev