summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2019-07-16 11:20:02 -0700
committerIan Romanick <ian.d.romanick@intel.com>2019-08-06 11:12:20 -0700
commitfd5537bf04dc3b1ac6f68736b863e551cfd1c238 (patch)
tree30433049d53bb97e1aed643cb60960659246e533
parentb336bf5bf50a4c77c3798501867fb50f91b27154 (diff)
nir/search: Saturate destination modifier just fails to match
...instead of being an assertion. I had a slightly different patch in the series that uses nir_search to implement a code-generator generator. In that case and now it is necessary to allow nir_search to work after nir_lower_to_source_mods.
-rw-r--r--src/compiler/nir/nir_search.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/nir/nir_search.c b/src/compiler/nir/nir_search.c
index ec0bcf152f0..bc5a109d2a4 100644
--- a/src/compiler/nir/nir_search.c
+++ b/src/compiler/nir/nir_search.c
@@ -398,7 +398,9 @@ match_expression(const nir_search_expression *expr, nir_alu_instr *instr,
if (state->inexact_match && state->has_exact_alu)
return false;
- assert(!instr->dest.saturate);
+ if (instr->dest.saturate)
+ return false;
+
assert(nir_op_infos[instr->op].num_inputs > 0);
/* If we have an explicitly sized destination, we can only handle the