summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/tgsi/exec
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/tgsi/exec')
-rw-r--r--src/mesa/pipe/tgsi/exec/tgsi_exec.c5
-rw-r--r--src/mesa/pipe/tgsi/exec/tgsi_exec.h1
2 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/pipe/tgsi/exec/tgsi_exec.c b/src/mesa/pipe/tgsi/exec/tgsi_exec.c
index 0125f40dd2..66a81b4bd8 100644
--- a/src/mesa/pipe/tgsi/exec/tgsi_exec.c
+++ b/src/mesa/pipe/tgsi/exec/tgsi_exec.c
@@ -1219,11 +1219,14 @@ exec_tex(struct tgsi_exec_machine *mach,
const struct tgsi_full_instruction *inst,
boolean biasLod)
{
- const uint unit = inst->FullSrcRegisters[1].SrcRegister.Index;
+ const uint sampler = inst->FullSrcRegisters[1].SrcRegister.Index;
+ const uint unit = mach->SamplerUnits[sampler];
union tgsi_exec_channel r[8];
uint chan_index;
float lodBias;
+ // printf("Sampler %u unit %u\n", sampler, unit);
+
switch (inst->InstructionExtTexture.Texture) {
case TGSI_TEXTURE_1D:
diff --git a/src/mesa/pipe/tgsi/exec/tgsi_exec.h b/src/mesa/pipe/tgsi/exec/tgsi_exec.h
index 1805e72487..38f9218520 100644
--- a/src/mesa/pipe/tgsi/exec/tgsi_exec.h
+++ b/src/mesa/pipe/tgsi/exec/tgsi_exec.h
@@ -118,6 +118,7 @@ struct tgsi_exec_machine
struct tgsi_exec_vector *Temps;
struct tgsi_exec_vector *Addrs;
+ uint *SamplerUnits;
struct tgsi_sampler *Samplers;
float Imms[TGSI_EXEC_NUM_IMMEDIATES][4];