summaryrefslogtreecommitdiffstats
path: root/src/glsl/ast_array_index.cpp
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2014-05-23 18:57:36 -0700
committerIan Romanick <[email protected]>2014-09-30 13:34:42 -0700
commit21df0169028d600b17ab73795da2838e92ba9038 (patch)
tree10cc2800c15be2af1b17aabd33a5c0c00cb697a4 /src/glsl/ast_array_index.cpp
parent8afe6efa218f87158c35857fad41926b404a2cbd (diff)
glsl: Make ir_variable::max_ifc_array_access private
The payoff for this will come in a few more patches. No change Valgrind massif results for a trimmed apitrace of dota2. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
Diffstat (limited to 'src/glsl/ast_array_index.cpp')
-rw-r--r--src/glsl/ast_array_index.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/glsl/ast_array_index.cpp b/src/glsl/ast_array_index.cpp
index 5ca85f6ab3f..49a8574f2b8 100644
--- a/src/glsl/ast_array_index.cpp
+++ b/src/glsl/ast_array_index.cpp
@@ -88,8 +88,14 @@ update_max_array_access(ir_rvalue *ir, unsigned idx, YYLTYPE *loc,
unsigned field_index =
deref_record->record->type->field_index(deref_record->field);
assert(field_index < interface_type->length);
- if (idx > deref_var->var->max_ifc_array_access[field_index]) {
- deref_var->var->max_ifc_array_access[field_index] = idx;
+
+ unsigned *const max_ifc_array_access =
+ deref_var->var->get_max_ifc_array_access();
+
+ assert(max_ifc_array_access != NULL);
+
+ if (idx > max_ifc_array_access[field_index]) {
+ max_ifc_array_access[field_index] = idx;
/* Check whether this access will, as a side effect, implicitly
* cause the size of a built-in array to be too large.