glsl: Move is_array_or_matrix outside visitor class
authorIan Romanick <ian.d.romanick@intel.com>
Mon, 18 Jul 2011 16:51:34 +0000 (09:51 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Sat, 23 Jul 2011 08:24:18 +0000 (01:24 -0700)
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@anholt.net>
src/glsl/lower_variable_index_to_cond_assign.cpp

index 8eb1612f0a0da921fb6e3ee30b8bd56e211b4ef5..45adb267f2c54a9880b884c58b3ad4f43c10c8b5 100644 (file)
 #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()