[Mesa-dev] [PATCH 1/3] nir: allow nir search type check to see through bcsel

Timothy Arceri tarceri at itsqueeze.com
Thu Jul 19 03:29:50 UTC 2018


---
 src/compiler/nir/nir_search.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/compiler/nir/nir_search.c b/src/compiler/nir/nir_search.c
index 28b36b2b863..743ffdf232c 100644
--- a/src/compiler/nir/nir_search.c
+++ b/src/compiler/nir/nir_search.c
@@ -73,6 +73,9 @@ src_is_type(nir_src src, nir_alu_type type)
                    src_is_type(src_alu->src[1].src, nir_type_bool);
          case nir_op_inot:
             return src_is_type(src_alu->src[0].src, nir_type_bool);
+         case nir_op_bcsel:
+            return src_is_type(src_alu->src[1].src, nir_type_bool) &&
+                   src_is_type(src_alu->src[2].src, nir_type_bool);
          default:
             break;
          }
-- 
2.17.1



More information about the mesa-dev mailing list