summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri')
-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(", ");
}