From: Corbin Simpson Date: Wed, 7 May 2008 01:14:21 +0000 (-0700) Subject: r5xx: FP: Add OPCODE_TXB. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=40db59038cc62a5a8e4f94cb069eeb1d9b95a1a9;p=mesa.git r5xx: FP: Add OPCODE_TXB. Tex lookup with biased LOD. Should magically work. --- 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;