Mesa (gallium-double-opcodes): tgsi: implement DMAD trinary opcode
MichaŠKról
michal at kemper.freedesktop.org
Tue Jan 19 12:35:13 UTC 2010
Module: Mesa
Branch: gallium-double-opcodes
Commit: 2b0a3d7ac70ee356b0f9b25ba85ab999a87592f4
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2b0a3d7ac70ee356b0f9b25ba85ab999a87592f4
Author: Igor Oliveira <igor.oliveira at openbossa.org>
Date: Mon Jan 18 14:49:15 2010 -0400
tgsi: implement DMAD trinary opcode
---
src/gallium/auxiliary/tgsi/tgsi_exec.c | 14 ++++++++++++++
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 90061cc..2438ce6 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 );
More information about the mesa-commit
mailing list