diff options
author | Jason Ekstrand <[email protected]> | 2017-02-14 22:22:51 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-02-16 17:28:03 -0800 |
commit | b07381161777ba5d5f4a1d713f7655bcaede4139 (patch) | |
tree | 27516cadf93b890eddcf00ec409a062a457c4fc5 /src/mesa/drivers | |
parent | 70e86a3f2d2285e580f0faef959f429d61b40632 (diff) |
i965/fs: Remove hand-coded 64-bit packing optimizations
The optimization in unpack_64 is clearly subsumed with the opt_algebraic
optimizations in the previous commit. The pack optimization may not be
quite handled by opt_algebraic but opt_algebraic should get the really
bad cases. Also, it's been broken since it was merged and we've never
noticed so it must not be doing anything.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp index 91c14ebddfe..96473000649 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp @@ -1213,61 +1213,11 @@ fs_visitor::nir_emit_alu(const fs_builder &bld, nir_alu_instr *instr) break; case nir_op_pack_64_2x32_split: - /* Optimize the common case where we are re-packing a double with - * the result of a previous double unpack. In this case we can take the - * 32-bit value to use in the re-pack from the original double and bypass - * the unpack operation. - */ - for (int i = 0; i < 2; i++) { - if (!instr->src[i].src.is_ssa) - continue; - - const nir_instr *parent_instr = instr->src[i].src.ssa->parent_instr; - if (parent_instr->type == nir_instr_type_alu) - continue; - - const nir_alu_instr *alu_parent = nir_instr_as_alu(parent_instr); - if (alu_parent->op == nir_op_unpack_64_2x32_split_x || - alu_parent->op == nir_op_unpack_64_2x32_split_y) - continue; - - if (!alu_parent->src[0].src.is_ssa) - continue; - - op[i] = get_nir_src(alu_parent->src[0].src); - op[i] = offset(retype(op[i], BRW_REGISTER_TYPE_DF), bld, - alu_parent->src[0].swizzle[channel]); - if (alu_parent->op == nir_op_unpack_64_2x32_split_y) - op[i] = subscript(op[i], BRW_REGISTER_TYPE_UD, 1); - else - op[i] = subscript(op[i], BRW_REGISTER_TYPE_UD, 0); - } bld.emit(FS_OPCODE_PACK, result, op[0], op[1]); break; case nir_op_unpack_64_2x32_split_x: case nir_op_unpack_64_2x32_split_y: { - /* Optimize the common case where we are unpacking from a double we have - * previously packed. In this case we can just bypass the pack operation - * and source directly from its arguments. - */ - unsigned index = (instr->op == nir_op_unpack_64_2x32_split_x) ? 0 : 1; - if (instr->src[0].src.is_ssa) { - nir_instr *parent_instr = instr->src[0].src.ssa->parent_instr; - if (parent_instr->type == nir_instr_type_alu) { - nir_alu_instr *alu_parent = nir_instr_as_alu(parent_instr); - if (alu_parent->op == nir_op_pack_64_2x32_split && - alu_parent->src[index].src.is_ssa) { - op[0] = retype(get_nir_src(alu_parent->src[index].src), - BRW_REGISTER_TYPE_UD); - op[0] = - offset(op[0], bld, alu_parent->src[index].swizzle[channel]); - bld.MOV(result, op[0]); - break; - } - } - } - if (instr->op == nir_op_unpack_64_2x32_split_x) bld.MOV(result, subscript(op[0], BRW_REGISTER_TYPE_UD, 0)); else |