From 2b0a3d7ac70ee356b0f9b25ba85ab999a87592f4 Mon Sep 17 00:00:00 2001 From: Igor Oliveira Date: Mon, 18 Jan 2010 14:49:15 -0400 Subject: tgsi: implement DMAD trinary opcode --- src/gallium/auxiliary/tgsi/tgsi_exec.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 @@ -269,6 +269,16 @@ micro_dsqrt(union tgsi_double_channel *dst, dst->d[3] = sqrt(src->d[3]); } +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 ); -- cgit v1.2.3