Module: Mesa Branch: master Commit: d28bc35ece9c6e0d9f40c1540bd147a6face6207 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d28bc35ece9c6e0d9f40c1540bd147a6face6207
Author: Jason Ekstrand <jason.ekstr...@intel.com> Date: Wed Nov 7 15:47:18 2018 -0600 intel/fs: Add an assert to optimize_frontfacing_ternary Reviewed-by: Kenneth Graunke <kenn...@whitecape.org> --- src/intel/compiler/brw_fs_nir.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp index 9ffd15a67d..2b36171136 100644 --- a/src/intel/compiler/brw_fs_nir.cpp +++ b/src/intel/compiler/brw_fs_nir.cpp @@ -552,6 +552,9 @@ fs_visitor::optimize_frontfacing_ternary(nir_alu_instr *instr, if (fabsf(value1) != 1.0f || fabsf(value2) != 1.0f) return false; + /* nir_opt_algebraic should have gotten rid of bcsel(b, a, a) */ + assert(value1 == -value2); + fs_reg tmp = vgrf(glsl_type::int_type); if (devinfo->gen >= 6) { _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit