On Thu, Oct 24, 2013 at 1:46 AM, Erik Faye-Lund <kusmab...@gmail.com> wrote: > On Thu, Oct 24, 2013 at 2:19 AM, Matt Turner <matts...@gmail.com> wrote: >> A few Serious Sam 3 shaders affected: >> >> instructions in affected programs: 4384 -> 4344 (-0.91%) >> --- >> src/glsl/opt_algebraic.cpp | 12 ++++++++++++ >> 1 file changed, 12 insertions(+) >> >> diff --git a/src/glsl/opt_algebraic.cpp b/src/glsl/opt_algebraic.cpp >> index 37b2f02..3bf0689 100644 >> --- a/src/glsl/opt_algebraic.cpp >> +++ b/src/glsl/opt_algebraic.cpp >> @@ -32,8 +32,11 @@ >> #include "ir_visitor.h" >> #include "ir_rvalue_visitor.h" >> #include "ir_optimization.h" >> +#include "ir_builder.h" >> #include "glsl_types.h" >> >> +using namespace ir_builder; >> + >> namespace { >> >> /** >> @@ -436,6 +439,15 @@ ir_algebraic_visitor::handle_expression(ir_expression >> *ir) >> >> this->progress = true; >> return new(mem_ctx) ir_constant(ir->type, &data); >> + } else if (op_expr[0] && op_expr[0]->operation == ir_unop_logic_not && >> + op_expr[1] && op_expr[1]->operation == ir_unop_logic_not) { >> + /* De Morgan's Law: >> + * (not A) or (not B) === not (A and B) >> + */ >> + temp = logic_not(logic_and(op_expr[0]->operands[0], >> + op_expr[1]->operands[0])); >> + return swizzle_if_required(ir, temp); >> + this->progress = true; > > Returning before reporting progress?
Ouch! Thanks. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev