summaryrefslogtreecommitdiff
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2009-01-05 16:04:41 +1100
committerBen Skeggs <skeggsb@gmail.com>2009-01-06 08:05:57 +1100
commitcd5d3fde13e424373feac9098453ed0ca7f6e4eb (patch)
tree6d295847574d79fbfb2eba0e9ab0e3b018edb2f0 /src/gallium/drivers
parent00b15c9f40944d94aa28a441edd7ebb51577d9ba (diff)
nv50: fill image unit index in TEX varients
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/nv50/nv50_program.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gallium/drivers/nv50/nv50_program.c b/src/gallium/drivers/nv50/nv50_program.c
index 8414d06d18..d66e1d0949 100644
--- a/src/gallium/drivers/nv50/nv50_program.c
+++ b/src/gallium/drivers/nv50/nv50_program.c
@@ -934,7 +934,7 @@ nv50_program_tx_insn(struct nv50_pc *pc, const union tgsi_full_token *tok)
{
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;
@@ -948,8 +948,13 @@ nv50_program_tx_insn(struct nv50_pc *pc, const union tgsi_full_token *tok)
}
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) {
@@ -1198,6 +1203,7 @@ nv50_program_tx_insn(struct nv50_pc *pc, const union tgsi_full_token *tok)
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);