diff options
author | Timothy Arceri <[email protected]> | 2017-01-10 15:47:31 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-01-12 09:47:29 +1100 |
commit | e8328e55e7ac26bbf3b3a47a1bb1cae4ab9130a2 (patch) | |
tree | 78030c419e1f8eda5eaa07d776a6278c068142fd /src/compiler/nir/nir_search.c | |
parent | a7e399de5921b4f23e884f369feae77518e8662d (diff) |
nir/algebraic: add support for conditional helper functions to expressions
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_search.c')
-rw-r--r-- | src/compiler/nir/nir_search.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_search.c b/src/compiler/nir/nir_search.c index 10a0941fa20..68275e442fc 100644 --- a/src/compiler/nir/nir_search.c +++ b/src/compiler/nir/nir_search.c @@ -263,6 +263,9 @@ match_expression(const nir_search_expression *expr, nir_alu_instr *instr, unsigned num_components, const uint8_t *swizzle, struct match_state *state) { + if (expr->cond && !expr->cond(instr)) + return false; + if (instr->op != expr->opcode) return false; |