Matt Turner <matts...@gmail.com> writes: > On Mon, Feb 24, 2014 at 10:15 AM, Eric Anholt <e...@anholt.net> wrote: >> I think we would do better by emitting >> ADD(y_minus_x, y, negate(x)) >> MAC(dst, x, y_minus_x, a) > > MAC only takes two arguments, so > - if you meant MAD, there's no MAD on platforms that don't have LRP > - if you meant MAC(dst, ...) I don't see a way of doing it only two > instructions, but we could do > > MOV(acc, x) > ADD(y_minus_x, y, negate(x) > MAC(dst, y_minus_x, a)
Oops, yeah, I was still thinking in terms of MAD. This should still be better I think, while being an obvious translation of the LRP instruction: ADD one_minus_a, negate(a), 1.0f MUL null, y, a MAC dst, x, one_minus_a (multiplying y * a first to slightly reduce the stall pressure from one_minus_a)
pgpoufHAZBFS7.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev