summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorFrancisco Jerez <currojerez@riseup.net>2016-05-10 16:03:36 -0700
committerSamuel Iglesias Gonsálvez <siglesias@igalia.com>2016-05-16 09:55:32 +0200
commitea1ef49a16dc429c50ece388e92bf206ccf282a7 (patch)
tree3006bc4d066e57b6ff2a456c2828d2ff1fec79da /src/mesa/drivers/dri
parent0fb19806c069cbf34aaf02e77f5ae37a9e4cf3b0 (diff)
downloadexternal_mesa3d-ea1ef49a16dc429c50ece388e92bf206ccf282a7.zip
external_mesa3d-ea1ef49a16dc429c50ece388e92bf206ccf282a7.tar.gz
external_mesa3d-ea1ef49a16dc429c50ece388e92bf206ccf282a7.tar.bz2
i965/fs: Reindent register offset calculation of try_copy_propagate().
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
index bfaeaaa..23c545b 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
@@ -446,32 +446,32 @@ fs_visitor::try_copy_propagate(fs_inst *inst, int arg, acp_entry *entry)
inst->src[arg].stride *= entry->src.stride;
inst->saturate = inst->saturate || entry->saturate;
- /* Compute the offset of inst->src[arg] relative to entry->dst */
- const unsigned rel_offset = (inst->src[arg].reg_offset
- - entry->dst.reg_offset) * REG_SIZE +
- inst->src[arg].subreg_offset;
+ /* Compute the offset of inst->src[arg] relative to entry->dst */
+ const unsigned rel_offset = (inst->src[arg].reg_offset
+ - entry->dst.reg_offset) * REG_SIZE +
+ inst->src[arg].subreg_offset;
- /* Compute the first component of the copy that the instruction is
- * reading, and the base byte offset within that component.
- */
- assert(entry->dst.subreg_offset == 0 && entry->dst.stride == 1);
- const unsigned component = rel_offset / type_sz(entry->dst.type);
- const unsigned suboffset = rel_offset % type_sz(entry->dst.type);
+ /* Compute the first component of the copy that the instruction is
+ * reading, and the base byte offset within that component.
+ */
+ assert(entry->dst.subreg_offset == 0 && entry->dst.stride == 1);
+ const unsigned component = rel_offset / type_sz(entry->dst.type);
+ const unsigned suboffset = rel_offset % type_sz(entry->dst.type);
- /* Account for the inconsistent units reg_offset is expressed in.
- * FINISHME -- Make the units of reg_offset consistent (e.g. bytes?)
- * for all register files.
- */
- const unsigned reg_size = (entry->src.file == UNIFORM ? 4 : REG_SIZE);
+ /* Account for the inconsistent units reg_offset is expressed in.
+ * FINISHME -- Make the units of reg_offset consistent (e.g. bytes?) for
+ * all register files.
+ */
+ const unsigned reg_size = (entry->src.file == UNIFORM ? 4 : REG_SIZE);
- /* Calculate the byte offset at the origin of the copy of the given
- * component and suboffset.
- */
- const unsigned offset = suboffset +
- component * entry->src.stride * type_sz(entry->src.type) +
- entry->src.reg_offset * reg_size + entry->src.subreg_offset;
- inst->src[arg].reg_offset = offset / reg_size;
- inst->src[arg].subreg_offset = offset % reg_size;
+ /* Calculate the byte offset at the origin of the copy of the given
+ * component and suboffset.
+ */
+ const unsigned offset = suboffset +
+ component * entry->src.stride * type_sz(entry->src.type) +
+ entry->src.reg_offset * reg_size + entry->src.subreg_offset;
+ inst->src[arg].reg_offset = offset / reg_size;
+ inst->src[arg].subreg_offset = offset % reg_size;
if (has_source_modifiers) {
if (entry->dst.type != inst->src[arg].type) {