summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_search.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/nir/nir_search.h')
-rw-r--r--src/compiler/nir/nir_search.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_search.h b/src/compiler/nir/nir_search.h
index a500febc915..f55d797e05e 100644
--- a/src/compiler/nir/nir_search.h
+++ b/src/compiler/nir/nir_search.h
@@ -68,6 +68,16 @@ typedef struct {
* never match anything.
*/
nir_alu_type type;
+
+ /** Optional condition fxn ptr
+ *
+ * This is only allowed in search expressions, and allows additional
+ * constraints to be placed on the match. Typically used for 'is_constant'
+ * variables to require, for example, power-of-two in order for the search
+ * to match.
+ */
+ bool (*cond)(nir_alu_instr *instr, unsigned src,
+ unsigned num_components, const uint8_t *swizzle);
} nir_search_variable;
typedef struct {