From 5f5503d498f934707dcfa611344d9d601d21888a Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Sat, 19 Jan 2019 18:50:48 -0600 Subject: [PATCH] nir/lower_io: Add support for nir_var_mem_global Reviewed-by: Bas Nieuwenhuizen Reviewed-by: Karol Herbst --- src/compiler/nir/nir_lower_io.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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"); } -- 2.30.2