{
const struct tgsi_full_instruction *inst = &tok->FullInstruction;
struct nv50_reg *rdst[4], *dst[4], *src[3][4], *temp;
- unsigned mask, sat;
+ unsigned mask, sat, unit;
int i, c;
mask = inst->FullDstRegisters[0].DstRegister.WriteMask;
}
for (i = 0; i < inst->Instruction.NumSrcRegs; i++) {
+ struct tgsi_full_src_register *fs = &inst->FullSrcRegisters[i];
+
+ if (fs->SrcRegister.File == TGSI_FILE_SAMPLER)
+ unit = fs->SrcRegister.Index;
+
for (c = 0; c < 4; c++)
- src[i][c] = tgsi_src(pc, c, &inst->FullSrcRegisters[i]);
+ src[i][c] = tgsi_src(pc, c, fs);
}
if (sat) {
e = exec(pc);
e->inst[0] = 0xf6400000;
+ e->inst[0] |= (unit << 9);
set_long(pc, e);
e->inst[1] |= 0x0000c004;
set_dst(pc, t[0], e);