gallium/tgsi_exec: Add missing DFLR opcode support.
authorEric Anholt <eric@anholt.net>
Fri, 24 Jul 2020 19:06:40 +0000 (12:06 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 2 Sep 2020 16:59:17 +0000 (09:59 -0700)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6567>

src/gallium/auxiliary/tgsi/tgsi_exec.c

index e0ff9476cb20f17edfa3ff0bcc3377d0dbc6a3f2..83f0b1b0134437f2ae9fc8c99b7aa40a9b402ea7 100644 (file)
@@ -378,6 +378,16 @@ micro_dfrac(union tgsi_double_channel *dst,
    dst->d[3] = src->d[3] - floor(src->d[3]);
 }
 
+static void
+micro_dflr(union tgsi_double_channel *dst,
+           const union tgsi_double_channel *src)
+{
+   dst->d[0] = floor(src->d[0]);
+   dst->d[1] = floor(src->d[1]);
+   dst->d[2] = floor(src->d[2]);
+   dst->d[3] = floor(src->d[3]);
+}
+
 static void
 micro_dldexp(union tgsi_double_channel *dst,
              const union tgsi_double_channel *src0,
@@ -6110,6 +6120,10 @@ exec_instruction(
       exec_double_unary(mach, inst, micro_dfrac);
       break;
 
+   case TGSI_OPCODE_DFLR:
+      exec_double_unary(mach, inst, micro_dflr);
+      break;
+
    case TGSI_OPCODE_DLDEXP:
       exec_dldexp(mach, inst);
       break;