From 03ce12c5ed7d1225d5aad8c10fccab2503920ec0 Mon Sep 17 00:00:00 2001 From: Caio Marcelo de Oliveira Filho Date: Thu, 30 May 2019 13:49:19 -0700 Subject: [PATCH] nir: Accept nir_var_mem_global in derefs used by phis This mode is used by PhysicalStorageBufferEXT storage class. Fixes: 8bdf5a008b3 "nir: Allow derefs to be used as phi sources" Reviewed-by: Bas Nieuwenhuizen --- src/compiler/nir/nir_validate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/nir/nir_validate.c b/src/compiler/nir/nir_validate.c index 682ed762f57..204cfdbbe3c 100644 --- a/src/compiler/nir/nir_validate.c +++ b/src/compiler/nir/nir_validate.c @@ -505,7 +505,8 @@ validate_deref_instr(nir_deref_instr *instr, validate_state *state) if (use->parent_instr->type == nir_instr_type_phi) { validate_assert(state, instr->mode == nir_var_mem_ubo || instr->mode == nir_var_mem_ssbo || - instr->mode == nir_var_mem_shared); + instr->mode == nir_var_mem_shared || + instr->mode == nir_var_mem_global); } } } -- 2.30.2