On Mon, Feb 22, 2016 at 4:39 PM, Ilia Mirkin <imir...@alum.mit.edu> wrote: > On Mon, Feb 22, 2016 at 7:13 PM, Matt Turner <matts...@gmail.com> wrote: > > Unless there's something unexpected going on, let's say > > src0 = 0, src1 = 0, src2 = -0.5 > >> Allows us to transform >> >> mad res src0 src1 src2 > > res = -0.5
I think you're assuming that MAD is src0 * src1 + src2, but it's actually src0 + src1 * src2. Does that clear things up? Generally, the thinking is to negate a MUL you negate one of its arguments, and to negate an ADD you negate both of its arguments, so to negate a MAD you negate one of the multiplicands and the additive argument. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev