summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi/tgsi_transform.h
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2016-03-16 15:47:41 -0600
committerBrian Paul <brianp@vmware.com>2016-03-18 12:06:30 -0600
commite9d5e68d1b3f2ce21486a17799e2345bb54116f6 (patch)
treec20840c7a5e9e20f441fafd992110458555db3ea /src/gallium/auxiliary/tgsi/tgsi_transform.h
parent7a712e64d6d59c3543fd307f9e029ad0886be622 (diff)
downloadexternal_mesa3d-e9d5e68d1b3f2ce21486a17799e2345bb54116f6.zip
external_mesa3d-e9d5e68d1b3f2ce21486a17799e2345bb54116f6.tar.gz
external_mesa3d-e9d5e68d1b3f2ce21486a17799e2345bb54116f6.tar.bz2
tgsi: add tgsi_transform_op3_inst() function
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_transform.h')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_transform.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_transform.h b/src/gallium/auxiliary/tgsi/tgsi_transform.h
index 27e6179..4dd7dda 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_transform.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_transform.h
@@ -302,6 +302,40 @@ tgsi_transform_op2_inst(struct tgsi_transform_context *ctx,
static inline void
+tgsi_transform_op3_inst(struct tgsi_transform_context *ctx,
+ unsigned opcode,
+ unsigned dst_file,
+ unsigned dst_index,
+ unsigned dst_writemask,
+ unsigned src0_file,
+ unsigned src0_index,
+ unsigned src1_file,
+ unsigned src1_index,
+ unsigned src2_file,
+ unsigned src2_index)
+{
+ struct tgsi_full_instruction inst;
+
+ inst = tgsi_default_full_instruction();
+ inst.Instruction.Opcode = opcode;
+ inst.Instruction.NumDstRegs = 1;
+ inst.Dst[0].Register.File = dst_file,
+ inst.Dst[0].Register.Index = dst_index;
+ inst.Dst[0].Register.WriteMask = dst_writemask;
+ inst.Instruction.NumSrcRegs = 3;
+ inst.Src[0].Register.File = src0_file;
+ inst.Src[0].Register.Index = src0_index;
+ inst.Src[1].Register.File = src1_file;
+ inst.Src[1].Register.Index = src1_index;
+ inst.Src[2].Register.File = src2_file;
+ inst.Src[2].Register.Index = src2_index;
+
+ ctx->emit_instruction(ctx, &inst);
+}
+
+
+
+static inline void
tgsi_transform_op1_swz_inst(struct tgsi_transform_context *ctx,
unsigned opcode,
unsigned dst_file,