glsl: stop copying struct and interface member names
authorTimothy Arceri <tarceri@itsqueeze.com>
Wed, 9 Aug 2017 03:34:04 +0000 (13:34 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Fri, 11 Aug 2017 00:43:21 +0000 (10:43 +1000)
commit49d9286a3f79800a94ddcffbe96a8894273db6d9
tree1e5c6ee3530eeb1458f687d58c9b0db96510cb59
parent43cbcbfee9ab4a6aa1fbb51a1af7fd9619d3b7f5
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>
13 files changed:
src/compiler/glsl/ast_array_index.cpp
src/compiler/glsl/glsl_to_nir.cpp
src/compiler/glsl/ir.cpp
src/compiler/glsl/ir.h
src/compiler/glsl/ir_clone.cpp
src/compiler/glsl/ir_constant_expression.cpp
src/compiler/glsl/ir_print_visitor.cpp
src/compiler/glsl/linker.cpp
src/compiler/glsl/lower_buffer_access.cpp
src/compiler/glsl/lower_named_interface_blocks.cpp
src/compiler/glsl/opt_structure_splitting.cpp
src/mesa/program/ir_to_mesa.cpp
src/mesa/state_tracker/st_glsl_to_tgsi.cpp