[Mesa-dev] [PATCH 2/4] i965/vec4: Handle ir_triop_lrp on Gen4-5 as well.

Matt Turner mattst88 at gmail.com
Mon Feb 24 10:35:10 PST 2014


On Mon, Feb 24, 2014 at 10:15 AM, Eric Anholt <eric at 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)


More information about the mesa-dev mailing list