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 <thomashelland90@gmail.com>
This commit is contained in:
@@ -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.
|
||||
|
Reference in New Issue
Block a user