summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2019-01-19 18:50:48 -0600
committerJason Ekstrand <[email protected]>2019-01-26 13:39:18 -0600
commit5f5503d498f934707dcfa611344d9d601d21888a (patch)
tree2b36ca527d0516b35ff17f15f6d51ee0d96038ca
parent314d2c90c377eccdf532739f97bf131e1f9d1f99 (diff)
nir/lower_io: Add support for nir_var_mem_global
Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Karol Herbst <[email protected]>
-rw-r--r--src/compiler/nir/nir_lower_io.c12
1 files changed, 12 insertions, 0 deletions
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");
}