Lines Matching refs:dst
48 struct tgsi_full_dst_register dst;
68 reg_dst(struct tgsi_full_dst_register *dst,
71 *dst = *orig_dst;
72 dst->Register.WriteMask &= wrmask;
73 assert(dst->Register.WriteMask);
104 * if (dst.x aliases src.x) {
108 * COS dst.x, src.x
109 * SIN dst.y, src.x
110 * MOV dst.zw, imm{0.0, 1.0}
113 aliases(const struct tgsi_full_dst_register *dst, unsigned dst_mask,
116 if ((dst->Register.File == src->Register.File) &&
117 (dst->Register.Index == src->Register.Index)) {
132 const struct tgsi_full_dst_register *dst,
142 reg_dst(&new_inst.Dst[0], dst, mask);
150 * anything which increases the # of tokens per src/dst and the
155 * 1 : dst
160 * 2 : dst
172 * dst.x = 1.0
173 * dst.y = src0.y \times src1.y
174 * dst.z = src0.z
175 * dst.w = src1.w
180 * if (dst.y aliases src0.z) {
184 * if (dst.yz aliases src1.w) {
188 * MUL dst.y, src0.y, src1.y
189 * MOV dst.z, src0.z
190 * MOV dst.w, src1.w
191 * MOV dst.x, imm{1.0}
201 struct tgsi_full_dst_register *dst = &inst->Dst[0];
206 if (aliases(dst, TGSI_WRITEMASK_Y, src0, TGSI_WRITEMASK_Z)) {
207 create_mov(tctx, &ctx->tmp[A].dst, src0, TGSI_WRITEMASK_YZ, 0);
211 if (aliases(dst, TGSI_WRITEMASK_YZ, src1, TGSI_WRITEMASK_W)) {
212 create_mov(tctx, &ctx->tmp[B].dst, src1, TGSI_WRITEMASK_YW, 0);
216 if (dst->Register.WriteMask & TGSI_WRITEMASK_Y) {
217 /* MUL dst.y, src0.y, src1.y */
221 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_Y);
228 if (dst->Register.WriteMask & TGSI_WRITEMASK_Z) {
229 /* MOV dst.z, src0.z */
233 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_Z);
239 if (dst->Register.WriteMask & TGSI_WRITEMASK_W) {
240 /* MOV dst.w, src1.w */
244 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_W);
250 if (dst->Register.WriteMask & TGSI_WRITEMASK_X) {
251 /* MOV dst.x, imm{1.0} */
255 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_X);
263 * dst.x = src0.x \times src1.x + (1.0 - src0.x) \times src2.x
264 * dst.y = src0.y \times src1.y + (1.0 - src0.y) \times src2.y
265 * dst.z = src0.z \times src1.z + (1.0 - src0.z) \times src2.z
266 * dst.w = src0.w \times src1.w + (1.0 - src0.w) \times src2.w
273 * MAD dst, src0, src1, -tmpA
282 struct tgsi_full_dst_register *dst = &inst->Dst[0];
288 if (dst->Register.WriteMask & TGSI_WRITEMASK_XYZW) {
293 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_XYZW);
301 /* MAD dst, src0, src1, -tmpA */
305 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_XYZW);
316 * dst.x = src.x - \lfloor src.x\rfloor
317 * dst.y = src.y - \lfloor src.y\rfloor
318 * dst.z = src.z - \lfloor src.z\rfloor
319 * dst.w = src.w - \lfloor src.w\rfloor
323 * SUB dst, src, tmpA
332 struct tgsi_full_dst_register *dst = &inst->Dst[0];
336 if (dst->Register.WriteMask & TGSI_WRITEMASK_XYZW) {
341 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_XYZW);
346 /* SUB dst, src, tmpA */
350 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_XYZW);
360 * dst.x = src0.x^{src1.x}
361 * dst.y = src0.x^{src1.x}
362 * dst.z = src0.x^{src1.x}
363 * dst.w = src0.x^{src1.x}
368 * EX2 dst, tmpA.x
377 struct tgsi_full_dst_register *dst = &inst->Dst[0];
382 if (dst->Register.WriteMask & TGSI_WRITEMASK_XYZW) {
387 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_X);
396 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_X);
402 /* EX2 dst, tmpA.x */
406 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_XYZW);
414 * dst.x = 1.0
415 * dst.y = max(src.x, 0.0)
416 * dst.z = (src.x > 0.0) ? max(src.y, 0.0)^{clamp(src.w, -128.0, 128.0))} : 0
417 * dst.w = 1.0
426 * MOV dst.yz, tmpA.xy
427 * MOV dst.xw, imm{1.0}
437 struct tgsi_full_dst_register *dst = &inst->Dst[0];
441 if (dst->Register.WriteMask & TGSI_WRITEMASK_YZ) {
446 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_XY);
456 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_Z);
466 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_Z);
477 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_Y);
486 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_Y);
496 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_Y);
505 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_Y);
513 /* MOV dst.yz, tmpA.xy */
517 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_YZ);
523 if (dst->Register.WriteMask & TGSI_WRITEMASK_XW) {
524 /* MOV dst.xw, imm{1.0} */
528 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_XW);
536 * dst.x = 2^{\lfloor src.x\rfloor}
537 * dst.y = src.x - \lfloor src.x\rfloor
538 * dst.z = 2^{src.x}
539 * dst.w = 1.0
549 * SUB dst.y, src.x, tmpA.x
550 * EX2 dst.x, tmpA.x
551 * MOV dst.z, tmpA.y
552 * MOV dst.w, imm{1.0}
562 struct tgsi_full_dst_register *dst = &inst->Dst[0];
566 if (dst->Register.WriteMask & TGSI_WRITEMASK_XY) {
572 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_X);
581 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_X);
592 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_X);
599 if (dst->Register.WriteMask & TGSI_WRITEMASK_Z) {
604 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_Y);
610 if (dst->Register.WriteMask & TGSI_WRITEMASK_Y) {
611 /* SUB dst.y, src.x, tmpA.x */
615 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_Y);
623 if (dst->Register.WriteMask & TGSI_WRITEMASK_X) {
624 /* EX2 dst.x, tmpA.x */
628 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_X);
634 if (dst->Register.WriteMask & TGSI_WRITEMASK_Z) {
635 /* MOV dst.z, tmpA.y */
639 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_Z);
645 if (dst->Register.WriteMask & TGSI_WRITEMASK_W) {
646 /* MOV dst.w, imm{1.0} */
650 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_W);
658 * dst.x = \lfloor\log_2{|src.x|}\rfloor
659 * dst.y = \frac{|src.x|}{2^{\lfloor\log_2{|src.x|}\rfloor}}
660 * dst.z = \log_2{|src.x|}
661 * dst.w = 1.0
673 * MUL dst.y, |src.x|, tmpA.z
674 * MOV dst.xz, tmpA.yx
675 * MOV dst.w, imm{1.0}
685 struct tgsi_full_dst_register *dst = &inst->Dst[0];
689 if (dst->Register.WriteMask & TGSI_WRITEMASK_XYZ) {
694 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_X);
701 if (dst->Register.WriteMask & TGSI_WRITEMASK_XY) {
707 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_Y);
716 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_Y);
727 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_Y);
734 if (dst->Register.WriteMask & TGSI_WRITEMASK_Y) {
739 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_Z);
748 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_Z);
753 /* MUL dst.y, |src.x|, tmpA.z */
757 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_Y);
765 if (dst->Register.WriteMask & TGSI_WRITEMASK_XZ) {
766 /* MOV dst.xz, tmpA.yx */
770 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_XZ);
776 if (dst->Register.WriteMask & TGSI_WRITEMASK_W) {
777 /* MOV dst.w, imm{1.0} */
781 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_W);
789 * dst = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z + src0.w \times src1.w
792 * dst = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z
795 * dst = src0.x \times src1.x + src0.y \times src1.y
812 * ; fixup last instruction to replicate into dst
823 struct tgsi_full_dst_register *dst = &inst->Dst[0];
830 * components (since it could be re-written to write to final dst)
833 if (dst->Register.WriteMask & TGSI_WRITEMASK_XYZW) {
838 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_X);
848 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_X);
862 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_X);
875 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_X);
883 /* fixup last instruction to write to dst: */
884 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_XYZW);
894 * ADD dst, src, tmpA
897 * SUB dst, src, tmpA
909 struct tgsi_full_dst_register *dst = &inst->Dst[0];
914 if (dst->Register.WriteMask & TGSI_WRITEMASK_XYZW) {
919 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_XYZW);
927 /* FLR: SUB dst, src, tmpA CEIL: ADD dst, src, tmpA */
931 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_XYZW);
942 * dst.x = trunc(src.x)
943 * dst.y = trunc(src.y)
944 * dst.z = trunc(src.z)
945 * dst.w = trunc(src.w)
954 * CMP dst, src, -tmpA, tmpA
963 struct tgsi_full_dst_register *dst = &inst->Dst[0];
967 if (dst->Register.WriteMask & TGSI_WRITEMASK_XYZW) {
972 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_XYZW);
982 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_XYZW);
994 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_XYZW);
1005 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_XYZW);
1027 * <opc> dst, tmpA, ...
1110 create_mov(tctx, &ctx->tmp[A].dst, coord, TGSI_WRITEMASK_XYZW, 0);
1123 reg_dst(&new_inst.Dst[0], &ctx->tmp[B].dst, TGSI_WRITEMASK_X);
1132 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, pmask);
1143 create_mov(tctx, &ctx->tmp[A].dst, &ctx->tmp[A].src, mask, 1);
1293 ctx->tmp[i].dst.Register.File = TGSI_FILE_TEMPORARY;
1294 ctx->tmp[i].dst.Register.Index = tmpbase + i;
1295 ctx->tmp[i].dst.Register.WriteMask = TGSI_WRITEMASK_XYZW;