diff options
author | Francisco Jerez <[email protected]> | 2016-09-01 21:51:07 -0700 |
---|---|---|
committer | Francisco Jerez <[email protected]> | 2016-09-14 14:50:58 -0700 |
commit | b52fefc4d55a4627bf0d59c78ac531603fa08fda (patch) | |
tree | 5c1d058004d146dd632060e5b2b2d54e587e9bbb | |
parent | 230615e2280e6d28456e7d6a42b1e42645515b4d (diff) |
i965/vec4: Change opt_vector_float to keep track of the last offset seen in bytes.
This simplifies things slightly and makes the pass more correct in
presence of sub-GRF offsets.
Reviewed-by: Iago Toral Quiroga <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp index 49f3a322e3f..dc484ba7cdf 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp @@ -365,7 +365,7 @@ vec4_visitor::opt_vector_float() bool progress = false; foreach_block(block, cfg) { - int last_reg = -1, last_reg_offset = -1; + int last_reg = -1, last_offset = -1; enum brw_reg_file last_reg_file = BAD_FILE; uint8_t imm[4] = { 0 }; @@ -405,7 +405,7 @@ vec4_visitor::opt_vector_float() * sequence. Combine anything we've accumulated so far. */ if (last_reg != inst->dst.nr || - last_reg_offset != inst->dst.offset / REG_SIZE || + last_offset != inst->dst.offset || last_reg_file != inst->dst.file || (vf > 0 && dest_type != need_type)) { @@ -449,7 +449,7 @@ vec4_visitor::opt_vector_float() imm_inst[inst_count++] = inst; last_reg = inst->dst.nr; - last_reg_offset = inst->dst.offset / REG_SIZE; + last_offset = inst->dst.offset; last_reg_file = inst->dst.file; if (vf > 0) dest_type = need_type; |