tgsi: Fix sanity checks for indirect registers.
authorMichal Krol <michal@vmware.com>
Fri, 15 Jan 2010 10:40:03 +0000 (11:40 +0100)
committerMichal Krol <michal@vmware.com>
Fri, 15 Jan 2010 10:44:23 +0000 (11:44 +0100)
src/gallium/auxiliary/tgsi/tgsi_sanity.c

index 7f1c8e5dd68aea1575f4a35ea1706e6b3342990c..e1e4f97967de130684e8914f25e353b84a3c9295 100644 (file)
@@ -335,13 +335,13 @@ iter_instruction(
          fill_scan_register1d(ind_reg,
                               inst->Src[i].Indirect.File,
                               inst->Src[i].Indirect.Index);
-         if (!(reg->file == TGSI_FILE_ADDRESS || reg->file == TGSI_FILE_LOOP) ||
-             reg->indices[0] != 0) {
+         if (!(ind_reg->file == TGSI_FILE_ADDRESS || ind_reg->file == TGSI_FILE_LOOP) ||
+             ind_reg->indices[0] != 0) {
             report_warning(ctx, "Indirect register neither ADDR[0] nor LOOP[0]");
          }
          check_register_usage(
             ctx,
-            reg,
+            ind_reg,
             "indirect",
             FALSE );
       }