case TGSI_OPCODE_TXD:
case TGSI_OPCODE_TXL:
case TGSI_OPCODE_TXP:
+ case TGSI_OPCODE_TEX_LZ:
+ case TGSI_OPCODE_TXF_LZ:
case TGSI_OPCODE_LODQ:
{
const struct tgsi_instruction_texture *tex = &insn->Texture;
mask = 0x7;
if (insn->Instruction.Opcode != TGSI_OPCODE_TEX &&
+ insn->Instruction.Opcode != TGSI_OPCODE_TEX_LZ &&
+ insn->Instruction.Opcode != TGSI_OPCODE_TXF_LZ &&
insn->Instruction.Opcode != TGSI_OPCODE_TXD)
mask |= 0x8; /* bias, lod or proj */
NV50_IR_OPCODE_CASE(DIV, DIV);
NV50_IR_OPCODE_CASE(TXL, TXL);
+ NV50_IR_OPCODE_CASE(TEX_LZ, TXL);
NV50_IR_OPCODE_CASE(CEIL, CEIL);
NV50_IR_OPCODE_CASE(I2F, CVT);
NV50_IR_OPCODE_CASE(XOR, XOR);
NV50_IR_OPCODE_CASE(SAD, SAD);
NV50_IR_OPCODE_CASE(TXF, TXF);
+ NV50_IR_OPCODE_CASE(TXF_LZ, TXF);
NV50_IR_OPCODE_CASE(TXQ, TXQ);
NV50_IR_OPCODE_CASE(TXQS, TXQ);
NV50_IR_OPCODE_CASE(TG4, TXG);
for (s = 0; s < tgt.getArgCount(); ++s)
arg[s] = src[s] = fetchSrc(0, s);
- if (texi->op == OP_TXL || texi->op == OP_TXB)
+ if (tgsi.getOpcode() == TGSI_OPCODE_TEX_LZ)
+ lod = loadImm(NULL, 0);
+ else if (texi->op == OP_TXL || texi->op == OP_TXB)
lod = fetchSrc(L >> 4, L & 3);
if (C == 0x0f)
}
for (c = 0; c < (texi->tex.target.getArgCount() - ms); ++c)
texi->setSrc(c, fetchSrc(0, c));
- texi->setSrc(c++, fetchSrc(L_M >> 4, L_M & 3)); // lod or ms
+ if (!ms && tgsi.getOpcode() == TGSI_OPCODE_TXF_LZ)
+ texi->setSrc(c++, loadImm(NULL, 0));
+ else
+ texi->setSrc(c++, fetchSrc(L_M >> 4, L_M & 3)); // lod or ms
setTexRS(texi, c, R, -1);
mkOp(OP_DISCARD, TYPE_NONE, NULL);
break;
case TGSI_OPCODE_TEX:
+ case TGSI_OPCODE_TEX_LZ:
case TGSI_OPCODE_TXB:
case TGSI_OPCODE_TXL:
case TGSI_OPCODE_TXP:
case TGSI_OPCODE_SAMPLE_C_LZ:
handleTEX(dst0, 1, 2, 0x30, 0x30, 0x30, 0x40);
break;
+ case TGSI_OPCODE_TXF_LZ:
case TGSI_OPCODE_TXF:
handleTXF(dst0, 1, 0x03);
break;