i965/fs: Fix the inline nir_op_pack_double optimization
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 15 Feb 2017 07:00:51 +0000 (23:00 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 17 Feb 2017 01:28:03 +0000 (17:28 -0800)
We can only do the optimization if the source *is* SSA.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
src/mesa/drivers/dri/i965/brw_fs_nir.cpp

index 991c20fad622098bc36845bd65fa0669e42e5f32..94f275189f30ac62b9b45579cd9c2f8f3e5a683f 100644 (file)
@@ -1219,7 +1219,7 @@ fs_visitor::nir_emit_alu(const fs_builder &bld, nir_alu_instr *instr)
        * the unpack operation.
        */
       for (int i = 0; i < 2; i++) {
-         if (instr->src[i].src.is_ssa)
+         if (!instr->src[i].src.is_ssa)
             continue;
 
          const nir_instr *parent_instr = instr->src[i].src.ssa->parent_instr;