i965/fs: Fix dump_instructions() on uniforms.
authorEric Anholt <eric@anholt.net>
Wed, 26 Mar 2014 17:06:12 +0000 (10:06 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 8 Apr 2014 07:59:48 +0000 (00:59 -0700)
All of a vec4 uniform was being printed as "u0"

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_fs.cpp

index 7eac9ad75b36d29f45b9957212b34a8d98555b44..2b4bfe64a050260a1a9735303ba574179ec1ee8f 100644 (file)
@@ -2854,7 +2854,7 @@ fs_visitor::dump_instruction(backend_instruction *be_inst)
       fprintf(stderr, "(null)");
       break;
    case UNIFORM:
-      fprintf(stderr, "***u%d***", inst->dst.reg);
+      fprintf(stderr, "***u%d***", inst->dst.reg + inst->dst.reg_offset);
       break;
    case HW_REG:
       if (inst->dst.fixed_hw_reg.file == BRW_ARCHITECTURE_REGISTER_FILE) {
@@ -2906,7 +2906,7 @@ fs_visitor::dump_instruction(backend_instruction *be_inst)
          fprintf(stderr, "***m%d***", inst->src[i].reg);
          break;
       case UNIFORM:
-         fprintf(stderr, "u%d", inst->src[i].reg);
+         fprintf(stderr, "u%d", inst->src[i].reg + inst->src[i].reg_offset);
          if (inst->src[i].reladdr) {
             fprintf(stderr, "+reladdr");
          } else if (virtual_grf_sizes[inst->src[i].reg] != 1 ||