llvmpipe: fix broken TGSI_OPCODE_FRC codegen
[mesa.git] / src / gallium / drivers / llvmpipe / lp_bld_tgsi_soa.c
index adc81569ed514f6531224ccadc48101553e649a4..83ac25bb200d61c1292eb1015bab2c47a2f8586c 100644 (file)
@@ -777,7 +777,7 @@ emit_instruction(
       FOR_EACH_DST0_ENABLED_CHANNEL( inst, chan_index ) {
          src0 = emit_fetch( bld, inst, 0, chan_index );
          tmp0 = lp_build_floor(&bld->base, src0);
-         tmp0 = lp_build_sub(&bld->base, tmp0, src0);
+         tmp0 = lp_build_sub(&bld->base, src0, tmp0);
          dst0[chan_index] = tmp0;
       }
       break;