summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_lower_io.c
diff options
context:
space:
mode:
authorCaio Marcelo de Oliveira Filho <[email protected]>2019-05-03 14:34:55 -0700
committerCaio Marcelo de Oliveira Filho <[email protected]>2019-05-20 10:53:38 -0700
commit6bc9cdb1b70cadd628e441cec63b82152c93980e (patch)
tree5f1f1e523fcbe70ddc511c3c78d2572bee2b7dd3 /src/compiler/nir/nir_lower_io.c
parentbdaf41107a24f745fd2cb09df3fd905b5837fe98 (diff)
nir: Add nir_address_format_32bit_offset
This is a simple 32-bit address which is not a global address. Gives us a format that don't use 0 as its null pointer value. We will need this in anv to represent nir_var_mem_shared addresses. Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_lower_io.c')
-rw-r--r--src/compiler/nir/nir_lower_io.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_lower_io.c b/src/compiler/nir/nir_lower_io.c
index 1a7e00bf96a..153cd931f26 100644
--- a/src/compiler/nir/nir_lower_io.c
+++ b/src/compiler/nir/nir_lower_io.c
@@ -604,6 +604,7 @@ build_addr_iadd(nir_builder *b, nir_ssa_def *addr,
switch (addr_format) {
case nir_address_format_32bit_global:
case nir_address_format_64bit_global:
+ case nir_address_format_32bit_offset:
assert(addr->num_components == 1);
return nir_iadd(b, addr, offset);
@@ -675,6 +676,7 @@ addr_to_global(nir_builder *b, nir_ssa_def *addr,
nir_u2u64(b, nir_channel(b, addr, 3)));
case nir_address_format_32bit_index_offset:
+ case nir_address_format_32bit_offset:
case nir_address_format_logical:
unreachable("Cannot get a 64-bit address with this address format");
}