summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Oliveira <igor.oliveira@openbossa.org>2010-01-18 14:49:15 -0400
committerMichal Krol <michal@vmware.com>2010-01-19 13:34:02 +0100
commit2b0a3d7ac70ee356b0f9b25ba85ab999a87592f4 (patch)
treeb72ea70fa35667e165a4eb1176c18bec42306229
parent391a1551623109f0c0ae8c56a14ed6aeb83a1a1e (diff)
tgsi: implement DMAD trinary opcode
-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 90061cc73d..2438ce6436 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_exec.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c
@@ -270,6 +270,16 @@ micro_dsqrt(union tgsi_double_channel *dst,
}
static void
+micro_dmad(union tgsi_double_channel *dst,
+ const union tgsi_double_channel *src)
+{
+ dst->d[0] = src[0].d[0] * src[1].d[0] + src[2].d[0];
+ dst->d[1] = src[0].d[1] * src[1].d[1] + src[2].d[1];
+ dst->d[2] = src[0].d[2] * src[1].d[2] + src[2].d[2];
+ dst->d[3] = src[0].d[3] * src[1].d[3] + src[2].d[3];
+}
+
+static void
micro_exp2(union tgsi_exec_channel *dst,
const union tgsi_exec_channel *src)
{
@@ -3879,6 +3889,10 @@ exec_instruction(
exec_double_unary(mach, inst, micro_dsqrt);
break;
+ case TGSI_OPCODE_DMAD:
+ exec_double_trinary(mach, inst, micro_dmad);
+ break;
+
default:
printf("%d", inst->Instruction.Opcode);
assert( 0 );