From d0fe52a456bca1877db583f3e3ca23387c323d31 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Thu, 13 Dec 2018 17:42:34 -0600 Subject: [PATCH] nir/validate: Allow derefs in phi nodes MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit We added this assert when first moving derefs over to instructions to ensure that deref chains could go all the way back to the variables. Now that we're going to start using derefs for things that we can do variable pointers on such as UBOs and SSBOs, we need to be able to run derefs through phi nodes, selects, and basically anything else. Reviewed-by: Alejandro Piñeiro Reviewed-by: Caio Marcelo de Oliveira Filho --- src/compiler/nir/nir_validate.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/compiler/nir/nir_validate.c b/src/compiler/nir/nir_validate.c index df1e7b33004..9cb6cf27a4e 100644 --- a/src/compiler/nir/nir_validate.c +++ b/src/compiler/nir/nir_validate.c @@ -688,7 +688,6 @@ validate_phi_src(nir_phi_instr *instr, nir_block *pred, validate_state *state) nir_foreach_phi_src(src, instr) { if (src->pred == pred) { validate_assert(state, src->src.is_ssa); - validate_assert(state, src->src.ssa->parent_instr->type != nir_instr_type_deref); validate_src(&src->src, state, instr->dest.ssa.bit_size, instr->dest.ssa.num_components); state->instr = NULL; -- 2.30.2