summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2017-02-14 23:00:51 -0800
committerEmil Velikov <emil.l.velikov@gmail.com>2017-03-15 14:36:10 +0000
commit1966fa2b7fc3bf2ae292def2d29c8e47a6b43219 (patch)
treebed69b0988647861c08ddf3184615a5d359edb75 /src
parentae241b73e67d6498eb76292475f038b5e83d0944 (diff)
i965/fs: Remove the inline pack_double_2x32 optimization
It's broken in a number of ways. In particular, a bunch of the conditions are backwards so it doesn't actually detect what it's supposed to detect. Since it's been broken, it hasn't actually been helping anything so just deleting it isn't a regression. This (and removing another optimization) were done on master in commit b07381161777ba5d5f4a1d713f7655bcaede4139. Cc: "Kenneth Grunke" <kenneth@whitecape.org> Cc: "Mark Janes" <mark.a.janes@intel.com> [Emil Velikov: patch is a backport of the below "cherry pick"] Fixes: a4393bd97fe ("i965/fs: Fix the inline nir_op_pack_double optimization") (cherry picked from commit b07381161777ba5d5f4a1d713f7655bcaede4139)
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_nir.cpp29
1 files changed, 0 insertions, 29 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
index e4102c6d0cf..b61c38f9b77 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
@@ -1164,35 +1164,6 @@ fs_visitor::nir_emit_alu(const fs_builder &bld, nir_alu_instr *instr)
break;
case nir_op_pack_double_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_double_2x32_split_x ||
- alu_parent->op == nir_op_unpack_double_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_double_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;