From: Jason Ekstrand Date: Sun, 20 Jan 2019 00:50:48 +0000 (-0600) Subject: nir/lower_io: Add support for nir_var_mem_global X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5f5503d498f934707dcfa611344d9d601d21888a;p=mesa.git nir/lower_io: Add support for nir_var_mem_global Reviewed-by: Bas Nieuwenhuizen Reviewed-by: Karol Herbst --- diff --git a/src/compiler/nir/nir_lower_io.c b/src/compiler/nir/nir_lower_io.c index 73075523bae..d1f95cfe6ac 100644 --- a/src/compiler/nir/nir_lower_io.c +++ b/src/compiler/nir/nir_lower_io.c @@ -676,6 +676,10 @@ build_explicit_io_load(nir_builder *b, nir_intrinsic_instr *intrin, else op = nir_intrinsic_load_ssbo; break; + case nir_var_mem_global: + assert(addr_format_is_global(addr_format)); + op = nir_intrinsic_load_global; + break; default: unreachable("Unsupported explicit IO variable mode"); } @@ -722,6 +726,10 @@ build_explicit_io_store(nir_builder *b, nir_intrinsic_instr *intrin, else op = nir_intrinsic_store_ssbo; break; + case nir_var_mem_global: + assert(addr_format_is_global(addr_format)); + op = nir_intrinsic_store_global; + break; default: unreachable("Unsupported explicit IO variable mode"); } @@ -767,6 +775,10 @@ build_explicit_io_atomic(nir_builder *b, nir_intrinsic_instr *intrin, else op = ssbo_atomic_for_deref(intrin->intrinsic); break; + case nir_var_mem_global: + assert(addr_format_is_global(addr_format)); + op = global_atomic_for_deref(intrin->intrinsic); + break; default: unreachable("Unsupported explicit IO variable mode"); }