Mesa (7.11): glsl: Move is_array_or_matrix outside visitor class

Ian Romanick idr at kemper.freedesktop.org
Thu Jul 28 18:48:47 UTC 2011


Module: Mesa
Branch: 7.11
Commit: 3481a5a1e67a42a899fda1ee000625d9d00eb513
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3481a5a1e67a42a899fda1ee000625d9d00eb513

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Mon Jul 18 09:51:34 2011 -0700

glsl: Move is_array_or_matrix outside visitor class

There's no reason for it to be there, and another class that may not
have access to the visitor will need it soon.

Reviewed-by: Eric Anholt <eric at anholt.net>
(cherry picked from commit 8d5f3cef795428d7a95120416122a39c10cff11c)

---

 src/glsl/lower_variable_index_to_cond_assign.cpp |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/glsl/lower_variable_index_to_cond_assign.cpp b/src/glsl/lower_variable_index_to_cond_assign.cpp
index 8eb1612..45adb26 100644
--- a/src/glsl/lower_variable_index_to_cond_assign.cpp
+++ b/src/glsl/lower_variable_index_to_cond_assign.cpp
@@ -37,6 +37,12 @@
 #include "glsl_types.h"
 #include "main/macros.h"
 
+static inline bool
+is_array_or_matrix(const ir_instruction *ir)
+{
+   return (ir->type->is_array() || ir->type->is_matrix());
+}
+
 struct assignment_generator
 {
    ir_instruction* base_ir;
@@ -233,11 +239,6 @@ public:
    bool lower_temps;
    bool lower_uniforms;
 
-   bool is_array_or_matrix(const ir_instruction *ir) const
-   {
-      return (ir->type->is_array() || ir->type->is_matrix());
-   }
-
    bool needs_lowering(ir_dereference_array *deref) const
    {
       if (deref == NULL || deref->array_index->as_constant()




More information about the mesa-commit mailing list