[Mesa-dev] [PATCH 2/2] glsl: support packing of arrays of arrays

Timothy Arceri t_arceri at yahoo.com.au
Wed May 7 03:28:06 PDT 2014


Just to make reviewing a quick task. I thought I'd just point out the
reason updating this check is all that is needed to support packed
varyings is because lower_arraylike() and lower_rvalue() already
recursively call each other in inner array to outer array order so
everything just works. 

Also I removed the assert for geom shaders as it is already checked in
lower_rvalue().

On Tue, 2014-05-06 at 13:50 +1000, Timothy Arceri wrote:
> Signed-off-by: Timothy Arceri <t_arceri at yahoo.com.au>
> ---
>  src/glsl/lower_packed_varyings.cpp | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/src/glsl/lower_packed_varyings.cpp b/src/glsl/lower_packed_varyings.cpp
> index e865474..dd2e22e 100644
> --- a/src/glsl/lower_packed_varyings.cpp
> +++ b/src/glsl/lower_packed_varyings.cpp
> @@ -591,12 +591,9 @@ lower_packed_varyings_visitor::needs_lowering(ir_variable *var)
>        return false;
>  
>     const glsl_type *type = var->type;
> -   if (this->gs_input_vertices != 0) {
> -      assert(type->is_array());
> -      type = type->element_type();
> -   }
> -   if (type->is_array())
> +   while (type->is_array()) {
>        type = type->fields.array;
> +   }
>     if (type->vector_elements == 4)
>        return false;
>     return true;




More information about the mesa-dev mailing list