From: Caio Marcelo de Oliveira Filho Date: Tue, 15 Jan 2019 00:10:44 +0000 (-0800) Subject: nir: nir_build_deref_follower accept array derefs of vectors X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4f3809d389e98649273b6ada04c13b7bafbbe994;p=mesa.git 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 --- 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));