[Mesa-dev] [PATCH V2 4/8] glsl: only call mark_max_array if we are assigning an array

Paul Berry stereotype441 at gmail.com
Tue Jan 21 13:54:10 PST 2014


On 21 January 2014 04:19, Timothy Arceri <t_arceri at yahoo.com.au> wrote:

> Signed-off-by: Timothy Arceri <t_arceri at yahoo.com.au>
> ---
>  src/glsl/ast_to_hir.cpp | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>

Can you say more in the commit message about why you're making this
change?  Is this fixing an existing bug?  Is it preparing for a later
change (which would otherwise create a bug if the change weren't made)?  Or
are you doing it just because it seems reasonable to do?


>
> diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
> index 326aa58..d02c9ff 100644
> --- a/src/glsl/ast_to_hir.cpp
> +++ b/src/glsl/ast_to_hir.cpp
> @@ -830,8 +830,10 @@ do_assignment(exec_list *instructions, struct
> _mesa_glsl_parse_state *state,
>
>  rhs->type->array_size());
>          d->type = var->type;
>        }
> -      mark_whole_array_access(rhs);
> -      mark_whole_array_access(lhs);
> +      if (lhs->type->is_array()) {
> +         mark_whole_array_access(rhs);
> +         mark_whole_array_access(lhs);
> +      }
>     }
>
>     /* Most callers of do_assignment (assign, add_assign, pre_inc/dec,
> --
> 1.8.3.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140121/0b15b14e/attachment.html>


More information about the mesa-dev mailing list