From 4f3809d389e98649273b6ada04c13b7bafbbe994 Mon Sep 17 00:00:00 2001 From: Caio Marcelo de Oliveira Filho Date: Mon, 14 Jan 2019 16:10:44 -0800 Subject: [PATCH] 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 --- src/compiler/nir/nir_builder.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)); -- 2.30.2