i965: fix brw_abs_immediate() for doubles
authorIago Toral Quiroga <itoral@igalia.com>
Wed, 18 Nov 2015 11:11:58 +0000 (12:11 +0100)
committerSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Tue, 10 May 2016 09:25:04 +0000 (11:25 +0200)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/mesa/drivers/dri/i965/brw_shader.cpp

index 759a6c25764987ed0fc90f580c92066c98eefceb..325141b2d6b1d509f5efee78f9d92dfb394aa384 100644 (file)
@@ -580,6 +580,9 @@ brw_abs_immediate(enum brw_reg_type type, struct brw_reg *reg)
    case BRW_REGISTER_TYPE_F:
       reg->f = fabsf(reg->f);
       return true;
+   case BRW_REGISTER_TYPE_DF:
+      reg->df = fabs(reg->df);
+      return true;
    case BRW_REGISTER_TYPE_VF:
       reg->ud &= ~0x80808080;
       return true;
@@ -598,9 +601,8 @@ brw_abs_immediate(enum brw_reg_type type, struct brw_reg *reg)
       assert(!"unimplemented: abs V immediate");
    case BRW_REGISTER_TYPE_Q:
       assert(!"unimplemented: abs Q immediate");
-   case BRW_REGISTER_TYPE_DF:
    case BRW_REGISTER_TYPE_HF:
-      assert(!"unimplemented: abs DF/HF immediate");
+      assert(!"unimplemented: abs HF immediate");
    }
 
    return false;