diff options
author | Ian Romanick <[email protected]> | 2016-12-15 14:26:24 -0800 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2016-12-19 15:55:43 -0800 |
commit | d32956935edf06c8ae6872c707bc65187b4a1d15 (patch) | |
tree | d796b8c3644d6d375caea13725ffe922ba87dcaf /src/compiler/glsl/ir_array_refcount.h | |
parent | e92935089bd9a987027d1f0791e7298bb3a57113 (diff) |
glsl: Walk a list of ir_dereference_array to mark array elements as accessed
Signed-off-by: Ian Romanick <[email protected]>
Cc: [email protected]
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/compiler/glsl/ir_array_refcount.h')
-rw-r--r-- | src/compiler/glsl/ir_array_refcount.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/compiler/glsl/ir_array_refcount.h b/src/compiler/glsl/ir_array_refcount.h index 2988046aaed..46ba36cbaa0 100644 --- a/src/compiler/glsl/ir_array_refcount.h +++ b/src/compiler/glsl/ir_array_refcount.h @@ -140,6 +140,7 @@ public: virtual ir_visitor_status visit(ir_dereference_variable *); virtual ir_visitor_status visit_enter(ir_function_signature *); + virtual ir_visitor_status visit_enter(ir_dereference_array *); /** * Find variable in the hash table, and insert it if not present @@ -158,6 +159,15 @@ private: array_deref_range *get_array_deref(); /** + * Last ir_dereference_array that was visited + * + * Used to prevent some redundant calculations. + * + * \sa ::visit_enter(ir_dereference_array *) + */ + ir_dereference_array *last_array_deref; + + /** * \name array_deref_range tracking */ /*@{*/ |