if (!tex->tex.target.isArray() &&
(tex->tex.rIndirectSrc >= 0 || tex->tex.sIndirectSrc >= 0))
++s;
+ if (tex->op == OP_TXD && tex->tex.useOffsets)
+ ++s;
n = tex->srcCount(0xff) - s;
assert(n <= 4);
}
code[1] |= 0x02000000;
}
+ if (i->tex.derivAll)
+ code[1] |= 1 << 13;
+
defId(i->def[0], 14);
srcId(i->src[0], 20);
code[1] |= 1 << 24;
int src1 = i->tex.target.getArgCount();
+ if (i->op == OP_TXD && i->tex.useOffsets)
+ ++src1;
if (i->src[src1].getFile() == FILE_IMMEDIATE) { // lzero
if (i->op == OP_TXL)
srcId(i->src[0], 20);
srcId(i->srcExists(1) ? i->src[1] : i->src[0], 26);
+ if (i->op == OP_QUADOP && progType != Program::TYPE_FRAGMENT)
+ code[0] |= 1 << 9; // dall
+
emitPredicate(i);
}
int arg = txd->tex.target.getDim() + txd->tex.target.isArray();
handleTEX(txd);
- if (txd->src[arg].exists())
+ while (txd->src[arg].exists())
++arg;
+ txd->tex.derivAll = true;
if (dim > 2 || txd->tex.target.isShadow())
return handleManualTXD(txd);
- // at most s/t/array, x, y, offset
- assert(arg <= 4 && !txd->src[arg].exists());
+ assert(arg <= 4); // at most s/t/array, x, y, offset
for (int c = 0; c < dim; ++c) {
txd->src[arg + c * 2 + 0].set(txd->dPdx[c]);