diff options
author | Francisco Jerez <[email protected]> | 2015-07-27 19:18:51 +0300 |
---|---|---|
committer | Francisco Jerez <[email protected]> | 2015-07-29 14:15:34 +0300 |
commit | 5e645e68d6672cac2872fa509fb22bc2581f4b67 (patch) | |
tree | 9b7f5ce4dcf750cb743aafd183e17e3f5791ce7d /src/mesa/drivers/dri/i965/brw_fs_cse.cpp | |
parent | 992cda2c8a452ec86386a0f98eaf522afe206695 (diff) |
i965/fs: Switch opt_cse() to the fs_builder constructor from instruction.
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs_cse.cpp')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_cse.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_cse.cpp b/src/mesa/drivers/dri/i965/brw_fs_cse.cpp index e33fe6a9802..a123ff2d89b 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_cse.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_cse.cpp @@ -180,8 +180,6 @@ create_copy_instr(const fs_builder &bld, fs_inst *inst, fs_reg src, bool negate) { int written = inst->regs_written; int dst_width = inst->exec_size / 8; - const fs_builder ubld = bld.exec_all(inst->force_writemask_all) - .group(inst->exec_size, inst->force_sechalf); fs_inst *copy; if (written > dst_width) { @@ -204,11 +202,11 @@ create_copy_instr(const fs_builder &bld, fs_inst *inst, fs_reg src, bool negate) } for (int i = header_size; i < sources; i++) { payload[i] = src; - src = offset(src, ubld, 1); + src = offset(src, bld, 1); } - copy = ubld.LOAD_PAYLOAD(inst->dst, payload, sources, header_size); + copy = bld.LOAD_PAYLOAD(inst->dst, payload, sources, header_size); } else { - copy = ubld.MOV(inst->dst, src); + copy = bld.MOV(inst->dst, src); copy->src[0].negate = negate; } assert(copy->regs_written == written); @@ -258,13 +256,14 @@ fs_visitor::opt_cse_local(bblock_t *block) */ bool no_existing_temp = entry->tmp.file == BAD_FILE; if (no_existing_temp && !entry->generator->dst.is_null()) { + const fs_builder ibld = fs_builder(this, block, entry->generator) + .at(block, entry->generator->next); int written = entry->generator->regs_written; entry->tmp = fs_reg(GRF, alloc.allocate(written), entry->generator->dst.type); - create_copy_instr(bld.at(block, entry->generator->next), - entry->generator, entry->tmp, false); + create_copy_instr(ibld, entry->generator, entry->tmp, false); entry->generator->dst = entry->tmp; } @@ -273,8 +272,9 @@ fs_visitor::opt_cse_local(bblock_t *block) if (!inst->dst.is_null()) { assert(inst->regs_written == entry->generator->regs_written); assert(inst->dst.type == entry->tmp.type); + const fs_builder ibld(this, block, inst); - create_copy_instr(bld.at(block, inst), inst, entry->tmp, negate); + create_copy_instr(ibld, inst, entry->tmp, negate); } /* Set our iterator so that next time through the loop inst->next |