[Mesa-dev] [PATCH] glsl: look up for transform feedback varyings after linking

Juan A. Suarez Romero jasuarez at igalia.com
Wed Aug 2 07:18:25 UTC 2017


On Wed, 2017-08-02 at 10:47 +1000, Timothy Arceri wrote:
> On 06/07/17 19:12, Juan A. Suarez Romero wrote:
> > Check if shaders have transform feedback varyings also after the
> > post-link step.
> > 
> > This fixes:
> > KHR-GL45.enhanced_layouts.xfb_vertex_streams
> > piglit/spec/arb_enhanced_layouts/gs-stream-location-aliasing
> > ---
> >   src/compiler/glsl/glsl_to_nir.cpp | 3 +++
> >   1 file changed, 3 insertions(+)
> > 
> > diff --git a/src/compiler/glsl/glsl_to_nir.cpp
> > b/src/compiler/glsl/glsl_to_nir.cpp
> > index 2153004..fad08ec 100644
> > --- a/src/compiler/glsl/glsl_to_nir.cpp
> > +++ b/src/compiler/glsl/glsl_to_nir.cpp
> > @@ -171,6 +171,9 @@ glsl_to_nir(const struct gl_shader_program
> > *shader_prog,
> >         shader->info.label = ralloc_strdup(shader, shader_prog-
> > >Label);
> 
> Can you add a couple of comments:
> 


Sure!

Thank you.

	J.A.

>         /* Check for transform feedback varyings specified via the
> API */
> >      shader->info.has_transform_feedback_varyings =
> >         shader_prog->TransformFeedback.NumVarying > 0;
> 
>        /* Check for transform feedback varyings specified in Shader
> */
> > +   if (shader_prog->last_vert_prog)
> > +      shader->info.has_transform_feedback_varyings |=
> > +         shader_prog->last_vert_prog->sh.LinkedTransformFeedback-
> > >NumVarying > 0;
> >   
> >      return shader;
> >   }
> > 
> 
> Otherwise:
> 
> Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>
> 


More information about the mesa-dev mailing list