From ca8c6c97814043644b4513a8ca79c3d2af2ed7ef Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Mon, 21 Jan 2019 16:35:25 -0600 Subject: [PATCH] nir: Mark deref UBO and SSBO access as non-scalar Fixes: 63b9aa2e2574 "spirv: Add support for using derefs for..." Reviewed-by: Bas Nieuwenhuizen --- src/compiler/nir/nir_lower_phis_to_scalar.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/compiler/nir/nir_lower_phis_to_scalar.c b/src/compiler/nir/nir_lower_phis_to_scalar.c index 3d7155c04f6..41ae19e8391 100644 --- a/src/compiler/nir/nir_lower_phis_to_scalar.c +++ b/src/compiler/nir/nir_lower_phis_to_scalar.c @@ -86,7 +86,9 @@ is_phi_src_scalarizable(nir_phi_src *src, case nir_intrinsic_load_deref: { nir_deref_instr *deref = nir_src_as_deref(src_intrin->src[0]); return deref->mode == nir_var_shader_in || - deref->mode == nir_var_uniform; + deref->mode == nir_var_uniform || + deref->mode == nir_var_mem_ubo || + deref->mode == nir_var_mem_ssbo; } case nir_intrinsic_interp_deref_at_centroid: -- 2.30.2