Mesa (master): tgsi: Fix sanity checks for indirect registers.

Michał Król michal at kemper.freedesktop.org
Fri Jan 15 02:44:34 PST 2010


Module: Mesa
Branch: master
Commit: d1767bfdabac4fd1eedb1ad9ddea368e077725c6
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d1767bfdabac4fd1eedb1ad9ddea368e077725c6

Author: Michal Krol <michal at vmware.com>
Date:   Fri Jan 15 11:40:03 2010 +0100

tgsi: Fix sanity checks for indirect registers.

---

 src/gallium/auxiliary/tgsi/tgsi_sanity.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/gallium/auxiliary/tgsi/tgsi_sanity.c b/src/gallium/auxiliary/tgsi/tgsi_sanity.c
index 7f1c8e5..e1e4f97 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_sanity.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_sanity.c
@@ -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 );
       }



More information about the mesa-commit mailing list