[Mesa-dev] [PATCH 6/8] glsl: Remove ir_dereference::constant_referenced

Ian Romanick idr at freedesktop.org
Wed Mar 12 15:49:25 PDT 2014


From: Ian Romanick <ian.d.romanick at intel.com>

All of the functionality is implemented in a private function in the one
file where it is used.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 src/glsl/ir.h                       | 36 ------------------------------------
 src/glsl/ir_constant_expression.cpp | 25 -------------------------
 2 files changed, 61 deletions(-)

diff --git a/src/glsl/ir.h b/src/glsl/ir.h
index ed3f086..8fa3b9e 100644
--- a/src/glsl/ir.h
+++ b/src/glsl/ir.h
@@ -1914,15 +1914,6 @@ public:
     * Get the variable that is ultimately referenced by an r-value
     */
    virtual ir_variable *variable_referenced() const = 0;
-
-   /**
-    * Get the constant that is ultimately referenced by an r-value,
-    * in a constant expression evaluation context.
-    *
-    * The offset is used when the reference is to a specific column of
-    * a matrix.
-    */
-  virtual void constant_referenced(struct hash_table *variable_context, ir_constant *&store, int &offset) const = 0;
 };
 
 
@@ -1950,15 +1941,6 @@ public:
       return this->var;
    }
 
-   /**
-    * Get the constant that is ultimately referenced by an r-value,
-    * in a constant expression evaluation context.
-    *
-    * The offset is used when the reference is to a specific column of
-    * a matrix.
-    */
-   virtual void constant_referenced(struct hash_table *variable_context, ir_constant *&store, int &offset) const;
-
    virtual ir_variable *whole_variable_referenced()
    {
       /* ir_dereference_variable objects always dereference the entire
@@ -2010,15 +1992,6 @@ public:
       return this->array->variable_referenced();
    }
 
-   /**
-    * Get the constant that is ultimately referenced by an r-value,
-    * in a constant expression evaluation context.
-    *
-    * The offset is used when the reference is to a specific column of
-    * a matrix.
-    */
-   virtual void constant_referenced(struct hash_table *variable_context, ir_constant *&store, int &offset) const;
-
    virtual void accept(ir_visitor *v)
    {
       v->visit(this);
@@ -2058,15 +2031,6 @@ public:
       return this->record->variable_referenced();
    }
 
-   /**
-    * Get the constant that is ultimately referenced by an r-value,
-    * in a constant expression evaluation context.
-    *
-    * The offset is used when the reference is to a specific column of
-    * a matrix.
-    */
-   virtual void constant_referenced(struct hash_table *variable_context, ir_constant *&store, int &offset) const;
-
    virtual void accept(ir_visitor *v)
    {
       v->visit(this);
diff --git a/src/glsl/ir_constant_expression.cpp b/src/glsl/ir_constant_expression.cpp
index 53db618..ea9e84a 100644
--- a/src/glsl/ir_constant_expression.cpp
+++ b/src/glsl/ir_constant_expression.cpp
@@ -387,14 +387,11 @@ unpack_half_1x16(uint16_t u)
 }
 
 /**
- * \name Functions to get the constant referenced by an r-value
- *
  * Get the constant that is ultimately referenced by an r-value, in a constant
  * expression evaluation context.
  *
  * The offset is used when the reference is to a specific column of a matrix.
  */
-/*@{*/
 static bool
 constant_referenced(const ir_dereference *deref,
                     struct hash_table *variable_context,
@@ -489,28 +486,6 @@ constant_referenced(const ir_dereference *deref,
    return store != NULL;
 }
 
-void
-ir_dereference_variable::constant_referenced(struct hash_table *variable_context,
-					     ir_constant *&store, int &offset) const
-{
-   ::constant_referenced(this, variable_context, store, offset);
-}
-
-void
-ir_dereference_array::constant_referenced(struct hash_table *variable_context,
-					  ir_constant *&store, int &offset) const
-{
-   ::constant_referenced(this, variable_context, store, offset);
-}
-
-void
-ir_dereference_record::constant_referenced(struct hash_table *variable_context,
-					   ir_constant *&store, int &offset) const
-{
-   ::constant_referenced(this, variable_context, store, offset);
-}
-/*@}*/
-
 
 ir_constant *
 ir_rvalue::constant_expression_value(struct hash_table *variable_context)
-- 
1.8.1.4



More information about the mesa-dev mailing list