summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2019-03-09 10:10:37 -0600
committerJason Ekstrand <[email protected]>2019-03-15 01:02:19 +0000
commitc8d42c8cf689fcaac1e0fd8477a8ddf269c4fe4d (patch)
tree92f6320cea34aa219c80d359a2ed4a6fc419e594 /src/compiler/nir
parent60af3a93e9c25e9d5661bfda215a0b07463fe146 (diff)
nir: Rename nir_address_format_vk_index_offset to not be vk
It's just a 32-bit index and offset. We're going to want to use it in GL as well so stop talking about Vulkan. Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Diffstat (limited to 'src/compiler/nir')
-rw-r--r--src/compiler/nir/nir.h4
-rw-r--r--src/compiler/nir/nir_lower_io.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index 98adf1b5331..b25842834ae 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -3021,9 +3021,9 @@ typedef enum {
/**
* An address format which is comprised of a vec2 where the first
- * component is a vulkan descriptor index and the second is an offset.
+ * component is a buffer index and the second is an offset.
*/
- nir_address_format_vk_index_offset,
+ nir_address_format_32bit_index_offset,
} nir_address_format;
bool nir_lower_explicit_io(nir_shader *shader,
nir_variable_mode modes,
diff --git a/src/compiler/nir/nir_lower_io.c b/src/compiler/nir/nir_lower_io.c
index d1f95cfe6ac..c9db2de0ba0 100644
--- a/src/compiler/nir/nir_lower_io.c
+++ b/src/compiler/nir/nir_lower_io.c
@@ -599,7 +599,7 @@ build_addr_iadd(nir_builder *b, nir_ssa_def *addr,
assert(addr->num_components == 1);
return nir_iadd(b, addr, offset);
- case nir_address_format_vk_index_offset:
+ case nir_address_format_32bit_index_offset:
assert(addr->num_components == 2);
return nir_vec2(b, nir_channel(b, addr, 0),
nir_iadd(b, nir_channel(b, addr, 1), offset));
@@ -619,7 +619,7 @@ static nir_ssa_def *
addr_to_index(nir_builder *b, nir_ssa_def *addr,
nir_address_format addr_format)
{
- assert(addr_format == nir_address_format_vk_index_offset);
+ assert(addr_format == nir_address_format_32bit_index_offset);
assert(addr->num_components == 2);
return nir_channel(b, addr, 0);
}
@@ -628,7 +628,7 @@ static nir_ssa_def *
addr_to_offset(nir_builder *b, nir_ssa_def *addr,
nir_address_format addr_format)
{
- assert(addr_format == nir_address_format_vk_index_offset);
+ assert(addr_format == nir_address_format_32bit_index_offset);
assert(addr->num_components == 2);
return nir_channel(b, addr, 1);
}
@@ -651,7 +651,7 @@ addr_to_global(nir_builder *b, nir_ssa_def *addr,
assert(addr->num_components == 1);
return addr;
- case nir_address_format_vk_index_offset:
+ case nir_address_format_32bit_index_offset:
unreachable("Cannot get a 64-bit address with this address format");
}