diff options
author | Chris Forbes <[email protected]> | 2014-07-06 20:11:06 +1200 |
---|---|---|
committer | Chris Forbes <[email protected]> | 2014-07-12 11:29:17 +1200 |
commit | 1854ead64ca465ca03e8e5369cd1749bc92c315a (patch) | |
tree | 817e0dfe0ba4c721d77417b01ca6ebe5f1ff450c | |
parent | 1499619fe6815510d4448f0e297d097f20a0acf3 (diff) |
i965: Avoid crashing while dumping vec4 insn operands
We'd otherwise go looking into virtual_grf_sizes for things that aren't
in there at all.
Signed-off-by: Chris Forbes <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp index b60cd1fd9d5..9ea0b147644 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp @@ -1337,7 +1337,10 @@ vec4_visitor::dump_instruction(backend_instruction *be_inst, FILE *file) break; } - if (virtual_grf_sizes[inst->src[i].reg] != 1) + /* Don't print .0; and only VGRFs have reg_offsets and sizes */ + if (inst->src[i].reg_offset != 0 && + 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) { |