tgsi: fix wrong reg used for unit for TGSI_OPCODE_TXF
authorRoland Scheidegger <sroland@vmware.com>
Fri, 8 Mar 2013 18:45:52 +0000 (19:45 +0100)
committerRoland Scheidegger <sroland@vmware.com>
Mon, 11 Mar 2013 16:07:51 +0000 (17:07 +0100)
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/gallium/auxiliary/tgsi/tgsi_exec.c

index 6a74ef3..9945d42 100644 (file)
@@ -2139,9 +2139,9 @@ exec_txd(struct tgsi_exec_machine *mach,
 
 static void
 exec_txf(struct tgsi_exec_machine *mach,
-        const struct tgsi_full_instruction *inst)
+         const struct tgsi_full_instruction *inst)
 {
-   const uint unit = inst->Src[2].Register.Index;
+   const uint unit = inst->Src[1].Register.Index;
    union tgsi_exec_channel r[4];
    uint chan;
    float rgba[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE];