diff options
author | Rob Clark <[email protected]> | 2016-01-15 18:22:40 -0500 |
---|---|---|
committer | Rob Clark <[email protected]> | 2016-01-16 14:23:20 -0500 |
commit | 6a33c5c0dffce136bdc95daa2db2d3e9d3c1741f (patch) | |
tree | e8fe0fde1b2df33a17d9e08ca58035ca42c294be /src/gallium/drivers/freedreno/ir3/ir3_print.c | |
parent | ddede497b831fb98e3540247b570968532cdacc9 (diff) |
freedreno/ir3: array offset can be negative
It at least happens with some piglit tests, like
$piglit/bin/vp-address-01
VERT
DCL IN[0]
DCL IN[1]
DCL OUT[0], POSITION
DCL OUT[1], COLOR
DCL CONST[0..7]
DCL ADDR[0]
0: ARL ADDR[0].x, IN[1].xxxx
1: MOV_SAT OUT[1], CONST[ADDR[0].x-1]
2: DP4 OUT[0].x, CONST[4], IN[0]
3: DP4 OUT[0].y, CONST[5], IN[0]
4: DP4 OUT[0].z, CONST[6], IN[0]
5: DP4 OUT[0].w, CONST[7], IN[0]
6: END
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/ir3/ir3_print.c')
-rw-r--r-- | src/gallium/drivers/freedreno/ir3/ir3_print.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_print.c b/src/gallium/drivers/freedreno/ir3/ir3_print.c index ec832f5d72a..ba0c4a57aa3 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_print.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_print.c @@ -107,7 +107,7 @@ static void print_reg_name(struct ir3_register *reg) if (reg->flags & IR3_REG_IMMED) { printf("imm[%f,%d,0x%x]", reg->fim_val, reg->iim_val, reg->iim_val); } else if (reg->flags & IR3_REG_ARRAY) { - printf("arr[id=%u, offset=%u, size=%u", reg->array.id, + printf("arr[id=%u, offset=%d, size=%u", reg->array.id, reg->array.offset, reg->size); /* for ARRAY we could have null src, for example first write * instruction.. @@ -126,9 +126,9 @@ static void print_reg_name(struct ir3_register *reg) if (reg->flags & IR3_REG_HALF) printf("h"); if (reg->flags & IR3_REG_CONST) - printf("c<a0.x + %u>", reg->array.offset); + printf("c<a0.x + %d>", reg->array.offset); else - printf("\x1b[0;31mr<a0.x + %u>\x1b[0m (%u)", reg->array.offset, reg->size); + printf("\x1b[0;31mr<a0.x + %d>\x1b[0m (%u)", reg->array.offset, reg->size); } else { if (reg->flags & IR3_REG_HALF) printf("h"); |