r5xx: FP: Add OPCODE_TXB.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Wed, 7 May 2008 01:14:21 +0000 (18:14 -0700)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Wed, 7 May 2008 01:14:21 +0000 (18:14 -0700)
Tex lookup with biased LOD. Should magically work.

src/mesa/drivers/dri/r300/r500_fragprog.c

index e6f7e173f7cf998aa67bc1fdee157f5183fe4393..15bc5798e0b029b59918a9135b118fc80369abcc 100644 (file)
@@ -216,8 +216,14 @@ static void emit_tex(struct r500_fragment_program *fp,
        case OPCODE_TEX:
                fp->inst[counter].inst1 |= R500_TEX_INST_LD;
                break;
+       case OPCODE_TXB:
+               fp->inst[counter].inst1 |= R500_TEX_INST_LODBIAS;
+               break;
        case OPCODE_TXP:
                fp->inst[counter].inst1 |= R500_TEX_INST_PROJ;
+               break;
+       default:
+               ERROR("emit_tex can't handle opcode %x\n", opcode);
        }
 
        fp->inst[counter].inst2 = R500_TEX_SRC_ADDR(hwsrc)
@@ -553,6 +559,9 @@ static GLboolean parse_program(struct r500_fragment_program *fp)
                        case OPCODE_TEX:
                                emit_tex(fp, fpi, OPCODE_TEX, dest, counter);
                                break;
+                       case OPCODE_TXB:
+                               emit_tex(fp, fpi, OPCODE_TXB, dest, counter);
+                               break;
                        case OPCODE_TXP:
                                emit_tex(fp, fpi, OPCODE_TXP, dest, counter);
                                break;