summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2020-07-24 12:06:40 -0700
committerEric Anholt <eric@anholt.net>2020-09-02 09:59:17 -0700
commited745febe1c05352459869e4f67bdf6e1d2a1d0c (patch)
tree4398e6f19989be5a8c540714ad041226a91e91e3 /src
parent9121afe861554d239b02c27a4c219ba9df523fb7 (diff)
gallium/tgsi_exec: Add missing DFLR opcode support.
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6567>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_exec.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c
index e0ff9476cb2..83f0b1b0134 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_exec.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c
@@ -379,6 +379,16 @@ micro_dfrac(union tgsi_double_channel *dst,
}
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,
union tgsi_exec_channel *src1)
@@ -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;