summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2013-11-25 15:15:25 -0800
committerMatt Turner <[email protected]>2013-12-04 20:05:42 -0800
commit0e4053234df5e3461e80c90dfd743c3ac96006eb (patch)
treec0c5896af224d9eb77c6a15636354453d8a11a0c /src/mesa
parentd79e7117183e484f0f017f16bbf24b861ad5bcb7 (diff)
i965: Don't print extra (null) arguments in dump_instruction().
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp4
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 2d41c3fc19f..b59ab82c2ae 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -2868,7 +2868,7 @@ fs_visitor::dump_instruction(backend_instruction *be_inst)
}
printf(", ");
- for (int i = 0; i < 3; i++) {
+ for (int i = 0; i < 3 && inst->src[i].file != BAD_FILE; i++) {
if (inst->src[i].negate)
printf("-");
if (inst->src[i].abs)
@@ -2924,7 +2924,7 @@ fs_visitor::dump_instruction(backend_instruction *be_inst)
if (inst->src[i].abs)
printf("|");
- if (i < 3)
+ if (i < 2 && inst->src[i + 1].file != BAD_FILE)
printf(", ");
}
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index 5222a67dab2..fed6e6182b7 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -1138,7 +1138,7 @@ vec4_visitor::dump_instruction(backend_instruction *be_inst)
}
printf(", ");
- for (int i = 0; i < 3; i++) {
+ for (int i = 0; i < 3 && inst->src[i].file != BAD_FILE; i++) {
switch (inst->src[i].file) {
case GRF:
printf("vgrf%d", inst->src[i].reg);
@@ -1182,7 +1182,7 @@ vec4_visitor::dump_instruction(backend_instruction *be_inst)
printf("%s", chans[BRW_GET_SWZ(inst->src[i].swizzle, c)]);
}
- if (i < 3)
+ if (i < 2 && inst->src[i + 1].file != BAD_FILE)
printf(", ");
}