aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2016-09-02 13:52:54 -0700
committerFrancisco Jerez <[email protected]>2016-09-14 14:50:57 -0700
commit5d65d51e78c2f73389a0d30dac6dda4561e91bec (patch)
tree9fc43051a3ed04d3185d8a11453e513a204be3f1 /src/mesa/drivers
parentec259f5307bc801f8482f2825ca9d52fe5ead95e (diff)
i965/vec4: Print src/dst_reg::offset field consistently for all register files.
C.f. 'i965/fs: Print fs_reg::offset field consistently for all register files.'. Reviewed-by: Iago Toral Quiroga <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4.cpp21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index eaf2dd54ffe..19ee088cf52 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -1425,7 +1425,7 @@ vec4_visitor::dump_instruction(backend_instruction *be_inst, FILE *file)
switch (inst->dst.file) {
case VGRF:
- fprintf(file, "vgrf%d.%d", inst->dst.nr, inst->dst.offset / REG_SIZE);
+ fprintf(file, "vgrf%d", inst->dst.nr);
break;
case FIXED_GRF:
fprintf(file, "g%d", inst->dst.nr);
@@ -1462,6 +1462,13 @@ vec4_visitor::dump_instruction(backend_instruction *be_inst, FILE *file)
case UNIFORM:
unreachable("not reached");
}
+ if (inst->dst.offset ||
+ (inst->dst.file == VGRF &&
+ alloc.sizes[inst->dst.nr] * REG_SIZE != inst->size_written)) {
+ const unsigned reg_size = (inst->dst.file == UNIFORM ? 16 : REG_SIZE);
+ fprintf(file, "+%d.%d", inst->dst.offset / reg_size,
+ inst->dst.offset % reg_size);
+ }
if (inst->dst.writemask != WRITEMASK_XYZW) {
fprintf(file, ".");
if (inst->dst.writemask & 1)
@@ -1547,11 +1554,13 @@ vec4_visitor::dump_instruction(backend_instruction *be_inst, FILE *file)
unreachable("not reached");
}
- /* Don't print .0; and only VGRFs have reg_offsets and sizes */
- if (inst->src[i].offset / REG_SIZE != 0 &&
- inst->src[i].file == VGRF &&
- alloc.sizes[inst->src[i].nr] != 1)
- fprintf(file, ".%d", inst->src[i].offset / REG_SIZE);
+ if (inst->src[i].offset ||
+ (inst->src[i].file == VGRF &&
+ alloc.sizes[inst->src[i].nr] * REG_SIZE != inst->size_read(i))) {
+ const unsigned reg_size = (inst->src[i].file == UNIFORM ? 16 : REG_SIZE);
+ fprintf(file, "+%d.%d", inst->src[i].offset / reg_size,
+ inst->src[i].offset % reg_size);
+ }
if (inst->src[i].file != IMM) {
static const char *chans[4] = {"x", "y", "z", "w"};