diff options
author | Iago Toral Quiroga <[email protected]> | 2016-10-03 13:26:54 +0200 |
---|---|---|
committer | Iago Toral Quiroga <[email protected]> | 2016-10-27 10:59:31 +0200 |
commit | ba63db1f2ecf78ab894fe411b4f27d8523cf952d (patch) | |
tree | d00af93100647a95eea19985903f22d91b07ecb0 /src/mesa/drivers/dri/i965/brw_vec4_cse.cpp | |
parent | 5a4ce9f9a79934e4cfc2034c7d181a671e2563bf (diff) |
i965/vec4: use byte_offset() instead of offset()
In a later patch we want to change the semantics of offset() to be in terms
of SIMD width and scalar channels so it is consistent with the definition
of the same helper in the scalar backend. However, some uses of offset()
in the vec4 backend do not operate naturally in terms of these
semantics. In these cases it is more natural to use the byte_offset() helper
instead.
Reviewed-by: Francisco Jerez <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vec4_cse.cpp')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4_cse.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_cse.cpp b/src/mesa/drivers/dri/i965/brw_vec4_cse.cpp index 1b91db95a80..bf7e4a4f070 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_cse.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_cse.cpp @@ -182,8 +182,9 @@ vec4_visitor::opt_cse_local(bblock_t *block) NULL), inst->dst.type); for (unsigned i = 0; i < regs_written(entry->generator); ++i) { - vec4_instruction *copy = MOV(offset(entry->generator->dst, i), - offset(entry->tmp, i)); + vec4_instruction *copy = + MOV(byte_offset(entry->generator->dst, i * REG_SIZE), + byte_offset(entry->tmp, i * REG_SIZE)); copy->force_writemask_all = entry->generator->force_writemask_all; entry->generator->insert_after(block, copy); @@ -197,8 +198,9 @@ vec4_visitor::opt_cse_local(bblock_t *block) assert(inst->dst.type == entry->tmp.type); for (unsigned i = 0; i < regs_written(inst); ++i) { - vec4_instruction *copy = MOV(offset(inst->dst, i), - offset(entry->tmp, i)); + vec4_instruction *copy = + MOV(byte_offset(inst->dst, i * REG_SIZE), + byte_offset(entry->tmp, i * REG_SIZE)); copy->force_writemask_all = inst->force_writemask_all; inst->insert_before(block, copy); } |