glsl ir: add as_dereference_record
authorJordan Justen <jordan.l.justen@intel.com>
Sun, 10 Mar 2013 01:12:09 +0000 (17:12 -0800)
committerJordan Justen <jordan.l.justen@intel.com>
Mon, 25 Mar 2013 18:35:56 +0000 (11:35 -0700)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/ir.h

index bbfec695f733c0e6466cfaa863e3be503f1789f0..ee27dea993f9d8323301eda915cbbea697a0f90c 100644 (file)
@@ -120,6 +120,7 @@ public:
    virtual class ir_dereference *       as_dereference()      { return NULL; }
    virtual class ir_dereference_array *        as_dereference_array() { return NULL; }
    virtual class ir_dereference_variable *as_dereference_variable() { return NULL; }
+   virtual class ir_dereference_record *as_dereference_record() { return NULL; }
    virtual class ir_expression *        as_expression()       { return NULL; }
    virtual class ir_rvalue *            as_rvalue()           { return NULL; }
    virtual class ir_loop *              as_loop()             { return NULL; }
@@ -1738,6 +1739,11 @@ public:
 
    virtual ir_constant *constant_expression_value(struct hash_table *variable_context = NULL);
 
+   virtual ir_dereference_record *as_dereference_record()
+   {
+      return this;
+   }
+
    /**
     * Get the variable that is ultimately referenced by an r-value
     */