summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaio Marcelo de Oliveira Filho <[email protected]>2019-01-14 16:10:44 -0800
committerCaio Marcelo de Oliveira Filho <[email protected]>2019-02-22 21:00:50 -0800
commit4f3809d389e98649273b6ada04c13b7bafbbe994 (patch)
treef7270e620690c2216997bc3a24ffc01551c87696
parentc4beadd28e88a1c0206c39be82375e8d1b05d06e (diff)
nir: nir_build_deref_follower accept array derefs of vectors
Code itself already supports it, just make sure we can use it for those cases. Reviewed-by: Jason Ekstrand <[email protected]>
-rw-r--r--src/compiler/nir/nir_builder.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/nir/nir_builder.h b/src/compiler/nir/nir_builder.h
index 2a36eb3c91b..c6e80e729a8 100644
--- a/src/compiler/nir/nir_builder.h
+++ b/src/compiler/nir/nir_builder.h
@@ -928,7 +928,9 @@ nir_build_deref_follower(nir_builder *b, nir_deref_instr *parent,
case nir_deref_type_array:
case nir_deref_type_array_wildcard:
assert(glsl_type_is_matrix(parent->type) ||
- glsl_type_is_array(parent->type));
+ glsl_type_is_array(parent->type) ||
+ (leader->deref_type == nir_deref_type_array &&
+ glsl_type_is_vector(parent->type)));
assert(glsl_get_length(parent->type) ==
glsl_get_length(leader_parent->type));