diff options
author | Caio Marcelo de Oliveira Filho <[email protected]> | 2019-05-03 14:34:55 -0700 |
---|---|---|
committer | Caio Marcelo de Oliveira Filho <[email protected]> | 2019-05-20 10:53:38 -0700 |
commit | 6bc9cdb1b70cadd628e441cec63b82152c93980e (patch) | |
tree | 5f1f1e523fcbe70ddc511c3c78d2572bee2b7dd3 /src/compiler/nir/nir.h | |
parent | bdaf41107a24f745fd2cb09df3fd905b5837fe98 (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.h')
-rw-r--r-- | src/compiler/nir/nir.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 5897f6cea7c..3d46250eade 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -3114,6 +3114,11 @@ typedef enum { nir_address_format_32bit_index_offset, /** + * An address format which is a simple 32-bit offset. + */ + nir_address_format_32bit_offset, + + /** * An address format representing a purely logical addressing model. In * this model, all deref chains must be complete from the dereference * operation to the variable. Cast derefs are not allowed. These @@ -3131,6 +3136,7 @@ nir_address_format_bit_size(nir_address_format addr_format) case nir_address_format_64bit_global: return 64; case nir_address_format_64bit_bounded_global: return 32; case nir_address_format_32bit_index_offset: return 32; + case nir_address_format_32bit_offset: return 32; case nir_address_format_logical: return 32; } unreachable("Invalid address format"); @@ -3144,6 +3150,7 @@ nir_address_format_num_components(nir_address_format addr_format) case nir_address_format_64bit_global: return 1; case nir_address_format_64bit_bounded_global: return 4; case nir_address_format_32bit_index_offset: return 2; + case nir_address_format_32bit_offset: return 1; case nir_address_format_logical: return 1; } unreachable("Invalid address format"); |