diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2019-03-01 14:39:14 -0800 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2019-03-01 14:44:02 -0800 |
commit | cad6ce893045fd42c039be34fd614f600153350a (patch) | |
tree | 2e5ade5fd18defdd94122aec3c209e5134b8f7f4 | |
parent | f1122f78b765ecbb5702b5c2e2bf4a03fb83d778 (diff) |
intel/fs: Don't assert on b2f with a saturate modifier
This ran afoul of Iris's use of nir_lower_clamp_color_outputs which
applies fsat() before writes to vertex shader color outpus.
Fixes: 7725d609387 ("intel/fs: Emit better code for b2f(inot(a)) and b2i(inot(a))")
-rw-r--r-- | src/intel/compiler/brw_fs_nir.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp index fb373e1757e..a4fd29ff9ec 100644 --- a/src/intel/compiler/brw_fs_nir.cpp +++ b/src/intel/compiler/brw_fs_nir.cpp @@ -800,8 +800,10 @@ fs_visitor::try_emit_b2fi_of_inot(const fs_builder &bld, prepare_alu_destination_and_sources(bld, inot_instr, &op, false); + /* Ignore the saturate modifier, if there is one. The result of the + * arithmetic can only be 0 or 1, so the clamping will do nothing anyway. + */ bld.ADD(result, op, brw_imm_d(1)); - assert(!instr->dest.saturate); return true; } |