On Sat, Dec 31, 2016 at 7:04 PM, Marek Olšák <mar...@gmail.com> wrote: > +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp > @@ -1695,21 +1695,22 @@ glsl_to_tgsi_visitor::visit_expression(ir_expression* > ir, st_src_reg *op) > * driver. > */ > emit_asm(ir, TGSI_OPCODE_MOV, result_dst, st_src_reg_for_float(0.5)); > break; > } > > case ir_binop_add: > emit_asm(ir, TGSI_OPCODE_ADD, result_dst, op[0], op[1]); > break; > case ir_binop_sub: > - emit_asm(ir, TGSI_OPCODE_SUB, result_dst, op[0], op[1]); > + op[1].negate = 1; > + emit_asm(ir, TGSI_OPCODE_ADD, result_dst, op[0], op[1]); > break;
I think you want op[1].negate = ~op[1].negate, as it could have been inverted by ir_unop_neg. [Note that this is not a full review, just something I happened to notice.] Cheers, -ilia _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev