summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Oliveira <igor.oliveira@openbossa.org>2010-01-18 14:49:15 -0400
committerIgor Oliveira <igor.oliveira@openbossa.org>2010-09-29 23:07:25 -0400
commit1a185b3319483ea57a1f3faf7d9b8d9aa12e52e3 (patch)
treed719c3596fee3f51601b161d439b50b84f19386c
parente44f3126f0e229a4fbf278d85ab0cd91eb7c669e (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 d075b841bb..84f32b123d 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_exec.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c
@@ -306,6 +306,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)
{
@@ -3984,6 +3994,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 );