[Mesa-dev] [PATCH 2/3] i965: Avoid crashing while dumping vec4 insn operands
Chris Forbes
chrisf at ijw.co.nz
Sun Jul 6 01:11:06 PDT 2014
We'd otherwise go looking into virtual_grf_sizes for things that aren't
in there at all.
Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
---
src/mesa/drivers/dri/i965/brw_vec4.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index 5ba7d9c..4b7576a 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -1337,7 +1337,9 @@ vec4_visitor::dump_instruction(backend_instruction *be_inst, FILE *file)
break;
}
- if (virtual_grf_sizes[inst->src[i].reg] != 1)
+ if (inst->src[i].reg_offset &&
+ inst->src[i].file == GRF &&
+ virtual_grf_sizes[inst->src[i].reg] != 1)
fprintf(file, ".%d", inst->src[i].reg_offset);
if (inst->src[i].file != IMM) {
--
2.0.1
More information about the mesa-dev
mailing list