Mesa (master): intel/fs: Don't assert on b2f with a saturate modifier
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sat Mar 2 22:05:35 UTC 2019
Module: Mesa
Branch: master
Commit: d1d56f5f9afceab732e46c43010738c4936fb9b9
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d1d56f5f9afceab732e46c43010738c4936fb9b9
Author: Ian Romanick <ian.d.romanick at intel.com>
Date: Fri Mar 1 14:39:14 2019 -0800
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.
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Fixes: 7725d609387 ("intel/fs: Emit better code for b2f(inot(a)) and b2i(inot(a))")
---
src/intel/compiler/brw_fs_nir.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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;
}
More information about the mesa-commit
mailing list