summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2019-01-21 16:35:25 -0600
committerJason Ekstrand <[email protected]>2019-01-21 18:41:47 -0600
commitca8c6c97814043644b4513a8ca79c3d2af2ed7ef (patch)
tree52e24313e24b96461aa1c88c0608765e1f1fe138 /src/compiler/nir
parent5ee0adfb6eba2407c1046f3cdb70bf43e6383634 (diff)
nir: Mark deref UBO and SSBO access as non-scalar
Fixes: 63b9aa2e2574 "spirv: Add support for using derefs for..." Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/compiler/nir')
-rw-r--r--src/compiler/nir/nir_lower_phis_to_scalar.c4
1 files changed, 3 insertions, 1 deletions
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: