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

2014-01-21 Thread Timothy Arceri
Signed-off-by: Timothy Arceri t_arc...@yahoo.com.au
---
 src/glsl/ast_to_hir.cpp | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

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@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


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

2014-01-21 Thread Paul Berry
On 21 January 2014 04:19, Timothy Arceri t_arc...@yahoo.com.au wrote:

 Signed-off-by: Timothy Arceri t_arc...@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@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/mesa-dev

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev