From 40db59038cc62a5a8e4f94cb069eeb1d9b95a1a9 Mon Sep 17 00:00:00 2001 From: Corbin Simpson Date: Tue, 6 May 2008 18:14:21 -0700 Subject: [PATCH] r5xx: FP: Add OPCODE_TXB. Tex lookup with biased LOD. Should magically work. --- src/mesa/drivers/dri/r300/r500_fragprog.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/mesa/drivers/dri/r300/r500_fragprog.c b/src/mesa/drivers/dri/r300/r500_fragprog.c index e6f7e173f7c..15bc5798e0b 100644 --- a/src/mesa/drivers/dri/r300/r500_fragprog.c +++ b/src/mesa/drivers/dri/r300/r500_fragprog.c @@ -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; -- 2.30.2