summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/ir.h
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-08-09 13:34:04 +1000
committerTimothy Arceri <[email protected]>2017-08-11 10:43:21 +1000
commit49d9286a3f79800a94ddcffbe96a8894273db6d9 (patch)
tree1e5c6ee3530eeb1458f687d58c9b0db96510cb59 /src/compiler/glsl/ir.h
parent43cbcbfee9ab4a6aa1fbb51a1af7fd9619d3b7f5 (diff)
glsl: stop copying struct and interface member names
We are currently copying the name for each member dereference but we can just share a single instance of the string provided by the type. This change also stops us recalculating the field index repeatedly. Reviewed-by: Thomas Helland <[email protected]>
Diffstat (limited to 'src/compiler/glsl/ir.h')
-rw-r--r--src/compiler/glsl/ir.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/glsl/ir.h b/src/compiler/glsl/ir.h
index d53b44304d8..ce4ade9e80a 100644
--- a/src/compiler/glsl/ir.h
+++ b/src/compiler/glsl/ir.h
@@ -2108,7 +2108,7 @@ public:
virtual ir_visitor_status accept(ir_hierarchical_visitor *);
ir_rvalue *record;
- const char *field;
+ int field_idx;
};
@@ -2192,7 +2192,7 @@ public:
ir_constant *get_array_element(unsigned i) const;
- ir_constant *get_record_field(const char *name);
+ ir_constant *get_record_field(int idx);
/**
* Copy the values on another constant at a given offset.