summaryrefslogtreecommitdiffstats
path: root/src/intel/compiler
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2018-11-07 15:47:18 -0600
committerJason Ekstrand <[email protected]>2018-11-08 10:09:25 -0600
commitd28bc35ece9c6e0d9f40c1540bd147a6face6207 (patch)
tree8ea5873993f08cfef6510cefc111867b928097e1 /src/intel/compiler
parentbcc6aab065a9a4f7fc089065227c36c6c8efd52b (diff)
intel/fs: Add an assert to optimize_frontfacing_ternary
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/intel/compiler')
-rw-r--r--src/intel/compiler/brw_fs_nir.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp
index 9ffd15a67d7..2b36171136e 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) {