case TGSI_OPCODE_TEX:
/* simple texture lookup */
- /* src[0] is the texcoord */
- /* src[1] is the sampler unit */
+ /* src[0] = texcoord */
+ /* src[1] = sampler unit */
exec_tex(mach, inst, FALSE);
break;
case TGSI_OPCODE_TXB:
/* Texture lookup with lod bias */
- /* src[0] is the texcoord (src[0].w = load bias) */
- /* src[1] is the sampler unit */
+ /* src[0] = texcoord (src[0].w = load bias) */
+ /* src[1] = sampler unit */
exec_tex(mach, inst, TRUE);
break;
/* src[0] = texcoord */
/* src[1] = d[strq]/dx */
/* src[2] = d[strq]/dy */
+ /* src[3] = sampler unit */
assert (0);
break;
+ case TGSI_OPCODE_TXL:
+ /* Texture lookup with explit LOD */
+ /* src[0] = texcoord (src[0].w = load bias) */
+ /* src[1] = sampler unit */
+ exec_tex(mach, inst, TRUE);
+ break;
+
case TGSI_OPCODE_UP2H:
assert (0);
break;
}
break;
- case TGSI_OPCODE_TXL:
- assert (0);
- break;
-
case TGSI_OPCODE_IF:
/* push CondMask */
assert(mach->CondStackTop < TGSI_EXEC_MAX_COND_NESTING);
fullinst->Instruction.Opcode = TGSI_OPCODE_SWZ;\r
break;\r
case OPCODE_TEX:\r
+ /* ordinary texture lookup */\r
fullinst->Instruction.Opcode = TGSI_OPCODE_TEX;\r
fullinst->Instruction.NumSrcRegs = 2;\r
fullinst->InstructionExtTexture.Texture = map_texture_target( inst->TexSrcTarget );\r
fullinst->FullSrcRegisters[1].SrcRegister.Index = inst->TexSrcUnit;\r
break;\r
case OPCODE_TXB:\r
+ /* texture lookup with LOD bias */\r
fullinst->Instruction.Opcode = TGSI_OPCODE_TXB;\r
fullinst->Instruction.NumSrcRegs = 2;\r
fullinst->InstructionExtTexture.Texture = map_texture_target( inst->TexSrcTarget );\r
fullinst->FullSrcRegisters[1].SrcRegister.Index = inst->TexSrcUnit;\r
break;\r
case OPCODE_TXD:\r
+ /* texture lookup with explicit partial derivatives */\r
fullinst->Instruction.Opcode = TGSI_OPCODE_TXD;\r
- fullinst->Instruction.NumSrcRegs = 2;\r
+ fullinst->Instruction.NumSrcRegs = 4;\r
fullinst->InstructionExtTexture.Texture = map_texture_target( inst->TexSrcTarget );\r
- fullinst->FullSrcRegisters[1].SrcRegister.File = TGSI_FILE_SAMPLER;\r
- fullinst->FullSrcRegisters[1].SrcRegister.Index = inst->TexSrcUnit;\r
+ /* src[0] = coord, src[1] = d[strq]/dx, src[2] = d[strq]/dy */\r
+ fullinst->FullSrcRegisters[3].SrcRegister.File = TGSI_FILE_SAMPLER;\r
+ fullinst->FullSrcRegisters[3].SrcRegister.Index = inst->TexSrcUnit;\r
break;\r
case OPCODE_TXL:\r
+ /* texture lookup with explicit LOD */\r
fullinst->Instruction.Opcode = TGSI_OPCODE_TXL;\r
fullinst->Instruction.NumSrcRegs = 2;\r
fullinst->InstructionExtTexture.Texture = map_texture_target( inst->TexSrcTarget );\r
fullinst->FullSrcRegisters[1].SrcRegister.Index = inst->TexSrcUnit;\r
break;\r
case OPCODE_TXP:\r
+ /* texture lookup with divide by Q component */\r
+ /* convert to TEX w/ special flag for division */\r
fullinst->Instruction.Opcode = TGSI_OPCODE_TEX;\r
fullinst->Instruction.NumSrcRegs = 2;\r
fullinst->InstructionExtTexture.Texture = map_texture_target( inst->TexSrcTarget );\r