nvfx: add LRP in vertprog
authorLuca Barbieri <luca@luca-barbieri.com>
Thu, 25 Feb 2010 01:52:43 +0000 (02:52 +0100)
committerLuca Barbieri <luca@luca-barbieri.com>
Mon, 12 Apr 2010 21:43:40 +0000 (23:43 +0200)
glsl generates these.

src/gallium/drivers/nvfx/nvfx_vertprog.c

index 71c76a6..b405fd9 100644 (file)
@@ -515,6 +515,11 @@ nvfx_vertprog_parse_instruction(struct nvfx_context* nvfx, struct nvfx_vpc *vpc,
        case TGSI_OPCODE_LOG:
                arith(vpc, SCA, LOG, dst, mask, none, none, src[0]);
                break;
+       case TGSI_OPCODE_LRP:
+               tmp = temp(vpc);
+               arith(vpc, VEC, MAD, tmp, mask, neg(src[0]), src[2], src[2]);
+               arith(vpc, VEC, MAD, dst, mask, src[0], src[1], tmp);
+               break;
        case TGSI_OPCODE_MAD:
                arith(vpc, VEC, MAD, dst, mask, src[0], src[1], src[2]);
                break;