glsl: remove element_type() helper
authorTimothy Arceri <t_arceri@yahoo.com.au>
Thu, 30 Apr 2015 10:45:54 +0000 (20:45 +1000)
committerTimothy Arceri <t_arceri@yahoo.com.au>
Thu, 21 May 2015 22:35:45 +0000 (08:35 +1000)
commitd67515b7be1ebd9482970ac1867ee4e9bbbf96d5
tree6c89e134e067cbf9a56b7ef92b5734fbb4e3385c
parent51ccdb63467b1e848db025670f126eccb051f8f2
glsl: remove element_type() helper

We now have is_array() and without_array() that make the
code much clearer and remove the need for this.

For all remaining calls to this we already knew that
the type was an array so returning a null wasn't adding any value.

v2: use without_array() in _mesa_ast_array_index_to_hir() and don't use
 without_array() in lower_clip_distance_visitor() as we want to make sure the
 array is 2D.

Reviewed-by: Matt Turner <mattst88@gmail.com>
src/glsl/ast_array_index.cpp
src/glsl/ast_function.cpp
src/glsl/ast_to_hir.cpp
src/glsl/glsl_parser_extras.cpp
src/glsl/glsl_types.cpp
src/glsl/glsl_types.h
src/glsl/ir.cpp
src/glsl/link_atomics.cpp
src/glsl/link_varyings.cpp
src/glsl/linker.cpp
src/glsl/lower_clip_distance.cpp