Home | History | Annotate | Download | only in tgsi

Lines Matching refs:DST

47       struct tgsi_full_dst_register dst;
67 reg_dst(struct tgsi_full_dst_register *dst,
70 *dst = *orig_dst;
71 dst->Register.WriteMask &= wrmask;
72 assert(dst->Register.WriteMask);
103 * if (dst.x aliases src.x) {
107 * COS dst.x, src.x
108 * SIN dst.y, src.x
109 * MOV dst.zw, imm{0.0, 1.0}
112 aliases(const struct tgsi_full_dst_register *dst, unsigned dst_mask,
115 if ((dst->Register.File == src->Register.File) &&
116 (dst->Register.Index == src->Register.Index)) {
131 const struct tgsi_full_dst_register *dst,
141 reg_dst(&new_inst.Dst[0], dst, mask);
149 * anything which increases the # of tokens per src/dst and the
154 * 1 : dst
159 * 2 : dst
170 /* DST - Distance Vector
171 * dst.x = 1.0
172 * dst.y = src0.y \times src1.y
173 * dst.z = src0.z
174 * dst.w = src1.w
179 * if (dst.y aliases src0.z) {
183 * if (dst.yz aliases src1.w) {
187 * MUL dst.y, src0.y, src1.y
188 * MOV dst.z, src0.z
189 * MOV dst.w, src1.w
190 * MOV dst.x, imm{1.0}
200 struct tgsi_full_dst_register *dst = &inst->Dst[0];
205 if (aliases(dst, TGSI_WRITEMASK_Y, src0, TGSI_WRITEMASK_Z)) {
206 create_mov(tctx, &ctx->tmp[A].dst, src0, TGSI_WRITEMASK_YZ, 0);
210 if (aliases(dst, TGSI_WRITEMASK_YZ, src1, TGSI_WRITEMASK_W)) {
211 create_mov(tctx, &ctx->tmp[B].dst, src1, TGSI_WRITEMASK_YW, 0);
215 if (dst->Register.WriteMask & TGSI_WRITEMASK_Y) {
216 /* MUL dst.y, src0.y, src1.y */
220 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_Y);
227 if (dst->Register.WriteMask & TGSI_WRITEMASK_Z) {
228 /* MOV dst.z, src0.z */
232 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_Z);
238 if (dst->Register.WriteMask & TGSI_WRITEMASK_W) {
239 /* MOV dst.w, src1.w */
243 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_W);
249 if (dst->Register.WriteMask & TGSI_WRITEMASK_X) {
250 /* MOV dst.x, imm{1.0} */
254 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_X);
262 * dst.x = src0.y \times src1.z - src1.y \times src0.z
263 * dst.y = src0.z \times src1.x - src1.z \times src0.x
264 * dst.z = src0.x \times src1.y - src1.x \times src0.y
265 * dst.w = 1.0
269 * MAD dst.xyz, src0.yzx, src1.zxy, -tmpA.xyz
270 * MOV dst.w, imm{1.0}
279 struct tgsi_full_dst_register *dst = &inst->Dst[0];
284 if (dst->Register.WriteMask & TGSI_WRITEMASK_XYZ) {
289 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_XYZ);
295 /* MAD dst.xyz, src0.yzx, src1.zxy, -tmpA.xyz */
299 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_XYZ);
308 if (dst->Register.WriteMask & TGSI_WRITEMASK_W) {
309 /* MOV dst.w, imm{1.0} */
313 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_W);
321 * dst.x = \cos{src.x}
322 * dst.y = \sin{src.x}
323 * dst.z = 0.0
324 * dst.w = 1.0
327 * if (dst.x aliases src.x) {
331 * COS dst.x, src.x
332 * SIN dst.y, src.x
333 * MOV dst.zw, imm{0.0, 1.0}
342 struct tgsi_full_dst_register *dst = &inst->Dst[0];
346 if (aliases(dst, TGSI_WRITEMASK_X, src, TGSI_WRITEMASK_X)) {
347 create_mov(tctx, &ctx->tmp[A].dst, src, TGSI_WRITEMASK_X, 0);
351 if (dst->Register.WriteMask & TGSI_WRITEMASK_X) {
352 /* COS dst.x, src.x */
356 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_X);
362 if (dst->Register.WriteMask & TGSI_WRITEMASK_Y) {
363 /* SIN dst.y, src.x */
367 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_Y);
373 if (dst->Register.WriteMask & TGSI_WRITEMASK_ZW) {
374 /* MOV dst.zw, imm{0.0, 1.0} */
378 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_ZW);
386 * dst.x = src0.x \times src1.x + (1.0 - src0.x) \times src2.x
387 * dst.y = src0.y \times src1.y + (1.0 - src0.y) \times src2.y
388 * dst.z = src0.z \times src1.z + (1.0 - src0.z) \times src2.z
389 * dst.w = src0.w \times src1.w + (1.0 - src0.w) \times src2.w
396 * MAD dst, src0, src1, -tmpA
405 struct tgsi_full_dst_register *dst = &inst->Dst[0];
411 if (dst->Register.WriteMask & TGSI_WRITEMASK_XYZW) {
416 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_XYZW);
424 /* MAD dst, src0, src1, -tmpA */
428 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_XYZW);
439 * dst.x = src.x - \lfloor src.x\rfloor
440 * dst.y = src.y - \lfloor src.y\rfloor
441 * dst.z = src.z - \lfloor src.z\rfloor
442 * dst.w = src.w - \lfloor src.w\rfloor
446 * SUB dst, src, tmpA
455 struct tgsi_full_dst_register *dst = &inst->Dst[0];
459 if (dst->Register.WriteMask & TGSI_WRITEMASK_XYZW) {
464 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_XYZW);
469 /* SUB dst, src, tmpA */
473 reg_dst(&new_inst.Dst[0], dst
483 * dst.x = src0.x^{src1.x}
484 * dst.y = src0.x^{src1.x}
485 * dst.z = src0.x^{src1.x}
486 * dst.w = src0.x^{src1.x}
491 * EX2 dst, tmpA.x
500 struct tgsi_full_dst_register *dst = &inst->Dst[0];
505 if (dst->Register.WriteMask & TGSI_WRITEMASK_XYZW) {
510 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_X);
519 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_X);
525 /* EX2 dst, tmpA.x */
529 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_XYZW);
537 * dst.x = 1.0
538 * dst.y = max(src.x, 0.0)
539 * dst.z = (src.x > 0.0) ? max(src.y, 0.0)^{clamp(src.w, -128.0, 128.0))} : 0
540 * dst.w = 1.0
549 * MOV dst.yz, tmpA.xy
550 * MOV dst.xw, imm{1.0}
560 struct tgsi_full_dst_register *dst = &inst->Dst[0];
564 if (dst->Register.WriteMask & TGSI_WRITEMASK_YZ) {
569 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_XY);
579 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_Z);
591 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_Y);
600 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_Y);
610 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_Y);
619 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_Y);
627 /* MOV dst.yz, tmpA.xy */
631 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_YZ);
637 if (dst->Register.WriteMask & TGSI_WRITEMASK_XW) {
638 /* MOV dst.xw, imm{1.0} */
642 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_XW);
650 * dst.x = 2^{\lfloor src.x\rfloor}
651 * dst.y = src.x - \lfloor src.x\rfloor
652 * dst.z = 2^{src.x}
653 * dst.w = 1.0
663 * SUB dst.y, src.x, tmpA.x
664 * EX2 dst.x, tmpA.x
665 * MOV dst.z, tmpA.y
666 * MOV dst.w, imm{1.0}
676 struct tgsi_full_dst_register *dst = &inst->Dst[0];
680 if (dst->Register.WriteMask & TGSI_WRITEMASK_XY) {
686 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_X);
695 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_X);
706 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_X);
713 if (dst->Register.WriteMask & TGSI_WRITEMASK_Z) {
718 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_Y);
724 if (dst->Register.WriteMask & TGSI_WRITEMASK_Y) {
725 /* SUB dst.y, src.x, tmpA.x */
729 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_Y);
737 if (dst->Register.WriteMask & TGSI_WRITEMASK_X) {
738 /* EX2 dst.x, tmpA.x */
742 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_X);
748 if (dst->Register.WriteMask & TGSI_WRITEMASK_Z) {
749 /* MOV dst.z, tmpA.y */
753 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_Z);
759 if (dst->Register.WriteMask & TGSI_WRITEMASK_W) {
760 /* MOV dst.w, imm{1.0} */
764 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_W);
772 * dst.x = \lfloor\log_2{|src.x|}\rfloor
773 * dst.y = \frac{|src.x|}{2^{\lfloor\log_2{|src.x|}\rfloor}}
774 * dst.z = \log_2{|src.x|}
775 * dst.w = 1.0
787 * MUL dst.y, |src.x|, tmpA.z
788 * MOV dst.xz, tmpA.yx
789 * MOV dst.w, imm{1.0}
799 struct tgsi_full_dst_register *dst = &inst->Dst[0];
803 if (dst->Register.WriteMask & TGSI_WRITEMASK_XYZ) {
808 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_X);
815 if (dst->Register.WriteMask & TGSI_WRITEMASK_XY) {
821 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_Y);
830 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_Y);
841 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_Y);
848 if (dst->Register.WriteMask & TGSI_WRITEMASK_Y) {
853 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_Z);
862 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_Z);
867 /* MUL dst.y, |src.x|, tmpA.z */
871 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_Y);
879 if (dst->Register.WriteMask & TGSI_WRITEMASK_XZ) {
880 /* MOV dst.xz, tmpA.yx */
884 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_XZ);
890 if (dst->Register.WriteMask & TGSI_WRITEMASK_W) {
891 /* MOV dst.w, imm{1.0} */
895 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_W);
903 * dst = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z + src0.w \times src1.w
906 * dst = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z
909 * dst = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z + src1.w
912 * dst = src0.x \times src1.x + src0.y \times src1.y
915 * dst = src0.x \times src1.x + src0.y \times src1.y + src2.x
936 * ; fixup last instruction to replicate into dst
949 struct tgsi_full_dst_register *dst = &inst->Dst[0];
957 * components (since it could be re-written to write to final dst)
960 if (dst->Register.WriteMask & TGSI_WRITEMASK_XYZW) {
965 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_X);
975 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_X);
990 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_X);
1003 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_X);
1014 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_X);
1027 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_X);
1033 /* fixup last instruction to write to dst: */
1034 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_XYZW);
1044 * ADD dst, src, tmpA
1047 * SUB dst, src, tmpA
1059 struct tgsi_full_dst_register *dst = &inst->Dst[0];
1064 if (dst->Register.WriteMask & TGSI_WRITEMASK_XYZW) {
1069 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_XYZW);
1077 /* FLR: SUB dst, src, tmpA CEIL: ADD dst, src, tmpA */
1081 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_XYZW);
1092 * dst.x = trunc(src.x)
1093 * dst.y = trunc(src.y)
1094 * dst.z = trunc(src.z)
1095 * dst.w = trunc(src.w)
1104 * CMP dst, src, -tmpA, tmpA
1113 struct tgsi_full_dst_register *dst = &inst->Dst[0];
1117 if (dst->Register.WriteMask & TGSI_WRITEMASK_XYZW) {
1122 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_XYZW);
1132 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_XYZW);
1144 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, TGSI_WRITEMASK_XYZW);
1155 reg_dst(&new_inst.Dst[0], dst, TGSI_WRITEMASK_XYZW);
1177 * <opc> dst, tmpA, ...
1260 create_mov(tctx, &ctx->tmp[A].dst, coord, TGSI_WRITEMASK_XYZW, 0);
1273 reg_dst(&new_inst.Dst[0], &ctx->tmp[B].dst, TGSI_WRITEMASK_X);
1282 reg_dst(&new_inst.Dst[0], &ctx->tmp[A].dst, pmask);
1293 create_mov(tctx, &ctx->tmp[A].dst, &ctx->tmp[A].src, mask, 1);
1372 new_inst.Dst[0].Register.File = TGSI_FILE_TEMPORARY;
1373 new_inst.Dst[0].Register.Index = tmpbase + ctx->numtmp + i;
1374 new_inst.Dst[0].Register.WriteMask = TGSI_WRITEMASK_XYZW;
1444 ctx->tmp[i].dst.Register.File = TGSI_FILE_TEMPORARY;
1445 ctx->tmp[i].dst.Register.Index = tmpbase + i;
1446 ctx->tmp[i].dst.Register.WriteMask = TGSI_WRITEMASK_XYZW;
1638 if (!(OPCS(DST) ||
1667 if (OPCS(DST)) {
1668 newlen += DST_GROW * OPCS(DST);