summaryrefslogtreecommitdiffstats
path: root/src/glsl/ast_array_index.cpp
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2015-11-14 07:56:10 -0800
committerJason Ekstrand <jason.ekstrand@intel.com>2015-11-14 07:56:10 -0800
commit1469ccb7464836c752fa2664c36d8fae7e80606c (patch)
tree6f15e2eeb7e16e4085a0c58d50a36a4c12b231a5 /src/glsl/ast_array_index.cpp
parente8f51fe4deb5082fece5f8cb167b89b0f03eb244 (diff)
parentf94e1d97381ec787c2abbbcd5265252596217e33 (diff)
downloadexternal_mesa3d-1469ccb7464836c752fa2664c36d8fae7e80606c.zip
external_mesa3d-1469ccb7464836c752fa2664c36d8fae7e80606c.tar.gz
external_mesa3d-1469ccb7464836c752fa2664c36d8fae7e80606c.tar.bz2
Merge remote-tracking branch 'mesa-public/master' into vulkan
This pulls in Matt's big compiler refactor.
Diffstat (limited to 'src/glsl/ast_array_index.cpp')
-rw-r--r--src/glsl/ast_array_index.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/glsl/ast_array_index.cpp b/src/glsl/ast_array_index.cpp
index 74d403f..ca7a9a1 100644
--- a/src/glsl/ast_array_index.cpp
+++ b/src/glsl/ast_array_index.cpp
@@ -319,10 +319,9 @@ _mesa_ast_array_index_to_hir(void *mem_ctx,
* expression.
*/
if (array->type->is_array()
- || array->type->is_matrix()) {
+ || array->type->is_matrix()
+ || array->type->is_vector()) {
return new(mem_ctx) ir_dereference_array(array, idx);
- } else if (array->type->is_vector()) {
- return new(mem_ctx) ir_expression(ir_binop_vector_extract, array, idx);
} else if (array->type->is_error()) {
return array;
} else {