[Mesa-dev] [RFC PATCH 03/12] glsl: support packing of arrays of arrays

Ilia Mirkin imirkin at alum.mit.edu
Mon Apr 27 06:50:21 PDT 2015


I know I gave a R-b on this, but I only noticed this when you pushed it out:

On Sat, Mar 21, 2015 at 5:49 AM, Timothy Arceri <t_arceri at yahoo.com.au> wrote:
> ---
>  src/glsl/lower_packed_varyings.cpp | 10 ++--------
>  1 file changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/src/glsl/lower_packed_varyings.cpp b/src/glsl/lower_packed_varyings.cpp
> index 2c9a1c4..f8e79bd 100644
> --- a/src/glsl/lower_packed_varyings.cpp
> +++ b/src/glsl/lower_packed_varyings.cpp
> @@ -645,14 +645,8 @@ lower_packed_varyings_visitor::needs_lowering(ir_variable *var)
>     if (var->data.explicit_location)
>        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())
> -      type = type->fields.array;
> -   if (type->vector_elements == 4 && !type->is_double())
> +   if (var->type->without_array()->vector_elements == 4 &&
> +       !var->type->is_double())

This should be

type = var->type->without_array();
if (type->...)

Otherwise the var->type->is_double() check may fail.

>        return false;
>     return true;
>  }
> --
> 2.1.0
>
> _______________________________________________
> 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