[Mesa-dev] [PATCH 1/5] glsl: fix location and component packing validation on patchs

Timothy Arceri timothy.arceri at collabora.com
Tue May 17 04:07:47 UTC 2016


On Tue, 2016-05-17 at 13:29 +1000, Dave Airlie wrote:
> On 17 May 2016 at 13:19, Timothy Arceri <timothy.arceri at collabora.com
> > wrote:
> > 
> > These varyings have a separate location domain from per-vertex
> > varyings
> > and need to be handled separately.
> I hit a crash in here hacking on CTS this morning (I was force
> enabling enhanced_layouts
> for lols).

Thanks for the review. Yeah that sounds about right I pushed all the
non controversial enhanced layouts patches a couple of weeks ago. I had
workarounds for patches but this does it properly.

I'm going to have another attempt at pushing packing down to the
backend over the next couple of days. Maybe we could still make it to
4.4 before the release I forget what problems I was hitting the first
time around.

> 
> This series looks good to me.
> 
> Reviewed-by: Dave Airlie <airlied at redhat.com>
> 
> > 
> > ---
> >  src/compiler/glsl/link_varyings.cpp | 3 ++-
> >  src/compiler/shader_enums.h         | 1 +
> >  2 files changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/src/compiler/glsl/link_varyings.cpp
> > b/src/compiler/glsl/link_varyings.cpp
> > index 003b9d4..572aba9 100644
> > --- a/src/compiler/glsl/link_varyings.cpp
> > +++ b/src/compiler/glsl/link_varyings.cpp
> > @@ -350,7 +350,8 @@ cross_validate_outputs_to_inputs(struct
> > gl_shader_program *prog,
> >                                   gl_shader *producer, gl_shader
> > *consumer)
> >  {
> >     glsl_symbol_table parameters;
> > -   ir_variable *explicit_locations[MAX_VARYING][4] = { {NULL,
> > NULL} };
> > +   ir_variable *explicit_locations[MAX_VARYINGS_INCL_PATCH][4] =
> > +      { {NULL, NULL} };
> > 
> >     /* Find all shader outputs in the "producer" stage.
> >      */
> > diff --git a/src/compiler/shader_enums.h
> > b/src/compiler/shader_enums.h
> > index e93345d..df3124e 100644
> > --- a/src/compiler/shader_enums.h
> > +++ b/src/compiler/shader_enums.h
> > @@ -255,6 +255,7 @@ typedef enum
> >  #define VARYING_SLOT_MAX       (VARYING_SLOT_VAR0 + MAX_VARYING)
> >  #define VARYING_SLOT_PATCH0    (VARYING_SLOT_MAX)
> >  #define VARYING_SLOT_TESS_MAX  (VARYING_SLOT_PATCH0 + MAX_VARYING)
> > +#define MAX_VARYINGS_INCL_PATCH (VARYING_SLOT_TESS_MAX -
> > VARYING_SLOT_VAR0)
> > 
> >  const char *gl_varying_slot_name(gl_varying_slot slot);
> > 
> > --
> > 2.5.5
> > 
> > _______________________________________________
> > 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