[Mesa-dev] [PATCH 1/6] nir/algebraic: Use bool internally instead of bool32
Jason Ekstrand
jason at jlekstrand.net
Sat Oct 20 18:01:29 UTC 2018
---
src/compiler/nir/nir_algebraic.py | 4 ++--
src/compiler/nir/nir_search.c | 6 +-----
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/src/compiler/nir/nir_algebraic.py b/src/compiler/nir/nir_algebraic.py
index 3055937029c..eccef0d2c97 100644
--- a/src/compiler/nir/nir_algebraic.py
+++ b/src/compiler/nir/nir_algebraic.py
@@ -165,7 +165,7 @@ class Constant(Value):
def type(self):
if isinstance(self.value, (bool)):
- return "nir_type_bool32"
+ return "nir_type_bool"
elif isinstance(self.value, integer_types):
return "nir_type_int"
elif isinstance(self.value, float):
@@ -199,7 +199,7 @@ class Variable(Value):
def type(self):
if self.required_type == 'bool':
- return "nir_type_bool32"
+ return "nir_type_bool"
elif self.required_type in ('int', 'uint'):
return "nir_type_int"
elif self.required_type == 'float':
diff --git a/src/compiler/nir/nir_search.c b/src/compiler/nir/nir_search.c
index 21fcbe7aaec..4aa0a21ee68 100644
--- a/src/compiler/nir/nir_search.c
+++ b/src/compiler/nir/nir_search.c
@@ -56,10 +56,6 @@ src_is_type(nir_src src, nir_alu_type type)
if (!src.is_ssa)
return false;
- /* Turn nir_type_bool32 into nir_type_bool...they're the same thing. */
- if (nir_alu_type_get_base_type(type) == nir_type_bool)
- type = nir_type_bool;
-
if (src.ssa->parent_instr->type == nir_instr_type_alu) {
nir_alu_instr *src_alu = nir_instr_as_alu(src.ssa->parent_instr);
nir_alu_type output_type = nir_op_infos[src_alu->op].output_type;
@@ -215,7 +211,7 @@ match_value(const nir_search_value *value, nir_alu_instr *instr, unsigned src,
case nir_type_int:
case nir_type_uint:
- case nir_type_bool32:
+ case nir_type_bool:
switch (load->def.bit_size) {
case 8:
for (unsigned i = 0; i < num_components; ++i) {
--
2.19.1
More information about the mesa-dev
mailing list