[Mesa-dev] [PATCH 23/28] glsl: add pack varying to resource list for vertex input / fragment output
Timothy Arceri
timothy.arceri at collabora.com
Wed Jan 20 13:39:44 PST 2016
On Wed, 2016-01-20 at 10:06 -0800, Anuj Phogat wrote:
> On Mon, Dec 28, 2015 at 9:00 PM, Timothy Arceri
> <timothy.arceri at collabora.com> wrote:
> > This is needed now that we pack these type of varyings when they
> > have a
> > component layout qualifier.
> > ---
> > src/glsl/linker.cpp | 15 ++++++++-------
> > 1 file changed, 8 insertions(+), 7 deletions(-)
> >
> > diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
> > index 44dd7f0..52a326a 100644
> > --- a/src/glsl/linker.cpp
> > +++ b/src/glsl/linker.cpp
> > @@ -3763,13 +3763,14 @@ build_program_resource_list(struct
> > gl_shader_program *shProg)
> > if (input_stage == MESA_SHADER_STAGES && output_stage == 0)
> > return;
> >
> > - /* Program interface needs to expose varyings in case of SSO.
> > */
> > - if (shProg->SeparateShader) {
> > - if (!add_packed_varyings(shProg, input_stage,
> > GL_PROGRAM_INPUT))
> > - return;
> > - if (!add_packed_varyings(shProg, output_stage,
> > GL_PROGRAM_OUTPUT))
> > - return;
> > - }
> > + /* Program interface needs to expose varyings in case of SSO,
> > or in case of
> > + * vertex inputs/fragement outputs that are packed unsing the
> > component
> > + * layout qualifier.
> > + */
> > + if (!add_packed_varyings(shProg, input_stage,
> > GL_PROGRAM_INPUT))
> > + return;
> > + if (!add_packed_varyings(shProg, output_stage,
> > GL_PROGRAM_OUTPUT))
> > + return;
> >
> > if (!add_fragdata_arrays(shProg))
> > return;
> > --
> > 2.4.3
> >
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
> I will give you my r-b on this if you can help me understand the
> concept of
> exposing varyings and how it's utilized during linking.
Sure. The inputs and outputs to a program need to be added to the
resource list so that they can be queried by
ARB_program_interface_query via PROGRAM_INPUT/PROGRAM_OUTPUT.
I can add that to the commit message if you think its useful.
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list