[Mesa-dev] [PATCH 2/2] nir: Teach src_is_type about bcsel
Ian Romanick
idr at freedesktop.org
Fri Jul 20 00:39:15 UTC 2018
From: Ian Romanick <ian.d.romanick at intel.com>
---
src/compiler/nir/nir_search.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/compiler/nir/nir_search.c b/src/compiler/nir/nir_search.c
index c727e9c70b7..99b4ac6ddd2 100644
--- a/src/compiler/nir/nir_search.c
+++ b/src/compiler/nir/nir_search.c
@@ -75,9 +75,13 @@ src_is_type(nir_src src, nir_alu_type type, unsigned num_components,
src_is_type(src_alu->src[1].src, nir_type_bool,
num_components, swizzle);
case nir_op_inot:
- return src_is_type(src_alu->src[0].src, nir_type_bool);
return src_is_type(src_alu->src[0].src, nir_type_bool,
num_components, swizzle);
+ case nir_op_bcsel:
+ return src_is_type(src_alu->src[1].src, nir_type_bool,
+ num_components, swizzle) &&
+ src_is_type(src_alu->src[2].src, nir_type_bool,
+ num_components, swizzle);
default:
break;
}
--
2.14.4
More information about the mesa-dev
mailing list