i965/fs: Print "+reladdr" on variably-indexed uniform arrays.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 11 Mar 2014 07:11:42 +0000 (00:11 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 14 Mar 2014 20:17:57 +0000 (13:17 -0700)
Previously, dump_instruction() would print output such as:
   {  2}    3: mov vgrf1:F, u0:F
   {  3}    4: mov vgrf7:F, u0:F
   {  4}    5: mov vgrf8:F, u0:F
which looked like either a scalar access or perhaps a constant-indexed
access of element 0, when it was really a variable index.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_fs.cpp

index 9081aafb30fb5f77c11eb21c7310241e3a1f556d..3fab30953c12cdbbb4219b124c325a804dc8d923 100644 (file)
@@ -3088,10 +3088,13 @@ fs_visitor::dump_instruction(backend_instruction *be_inst)
          break;
       case UNIFORM:
          fprintf(stderr, "u%d", inst->src[i].reg);
-         if (virtual_grf_sizes[inst->src[i].reg] != 1 ||
-             inst->src[i].subreg_offset)
+         if (inst->src[i].reladdr) {
+            fprintf(stderr, "+reladdr");
+         } else if (virtual_grf_sizes[inst->src[i].reg] != 1 ||
+             inst->src[i].subreg_offset) {
             fprintf(stderr, "+%d.%d", inst->src[i].reg_offset,
                     inst->src[i].subreg_offset);
+         }
          break;
       case BAD_FILE:
          fprintf(stderr, "(null)");