Home | History | Annotate | Download | only in Shader

Lines Matching refs:dst

564 	void ShaderCore::mov(Vector4f &dst, const Vector4f &src, bool integerDestination)
568 dst.x = As<Float4>(RoundInt(src.x));
569 dst.y = As<Float4>(RoundInt(src.y));
570 dst.z = As<Float4>(RoundInt(src.z));
571 dst.w = As<Float4>(RoundInt(src.w));
575 dst = src;
579 void ShaderCore::neg(Vector4f &dst, const Vector4f &src)
581 dst.x = -src.x;
582 dst.y = -src.y;
583 dst.z = -src.z;
584 dst.w = -src.w;
587 void ShaderCore::ineg(Vector4f &dst, const Vector4f &src)
589 dst.x = As<Float4>(-As<Int4>(src.x));
590 dst.y = As<Float4>(-As<Int4>(src.y));
591 dst.z = As<Float4>(-As<Int4>(src.z));
592 dst.w = As<Float4>(-As<Int4>(src.w));
595 void ShaderCore::f2b(Vector4f &dst, const Vector4f &src)
597 dst.x = As<Float4>(CmpNEQ(src.x, Float4(0.0f)));
598 dst.y = As<Float4>(CmpNEQ(src.y, Float4(0.0f)));
599 dst.z = As<Float4>(CmpNEQ(src.z, Float4(0.0f)));
600 dst.w = As<Float4>(CmpNEQ(src.w, Float4(0.0f)));
603 void ShaderCore::b2f(Vector4f &dst, const Vector4f &src)
605 dst.x = As<Float4>(As<Int4>(src.x) & As<Int4>(Float4(1.0f)));
606 dst.y = As<Float4>(As<Int4>(src.y) & As<Int4>(Float4(1.0f)));
607 dst.z = As<Float4>(As<Int4>(src.z) & As<Int4>(Float4(1.0f)));
608 dst.w = As<Float4>(As<Int4>(src.w) & As<Int4>(Float4(1.0f)));
611 dst, const Vector4f &src)
613 dst.x = As<Float4>(Int4(src.x));
614 dst.y = As<Float4>(Int4(src.y));
615 dst.z = As<Float4>(Int4(src.z));
616 dst.w = As<Float4>(Int4(src.w));
619 void ShaderCore::i2f(Vector4f &dst, const Vector4f &src)
621 dst.x = Float4(As<Int4>(src.x));
622 dst.y = Float4(As<Int4>(src.y));
623 dst.z = Float4(As<Int4>(src.z));
624 dst.w = Float4(As<Int4>(src.w));
627 void ShaderCore::f2u(Vector4f &dst, const Vector4f &src)
629 dst.x = As<Float4>(UInt4(src.x));
630 dst.y = As<Float4>(UInt4(src.y));
631 dst.z = As<Float4>(UInt4(src.z));
632 dst.w = As<Float4>(UInt4(src.w));
635 void ShaderCore::u2f(Vector4f &dst, const Vector4f &src)
637 dst.x = Float4(As<UInt4>(src.x));
638 dst.y = Float4(As<UInt4>(src.y));
639 dst.z = Float4(As<UInt4>(src.z));
640 dst.w = Float4(As<UInt4>(src.w));
643 void ShaderCore::i2b(Vector4f &dst, const Vector4f &src)
645 dst.x = As<Float4>(CmpNEQ(As<Int4>(src.x), Int4(0)));
646 dst.y = As<Float4>(CmpNEQ(As<Int4>(src.y), Int4(0)));
647 dst.z = As<Float4>(CmpNEQ(As<Int4>(src.z), Int4(0)));
648 dst.w = As<Float4>(CmpNEQ(As<Int4>(src.w), Int4(0)));
651 void ShaderCore::b2i(Vector4f &dst, const Vector4f &src)
653 dst.x = As<Float4>(As<Int4>(src.x) & Int4(1));
654 dst.y = As<Float4>(As<Int4>(src.y) & Int4(1));
655 dst.z = As<Float4>(As<Int4>(src.z) & Int4(1));
656 dst.w = As<Float4>(As<Int4>(src.w) & Int4(1));
659 void ShaderCore::add(Vector4f &dst, const Vector4f &src0, const Vector4f &src1)
661 dst.x = src0.x + src1.x;
662 dst.y = src0.y + src1.y;
663 dst.z = src0.z + src1.z;
664 dst.w = src0.w + src1.w;
667 void ShaderCore::iadd(Vector4f &dst, const Vector4f &src0, const Vector4f &src1)
669 dst.x = As<Float4>(As<Int4>(src0.x) + As<Int4>(src1.x));
670 dst.y = As<Float4>(As<Int4>(src0.y) + As<Int4>(src1.y));
671 dst.z = As<Float4>(As<Int4>(src0.z) + As<Int4>(src1.z));
672 dst.w = As<Float4>(As<Int4>(src0.w) + As<Int4>(src1.w));
675 void ShaderCore::sub(Vector4f &dst, const Vector4f &src0, const Vector4f &src1)
677 dst.x = src0.x - src1.x;
678 dst.y = src0.y - src1.y;
679 dst.z = src0.z - src1.z;
680 dst.w = src0.w - src1.w;
683 void ShaderCore::isub(Vector4f &dst, const Vector4f &src0, const Vector4f &src1)
685 dst.x = As<Float4>(As<Int4>(src0.x) - As<Int4>(src1.x));
686 dst.y = As<Float4>(As<Int4>(src0.y) - As<Int4>(src1.y));
687 dst.z = As<Float4>(As<Int4>(src0.z) - As<Int4>(src1.z));
688 dst.w = As<Float4>(As<Int4>(src0.w) - As<Int4>(src1.w));
691 void ShaderCore::mad(Vector4f &dst, const Vector4f &src0, const Vector4f &src1, const Vector4f &src2)
693 dst.x = src0.x * src1.x + src2.x;
694 dst.y = src0.y * src1.y + src2.y;
695 dst.z = src0.z * src1.z + src2.z;
696 dst.w = src0.w * src1.w + src2.w;
699 void ShaderCore::imad(Vector4f &dst, const Vector4f &src0, const Vector4f &src1, const Vector4f &src2)
701 dst.x = As<Float4>(As<Int4>(src0.x) * As<Int4>(src1.x) + As<Int4>(src2.x));
702 dst.y = As<Float4>(As<Int4>(src0.y) * As<Int4>(src1.y) + As<Int4>(src2.y));
703 dst.z = As<Float4>(As<Int4>(src0.z) * As<Int4>(src1.z) + As<Int4>(src2.z));
704 dst.w = As<Float4>(As<Int4>(src0.w) * As<Int4>(src1.w) + As<Int4>(src2.w));
707 void ShaderCore::mul(Vector4f &dst, const Vector4f &src0, const Vector4f &src1)
709 dst.x = src0.x * src1.x;
710 dst.y = src0.y * src1.y;
711 dst.z = src0.z * src1.z;
712 dst.w = src0.w * src1.w;
715 void ShaderCore::imul(Vector4f &dst, const Vector4f &src0, const Vector4f &src1)
717 dst.x = As<Float4>(As<Int4>(src0.x) * As<Int4>(src1.x));
718 dst.y = As<Float4>(As<Int4>(src0.y) * As<Int4>(src1.y));
719 dst.z = As<Float4>(As<Int4>(src0.z) * As<Int4>(src1.z));
720 dst.w = As<Float4>(As<Int4>(src0.w) * As<Int4>(src1.w));
723 void ShaderCore::rcpx(Vector4f &dst, const Vector4f &src, bool pp)
727 dst.x = rcp;
728 dst.y = rcp;
729 dst.z = rcp;
730 dst.w = rcp;
733 void ShaderCore::div(Vector4f &dst, const Vector4f &src0, const Vector4f &src1)
735 dst.x = src0.x / src1.x;
736 dst.y = src0.y / src1.y;
737 dst.z = src0.z / src1.z;
738 dst.w = src0.w / src1.w;
741 void ShaderCore::idiv(Vector4f &dst, const Vector4f &src0, const Vector4f &src1)
744 cmp0i(dst.x, src1.x, intMax, src1.x);
745 dst.x = As<Float4>(As<Int4>(src0.x) / As<Int4>(dst.x));
746 cmp0i(dst.y, src1.y, intMax, src1.y);
747 dst.y = As<Float4>(As<Int4>(src0.y) / As<Int4>(dst.y));
748 cmp0i(dst.z, src1.z, intMax, src1.z);
749 dst.z = As<Float4>(As<Int4>(src0.z) / As<Int4>(dst.z));
750 cmp0i(dst.w, src1.w, intMax, src1.w);
751 dst.w = As<Float4>(As<Int4>(src0.w) / As<Int4>(dst.w));
754 void ShaderCore::udiv(Vector4f &dst, const Vector4f &src0, const Vector4f &src1)
757 cmp0i(dst.x, src1.x, uintMax, src1.x);
758 dst.x = As<Float4>(As<UInt4>(src0.x) / As<UInt4>(dst.x));
759 cmp0i(dst.y, src1.y, uintMax, src1.y);
760 dst.y = As<Float4>(As<UInt4>(src0.y) / As<UInt4>(dst.y));
761 cmp0i(dst.z, src1.z, uintMax, src1.z);
762 dst.z = As<Float4>(As<UInt4>(src0.z) / As<UInt4>(dst.z));
763 cmp0i(dst.w, src1.w, uintMax, src1.w);
764 dst.w = As<Float4>(As<UInt4>(src0.w) / As<UInt4>(dst.w));
767 void ShaderCore::mod(Vector4f &dst, const Vector4f &src0, const Vector4f &src1)
769 dst.x = modulo(src0.x, src1.x);
770 dst.y = modulo(src0.y, src1.y);
771 dst.z = modulo(src0.z, src1.z);
772 dst.w = modulo(src0.w, src1.w);
775 void ShaderCore::imod(Vector4f &dst, const Vector4f &src0, const Vector4f &src1)
778 cmp0i(dst.x, src1.x, intMax, src1.x);
779 dst.x = As<Float4>(As<Int4>(src0.x) % As<Int4>(dst.x));
780 cmp0i(dst.y, src1.y, intMax, src1.y);
781 dst.y = As<Float4>(As<Int4>(src0.y) % As<Int4>(dst.y));
782 cmp0i(dst.z, src1.z, intMax, src1.z);
783 dst.z = As<Float4>(As<Int4>(src0.z) % As<Int4>(dst.z));
784 cmp0i(dst.w, src1.w, intMax, src1.w);
785 dst.w = As<Float4>(As<Int4>(src0.w) % As<Int4>(dst.w));
788 void ShaderCore::umod(Vector4f &dst, const Vector4f &src0, const Vector4f &src1)
791 cmp0i(dst.x, src1.x, uintMax, src1.x);
792 dst.x = As<Float4>(As<UInt4>(src0.x) % As<UInt4>(dst.x));
793 cmp0i(dst.y, src1.y, uintMax, src1.y);
794 dst.y = As<Float4>(As<UInt4>(src0.y) % As<UInt4>(dst.y));
795 cmp0i(dst.z, src1.z, uintMax, src1.z);
796 dst.z = As<Float4>(As<UInt4>(src0.z) % As<UInt4>(dst.z));
797 cmp0i(dst.w, src1.w, uintMax, src1.w);
798 dst.w = As<Float4>(As<UInt4>(src0.w) % As<UInt4>(dst.w));
801 void ShaderCore::shl(Vector4f &dst, const Vector4f &src0, const Vector4f &src1)
803 dst.x = As<Float4>(As<Int4>(src0.x) << As<Int4>(src1.x));
804 dst.y = As<Float4>(As<Int4>(src0.y) << As<Int4>(src1.y));
805 dst.z = As<Float4>(As<Int4>(src0.z) << As<Int4>(src1.z));
806 dst.w = As<Float4>(As<Int4>(src0.w) << As<Int4>(src1.w));
809 void ShaderCore::ishr(Vector4f &dst, const Vector4f &src0, const Vector4f &src1)
811 dst.x = As<Float4>(As<Int4>(src0.x) >> As<Int4>(src1.x));
812 dst.y = As<Float4>(As<Int4>(src0.y) >> As<Int4>(src1.y));
813 dst.z = As<Float4>(As<Int4>(src0.z) >> As<Int4>(src1.z));
814 dst.w = As<Float4>(As<Int4>(src0.w) >> As<Int4>(src1.w));
817 void ShaderCore::ushr(Vector4f &dst, const Vector4f &src0, const Vector4f &src1)
819 dst.x = As<Float4>(As<UInt4>(src0.x) >> As<UInt4>(src1.x));
820 dst.y = As<Float4>(As<UInt4>(src0.y) >> As<UInt4>(src1.y));
821 dst.z = As<Float4>(As<UInt4>(src0.z) >> As<UInt4>(src1.z));
822 dst.w = As<Float4>(As<UInt4>(src0.w) >> As<UInt4>(src1.w));
825 void ShaderCore::rsqx(Vector4f &dst, const Vector4f &src, bool pp)
829 dst.x = rsq;
830 dst.y = rsq;
831 dst.z = rsq;
832 dst.w = rsq;
835 void ShaderCore::sqrt(Vector4f &dst, const Vector4f &src, bool pp)
837 dst.x = Sqrt(src.x);
838 dst.y = Sqrt(src.y);
839 dst.z = Sqrt(src.z);
840 dst.w = Sqrt(src.w);
843 void ShaderCore::rsq(Vector4f &dst, const Vector4f &src, bool pp)
845 dst.x = reciprocalSquareRoot(src.x, false, pp);
846 dst.y = reciprocalSquareRoot(src.y, false, pp);
847 dst.z = reciprocalSquareRoot(src.z, false, pp);
848 dst.w = reciprocalSquareRoot(src.w, false, pp);
851 void ShaderCore::len2(Float4 &dst, const Vector4f &src, bool pp)
853 dst = Sqrt(dot2(src, src));
856 void ShaderCore::len3(Float4 &dst, const Vector4f &src, bool pp)
858 dst = Sqrt(dot3(src, src));
861 void ShaderCore::len4(Float4 &dst, const Vector4f &src, bool pp)
863 dst = Sqrt(dot4(src, src));
866 void ShaderCore::dist1(Float4 &dst, const Vector4f &src0, const Vector4f &src1, bool pp)
868 dst = Abs(src0.x - src1.x);
871 void ShaderCore::dist2(Float4 &dst, const Vector4f &src0, const Vector4f &src1, bool pp)
876 dst = Sqrt(dot2);
879 void ShaderCore::dist3(Float4 &dst, const Vector4f &src0, const Vector4f &src1, bool pp)
885 dst = Sqrt(dot3);
888 void ShaderCore::dist4(Float4 &dst, const Vector4f &src0, const Vector4f &src1, bool pp)
895 dst = Sqrt(dot4);
898 void ShaderCore::dp1(Vector4f &dst, const Vector4f &src0, const Vector4f &src1)
902 dst.x = t;
903 dst.y = t;
904 dst.z = t;
905 dst.w = t;
908 void ShaderCore::dp2(Vector4f &dst, const Vector4f &src0, const Vector4f &src1)
912 dst.x = t;
913 dst.y = t;
914 dst.z = t;
915 dst.w = t;
918 void ShaderCore::dp2add(Vector4f &dst, const Vector4f &src0, const Vector4f &src1, const Vector4f &src2)
922 dst.x = t;
923 dst.y = t;
924 dst.z = t;
925 dst.w = t;
928 void ShaderCore::dp3(Vector4f &dst, const Vector4f &src0, const Vector4f &src1)
932 dst.x = dot;
933 dst.y = dot;
934 dst.z = dot;
935 dst.w = dot;
938 void ShaderCore::dp4(Vector4f &dst, const Vector4f &src0, const Vector4f &src1)
942 dst.x = dot;
943 dst.y = dot;
944 dst.z = dot;
945 dst.w = dot;
948 void ShaderCore::min(Vector4f &dst, const Vector4f &src0, const Vector4f &src1)
950 dst.x = Min(src0.x, src1.x);
951 dst.y = Min(src0.y, src1.y);
952 dst.z = Min(src0.z, src1.z);
953 dst.w = Min(src0.w, src1.w);
956 void ShaderCore::imin(Vector4f &dst, const Vector4f &src0, const Vector4f &src1)
958 dst.x = As<Float4>(Min(As<Int4>(src0.x), As<Int4>(src1.x)));
959 dst.y = As<Float4>(Min(As<Int4>(src0.y), As<Int4>(src1.y)));
960 dst.z = As<Float4>(Min(As<Int4>(src0.z), As<Int4>(src1.z)));
961 dst.w = As<Float4>(Min(As<Int4>(src0.w), As<Int4>(src1.w)));
964 void ShaderCore::umin(Vector4f &dst, const Vector4f &src0, const Vector4f &src1)
966 dst.x = As<Float4>(Min(As<UInt4>(src0.x), As<UInt4>(src1.x)));
967 dst.y = As<Float4>(Min(As<UInt4>(src0.y), As<UInt4>(src1.y)));
968 dst.z = As<Float4>(Min(As<UInt4>(src0.z), As<UInt4>(src1.z)));
969 dst.w = As<Float4>(Min(As<UInt4>(src0.w), As<UInt4>(src1.w)));
972 void ShaderCore::max(Vector4f &dst, const Vector4f &src0, const Vector4f &src1)
974 dst.x = Max(src0.x, src1.x);
975 dst.y = Max(src0.y, src1.y);
976 dst.z = Max(src0.z, src1.z);
977 dst.w = Max(src0.w, src1.w);
980 void ShaderCore::imax(Vector4f &dst, const Vector4f &src0, const Vector4f &src1)
982 dst.x = As<Float4>(Max(As<Int4>(src0.x), As<Int4>(src1.x)));
983 dst.y = As<Float4>(Max(As<Int4>(src0.y), As<Int4>(src1.y)));
984 dst.z = As<Float4>(Max(As<Int4>(src0.z), As<Int4>(src1.z)));
985 dst.w = As<Float4>(Max(As<Int4>(src0.w), As<Int4>(src1.w)));
988 void ShaderCore::umax(Vector4f &dst, const Vector4f &src0, const Vector4f &src1)
990 dst.x = As<Float4>(Max(As<Int4>(src0.x), As<Int4>(src1.x)));
991 dst.y = As<Float4>(Max(As<Int4>(src0.y), As<Int4>(src1.y)));
992 dst.z = As<Float4>(Max(As<Int4>(src0.z), As<Int4>(src1.z)));
993 dst.w = As<Float4>(Max(As<Int4>(src0.w), As<Int4>(src1.w)));
996 void ShaderCore::slt(Vector4f &dst, const Vector4f &src0, const Vector4f &src1)
998 dst.x = As<Float4>(As<Int4>(CmpLT(src0.x, src1.x)) & As<Int4>(Float4(1.0f)));
999 dst.y = As<Float4>(As<Int4>(CmpLT(src0.y, src1.y)) & As<Int4>(Float4(1.0f)));
1000 dst.z = As<Float4>(As<Int4>(CmpLT(src0.z, src1.z)) & As<Int4>(Float4(1.0f)));
1001 dst.w = As<Float4>(As<Int4>(CmpLT(src0.w, src1.w)) & As<Int4>(Float4(1.0f)));
1004 void ShaderCore::step(Vector4f &dst, const Vector4f &edge, const Vector4f &x)
1006 dst.x = As<Float4>(CmpNLT(x.x, edge.x) & As<Int4>(Float4(1.0f)));
1007 dst.y = As<Float4>(CmpNLT(x.y, edge.y) & As<Int4>(Float4(1.0f)));
1008 dst.z = As<Float4>(CmpNLT(x.z, edge.z) & As<Int4>(Float4(1.0f)));
1009 dst.w = As<Float4>(CmpNLT(x.w, edge.w) & As<Int4>(Float4(1.0f)));
1012 void ShaderCore::exp2x(Vector4f &dst, const Vector4f &src, bool pp)
1016 dst.x = exp;
1017 dst.y = exp;
1018 dst.z = exp;
1019 dst.w = exp;
1022 void ShaderCore::exp2(Vector4f &dst, const Vector4f &src, bool pp)
1024 dst.x = exponential2(src.x, pp);
1025 dst.y = exponential2(src.y, pp);
1026 dst.z = exponential2(src.z, pp);
1027 dst.w = exponential2(src.w, pp);
1030 void ShaderCore::exp(Vector4f &dst, const Vector4f &src, bool pp)
1032 dst.x = exponential(src.x, pp);
1033 dst.y = exponential(src.y, pp);
1034 dst.z = exponential(src.z, pp);
1035 dst.w = exponential(src.w, pp);
1038 void ShaderCore::log2x(Vector4f &dst, const Vector4f &src, bool pp)
1042 dst.x = log;
1043 dst.y = log;
1044 dst.z = log;
1045 dst.w = log;
1048 void ShaderCore::log2(Vector4f &dst, const Vector4f &src, bool pp)
1050 dst.x = logarithm2(src.x, false, pp);
1051 dst.y = logarithm2(src.y, false, pp);
1052 dst.z = logarithm2(src.z, false, pp);
1053 dst.w = logarithm2(src.w, false, pp);
1056 void ShaderCore::log(Vector4f &dst, const Vector4f &src, bool pp)
1058 dst.x = logarithm(src.x, false, pp);
1059 dst.y = logarithm(src.y, false, pp);
1060 dst.z = logarithm(src.z, false, pp);
1061 dst.w = logarithm(src.w, false, pp);
1064 void ShaderCore::lit(Vector4f &dst, const Vector4f &src)
1066 dst.x = Float4(1.0f);
1067 dst.y = Max(src.x, Float4(0.0f));
1075 dst.z = power(src.y, pow);
1076 dst.z = As<Float4>(As<Int4>(dst.z) & CmpNLT(src.x, Float4(0.0f)));
1077 dst.z = As<Float4>(As<Int4>(dst.z) & CmpNLT(src.y, Float4(0.0f)));
1079 dst.w = Float4(1.0f);
1082 void ShaderCore::att(Vector4f &dst, const Vector4f &src0, const Vector4f &src1)
1085 dst.x = 1;
1086 dst.y = src0.y * src1.y;
1087 dst.z = src0.z;
1088 dst.w = src1.w;
1091 void ShaderCore::lrp(Vector4f &dst, const Vector4f &src0, const Vector4f &src1, const Vector4f &src2)
1093 dst.x = src0.x * (src1.x - src2.x) + src2.x;
1094 dst.y = src0.y * (src1.y - src2.y) + src2.y;
1095 dst.z = src0.z * (src1.z - src2.z) + src2.z;
1096 dst.w = src0.w * (src1.w - src2.w) + src2.w;
1099 void ShaderCore::isinf(Vector4f &dst, const Vector4f &src)
1101 dst.x = As<Float4>(IsInf(src.x));
1102 dst.y = As<Float4>(IsInf(src.y));
1103 dst.z = As<Float4>(IsInf(src.z));
1104 dst.w = As<Float4>(IsInf(src.w));
1107 void ShaderCore::isnan(Vector4f &dst, const Vector4f &src)
1109 dst.x = As<Float4>(IsNan(src.x));
1110 dst.y = As<Float4>(IsNan(src.y));
1111 dst.z = As<Float4>(IsNan(src.z));
1112 dst.w = As<Float4>(IsNan(src.w));
1115 void ShaderCore::smooth(Vector4f &dst, const Vector4f &edge0, const Vector4f &edge1, const Vector4f &x)
1117 Float4 tx = Min(Max((x.x - edge0.x) / (edge1.x - edge0.x), Float4(0.0f)), Float4(1.0f)); dst.x = tx * tx * (Float4(3.0f) - Float4(2.0f) * tx);
1118 Float4 ty = Min(Max((x.y - edge0.y) / (edge1.y - edge0.y), Float4(0.0f)), Float4(1.0f)); dst.y = ty * ty * (Float4(3.0f) - Float4(2.0f) * ty);
1119 Float4 tz = Min(Max((x.z - edge0.z) / (edge1.z - edge0.z), Float4(0.0f)), Float4(1.0f)); dst.z = tz * tz * (Float4(3.0f) - Float4(2.0f) * tz);
1120 Float4 tw = Min(Max((x.w - edge0.w) / (edge1.w - edge0.w), Float4(0.0f)), Float4(1.0f)); dst.w = tw * tw * (Float4(3.0f) - Float4(2.0f) * tw);
1123 void ShaderCore::floatToHalfBits(Float4& dst, const Float4& floatBits, bool storeInUpperBits)
1144 dst = As<Float4>(storeInUpperBits ? As<UInt4>(dst) | ((joined << 16) | justsign) : joined | (justsign >> 16));
1147 void ShaderCore::halfToFloatBits(Float4& dst, const Float4& halfBits)
1155 dst = As<Float4>(As<UInt4>(As<Float4>(expmant << 13) * As<Float4>(UInt4(magic))) |
1167 void ShaderCore::unpackHalf2x16(Vector4f &dst, const Vector4f &s0)
1170 halfToFloatBits(dst.x, As<Float4>(As<UInt4>(s0.x) & UInt4(0x0000FFFF)));
1171 halfToFloatBits(dst.y, As<Float4>((As<UInt4>(s0.x) & UInt4(0xFFFF0000)) >> 16));
1188 void ShaderCore::unpackSnorm2x16(Vector4f &dst, const Vector4f &s0)
1191 dst.x = Min(Max(Float4(As<Int4>((As<UInt4>(s0.x) & UInt4(0x0000FFFF)) << 16)) * Float4(1.0f / float(0x7FFF0000)), Float4(-1.0f)), Float4(1.0f));
1192 dst.y = Min(Max(Float4(As<Int4>(As<UInt4>(s0.x) & UInt4(0xFFFF0000))) * Float4(1.0f / float(0x7FFF0000)), Float4(-1.0f)), Float4(1.0f));
1195 void ShaderCore::unpackUnorm2x16(Vector4f &dst, const Vector4f &s0)
1198 dst.x = Float4((As<UInt4>(s0.x) & UInt4(0x0000FFFF)) << 16) * Float4(1.0f / float(0xFFFF0000));
1199 dst.y = Float4(As<UInt4>(s0.x) & UInt4(0xFFFF0000)) * Float4(1.0f / float(0xFFFF0000));
1202 void ShaderCore::det2(Vector4f &dst, const Vector4f &src0, const Vector4f &src1)
1204 dst.x = src0.x * src1.y - src0.y * src1.x;
1205 dst.y = dst.z = dst.w = dst.x;
1208 void ShaderCore::det3(Vector4f &dst, const Vector4f &src0, const Vector4f &src1, const Vector4f &src2)
1210 crs(dst, src1, src2);
1211 dp3(dst, dst, src0);
1214 void ShaderCore::det4(Vector4f &dst, const Vector4f &src0, const Vector4f &src1, const Vector4f &src2, const Vector4f &src3)
1216 dst.x = src2.z * src3.w - src2.w * src3.z;
1217 dst.y = src1.w * src3.z - src1.z * src3.w;
1218 dst.z = src1.z * src2.w - src1.w * src2.z;
1219 dst.x = src0.x * (src1.y * dst.x + src2.y * dst.y + src3.y * dst.z) -
1220 src0.y * (src1.x * dst.x + src2.x * dst.y + src3.x * dst.z) +
1227 dst.y = dst.z = dst.w = dst.x;
1230 void ShaderCore::frc(Vector4f &dst, const Vector4f &src)
1232 dst.x = Frac(src.x);
1233 dst.y = Frac(src.y);
1234 dst.z = Frac(src.z);
1235 dst.w = Frac(src.w);
1238 void ShaderCore::trunc(Vector4f &dst, const Vector4f &src)
1240 dst.x = Trunc(src.x);
1241 dst.y = Trunc(src.y);
1242 dst.z = Trunc(src.z);
1243 dst.w = Trunc(src.w);
1246 void ShaderCore::floor(Vector4f &dst, const Vector4f &src)
1248 dst.x = Floor(src.x);
1249 dst.y = Floor(src.y);
1250 dst.z = Floor(src.z);
1251 dst.w = Floor(src.w);
1254 void ShaderCore::round(Vector4f &dst, const Vector4f &src)
1256 dst.x = Round(src.x);
1257 dst.y = Round(src.y);
1258 dst.z = Round(src.z);
1259 dst.w = Round(src.w);
1262 void ShaderCore::roundEven(Vector4f &dst, const Vector4f &src)
1264 // dst = round(src) + ((round(src) < src) * 2 - 1) * (fract(src) == 0.5) * isOdd(round(src));
1274 round(dst, src);
1275 dst.x += ((Float4(CmpLT(dst.x, src.x) & Int4(1)) * Float4(2.0f)) - Float4(1.0f)) * Float4(CmpEQ(Frac(src.x), Float4(0.5f)) & Int4(1)) * Float4(Int4(dst.x) & Int4(1));
1276 dst.y += ((Float4(CmpLT(dst.y, src.y) & Int4(1)) * Float4(2.0f)) - Float4(1.0f)) * Float4(CmpEQ(Frac(src.y), Float4(0.5f)) & Int4(1)) * Float4(Int4(dst.y) & Int4(1));
1277 dst.z += ((Float4(CmpLT(dst.z, src.z) & Int4(1)) * Float4(2.0f)) - Float4(1.0f)) * Float4(CmpEQ(Frac(src.z), Float4(0.5f)) & Int4(1)) * Float4(Int4(dst.z) & Int4(1));
1278 dst.w += ((Float4(CmpLT(dst.w, src.w) & Int4(1)) * Float4(2.0f)) - Float4(1.0f)) * Float4(CmpEQ(Frac(src.w), Float4(0.5f)) & Int4(1)) * Float4(Int4(dst.w) & Int4(1));
1281 void ShaderCore::ceil(Vector4f &dst, const Vector4f &src)
1283 dst.x = Ceil(src.x);
1284 dst.y = Ceil(src.y);
1285 dst.z = Ceil(src.z);
1286 dst.w = Ceil(src.w);
1289 void ShaderCore::powx(Vector4f &dst, const Vector4f &src0, const Vector4f &src1, bool pp)
1293 dst.x = pow;
1294 dst.y = pow;
1295 dst.z = pow;
1296 dst.w = pow;
1299 void ShaderCore::pow(Vector4f &dst, const Vector4f &src0, const Vector4f &src1, bool pp)
1301 dst.x = power(src0.x, src1.x, pp);
1302 dst.y = power(src0.y, src1.y, pp);
1303 dst.z = power(src0.z, src1.z, pp);
1304 dst.w = power(src0.w, src1.w, pp);
1307 void ShaderCore::crs(Vector4f &dst, const Vector4f &src0, const Vector4f &src1)
1309 dst.x = src0.y * src1.z - src0.z * src1.y;
1310 dst.y = src0.z * src1.x - src0.x * src1.z;
1311 dst.z = src0.x * src1.y - src0.y * src1.x;
1314 void ShaderCore::forward1(Vector4f &dst, const Vector4f &N, const Vector4f &I, const Vector4f &Nref)
1318 dst.x = As<Float4>(flip ^ As<Int4>(N.x));
1321 void ShaderCore::forward2(Vector4f &dst, const Vector4f &N, const Vector4f &I, const Vector4f &Nref)
1325 dst.x = As<Float4>(flip ^ As<Int4>(N.x));
1326 dst.y = As<Float4>(flip ^ As<Int4>(N.y));
1329 void ShaderCore::forward3(Vector4f &dst, const Vector4f &N, const Vector4f &I, const Vector4f &Nref)
1333 dst.x = As<Float4>(flip ^ As<Int4>(N.x));
1334 dst.y = As<Float4>(flip ^ As<Int4>(N.y));
1335 dst.z = As<Float4>(flip ^ As<Int4>(N.z));
1338 void ShaderCore::forward4(Vector4f &dst, const Vector4f &N, const Vector4f &I, const Vector4f &Nref)
1342 dst.x = As<Float4>(flip ^ As<Int4>(N.x));
1343 dst.y = As<Float4>(flip ^ As<Int4>(N.y));
1344 dst.z = As<Float4>(flip ^ As<Int4>(N.z));
1345 dst.w = As<Float4>(flip ^ As<Int4>(N.w));
1348 void ShaderCore::reflect1(Vector4f &dst, const Vector4f &I, const Vector4f &N)
1352 dst.x = I.x - Float4(2.0f) * d * N.x;
1355 void ShaderCore::reflect2(Vector4f &dst, const Vector4f &I, const Vector4f &N)
1359 dst.x = I.x - Float4(2.0f) * d * N.x;
1360 dst.y = I.y - Float4(2.0f) * d * N.y;
1363 void ShaderCore::reflect3(Vector4f &dst, const Vector4f &I, const Vector4f &N)
1367 dst.x = I.x - Float4(2.0f) * d * N.x;
1368 dst.y = I.y - Float4(2.0f) * d * N.y;
1369 dst.z = I.z - Float4(2.0f) * d * N.z;
1372 void ShaderCore::reflect4(Vector4f &dst, const Vector4f &I, const Vector4f &N)
1376 dst.x = I.x - Float4(2.0f) * d * N.x;
1377 dst.y = I.y - Float4(2.0f) * d * N.y;
1378 dst.z = I.z - Float4(2.0f) * d * N.z;
1379 dst.w = I.w - Float4(2.0f) * d * N.w;
1382 void ShaderCore::refract1(Vector4f &dst, const Vector4f &I, const Vector4f &N, const Float4 &eta)
1389 dst.x = As<Float4>(pos & As<Int4>(eta * I.x - t * N.x));
1392 void ShaderCore::refract2(Vector4f &dst, const Vector4f &I, const Vector4f &N, const Float4 &eta)
1399 dst.x = As<Float4>(pos & As<Int4>(eta * I.x - t * N.x));
1400 dst.y = As<Float4>(pos & As<Int4>(eta * I.y - t * N.y));
1403 void ShaderCore::refract3(Vector4f &dst, const Vector4f &I, const Vector4f &N, const Float4 &eta)
1410 dst.x = As<Float4>(pos & As<Int4>(eta * I.x - t * N.x));
1411 dst.y = As<Float4>(pos & As<Int4>(eta * I.y - t * N.y));
1412 dst.z = As<Float4>(pos & As<Int4>(eta * I.z - t * N.z));
1415 void ShaderCore::refract4(Vector4f &dst, const Vector4f &I, const Vector4f &N, const Float4 &eta)
1422 dst.x = As<Float4>(pos & As<Int4>(eta * I.x - t * N.x));
1423 dst.y = As<Float4>(pos & As<Int4>(eta * I.y - t * N.y));
1424 dst.z = As<Float4>(pos & As<Int4>(eta * I.z - t * N.z));
1425 dst.w = As<Float4>(pos & As<Int4>(eta * I.w - t * N.w));
1428 void ShaderCore::sgn(Vector4f &dst, const Vector4f &src)
1430 sgn(dst.x, src.x);
1431 sgn(dst.y, src.y);
1432 sgn(dst.z, src.z);
1433 sgn(dst.w, src.w);
1436 void ShaderCore::isgn(Vector4f &dst, const Vector4f &src)
1438 isgn(dst.x, src.x);
1439 isgn(dst.y, src.y);
1440 isgn(dst.z, src.z);
1441 isgn(dst.w, src.w);
1444 void ShaderCore::abs(Vector4f &dst, const Vector4f &src)
1446 dst.x = Abs(src.x);
1447 dst.y = Abs(src.y);
1448 dst.z = Abs(src.z);
1449 dst.w = Abs(src.w);
1452 void ShaderCore::iabs(Vector4f &dst, const Vector4f &src)
1454 dst.x = As<Float4>(Abs(As<Int4>(src.x)));
1455 dst.y = As<Float4>(Abs(As<Int4>(src.y)));
1456 dst.z = As<Float4>(Abs(As<Int4>(src.z)));
1457 dst.w = As<Float4>(Abs(As<Int4>(src.w)));
1460 void ShaderCore::nrm2(Vector4f &dst, const Vector4f &src, bool pp)
1465 dst.x = src.x * rsq;
1466 dst.y = src.y * rsq;
1467 dst.z = src.z * rsq;
1468 dst.w = src.w * rsq;
1471 void ShaderCore::nrm3(Vector4f &dst, const Vector4f &src, bool pp)
1476 dst.x = src.x * rsq;
1477 dst.y = src.y * rsq;
1478 dst.z = src.z * rsq;
1479 dst.w = src.w * rsq;
1482 void ShaderCore::nrm4(Vector4f &dst, const Vector4f &src, bool pp)
1487 dst.x = src.x * rsq;
1488 dst.y = src.y * rsq;
1489 dst.z = src.z * rsq;
1490 dst.w = src.w * rsq;
1493 void ShaderCore::sincos(Vector4f &dst, const Vector4f &src, bool pp)
1495 dst.x = cosine_pi(src.x, pp);
1496 dst.y = sine_pi(src.x, pp);
1499 void ShaderCore::cos(Vector4f &dst, const Vector4f &src, bool pp)
1501 dst.x = cosine(src.x, pp);
1502 dst.y = cosine(src.y, pp);
1503 dst.z = cosine(src.z, pp);
1504 dst.w = cosine(src.w, pp);
1507 void ShaderCore::sin(Vector4f &dst, const Vector4f &src, bool pp)
1509 dst.x = sine(src.x, pp);
1510 dst.y = sine(src.y, pp);
1511 dst.z = sine(src.z, pp);
1512 dst.w = sine(src.w, pp);
1515 void ShaderCore::tan(Vector4f &dst, const Vector4f &src, bool pp)
1517 dst.x = tangent(src.x, pp);
1518 dst.y = tangent(src.y, pp);
1519 dst.z = tangent(src.z, pp);
1520 dst.w = tangent(src.w, pp);
1523 void ShaderCore::acos(Vector4f &dst, const Vector4f &src, bool pp)
1525 dst.x = arccos(src.x, pp);
1526 dst.y = arccos(src.y, pp);
1527 dst.z = arccos(src.z, pp);
1528 dst.w = arccos(src.w, pp);
1531 void ShaderCore::asin(Vector4f &dst, const Vector4f &src, bool pp)
1533 dst.x = arcsin(src.x, pp);
1534 dst.y = arcsin(src.y, pp);
1535 dst.z = arcsin(src.z, pp);
1536 dst.w = arcsin(src.w, pp);
1539 void ShaderCore::atan(Vector4f &dst, const Vector4f &src, bool pp)
1541 dst.x = arctan(src.x, pp);
1542 dst.y = arctan(src.y, pp);
1543 dst.z = arctan(src.z, pp);
1544 dst.w = arctan(src.w, pp);
1547 void ShaderCore::atan2(Vector4f &dst, const Vector4f &src0, const Vector4f &src1, bool pp)
1549 dst.x = arctan(src0.x, src1.x, pp);
1550 dst.y = arctan(src0.y, src1.y, pp);
1551 dst.z = arctan(src0.z, src1.z, pp);
1552 dst.w = arctan(src0.w, src1.w, pp);
1555 void ShaderCore::cosh(Vector4f &dst, const Vector4f &src, bool pp)
1557 dst.x = cosineh(src.x, pp);
1558 dst.y = cosineh(src.y, pp);
1559 dst.z = cosineh(src.z, pp);
1560 dst.w = cosineh(src.w, pp);
1563 void ShaderCore::sinh(Vector4f &dst, const Vector4f &src, bool pp)
1565 dst.x = sineh(src.x, pp);
1566 dst.y = sineh(src.y, pp);
1567 dst.z = sineh(src.z, pp);
1568 dst.w = sineh(src.w, pp);
1571 void ShaderCore::tanh(Vector4f &dst, const Vector4f &src, bool pp)
1573 dst.x = tangenth(src.x, pp);
1574 dst.y = tangenth(src.y, pp);
1575 dst.z = tangenth(src.z, pp);
1576 dst.w = tangenth(src.w, pp);
1579 void ShaderCore::acosh(Vector4f &dst, const Vector4f &src, bool pp)
1581 dst.x = arccosh(src.x, pp);
1582 dst.y = arccosh(src.y, pp);
1583 dst.z = arccosh(src.z, pp);
1584 dst.w = arccosh(src.w, pp);
1587 void ShaderCore::asinh(Vector4f &dst, const Vector4f &src, bool pp)
1589 dst.x = arcsinh(src.x, pp);
1590 dst.y = arcsinh(src.y, pp);
1591 dst.z = arcsinh(src.z, pp);
1592 dst.w = arcsinh(src.w, pp);
1595 void ShaderCore::atanh(Vector4f &dst, const Vector4f &src, bool pp)
1597 dst.x = arctanh(src.x, pp);
1598 dst.y = arctanh(src.y, pp);
1599 dst.z = arctanh(src.z, pp);
1600 dst.w = arctanh(src.w, pp);
1603 void ShaderCore::expp(Vector4f &dst, const Vector4f &src, unsigned short shaderModel)
1610 dst.x = exponential2(floor, true);
1611 dst.y = frc;
1612 dst.z = exponential2(src.x, true);
1613 dst.w = Float4(1.0f);
1617 exp2x(dst, src, true); // FIXME: 10-bit precision suffices
1621 void ShaderCore::logp(Vector4f &dst, const Vector4f &src, unsigned short shaderModel)
1635 dst.x = Float4(r);
1638 dst.y = As<Float4>((As<Int4>(tmp1) & Int4(0x007FFFFF)) | As<Int4>(Float4(1.0f)));
1641 dst.z = logarithm2(src.x, true, true);
1644 dst.w = 1.0f;
1648 log2x(dst, src, true);
1652 void ShaderCore::cmp0(Vector4f &dst, const Vector4f &src0, const Vector4f &src1, const Vector4f &src2)
1654 cmp0(dst.x, src0.x, src1.x, src2.x);
1655 cmp0(dst.y, src0.y, src1.y, src2.y);
1656 cmp0(dst.z, src0.z, src1.z, src2.z);
1657 cmp0(dst.w, src0.w, src1.w, src2.w);
1660 void ShaderCore::select(Vector4f &dst, const Vector4f &src0, const Vector4f &src1, const Vector4f &src2)
1662 select(dst
1663 select(dst.y, As<Int4>(src0.y), src1.y, src2.y);
1664 select(dst.z, As<Int4>(src0.z), src1.z, src2.z);
1665 select(dst.w, As<Int4>(src0.w), src1.w, src2.w);
1668 void ShaderCore::extract(Float4 &dst, const Vector4f &src0, const Float4 &src1)
1670 select(dst, CmpEQ(As<Int4>(src1), Int4(1)), src0.y, src0.x);
1671 select(dst, CmpEQ(As<Int4>(src1), Int4(2)), src0.z, dst);
1672 select(dst, CmpEQ(As<Int4>(src1), Int4(3)), src0.w, dst);
1675 void ShaderCore::insert(Vector4f &dst, const Vector4f &src, const Float4 &element, const Float4 &index)
1677 select(dst.x, CmpEQ(As<Int4>(index), Int4(0)), element, src.x);
1678 select(dst.y, CmpEQ(As<Int4>(index), Int4(1)), element, src.y);
1679 select(dst.z, CmpEQ(As<Int4>(index), Int4(2)), element, src.z);
1680 select(dst.w, CmpEQ(As<Int4>(index), Int4(3)), element, src.w);
1683 void ShaderCore::sgn(Float4 &dst, const Float4 &src)
1687 dst = As<Float4>(neg | pos);
1690 void ShaderCore::isgn(Float4 &dst, const Float4 &src)
1694 dst = As<Float4>(neg | pos);
1697 void ShaderCore::cmp0(Float4 &dst, const Float4 &src0, const Float4 &src1, const Float4 &src2)
1700 select(dst, pos, src1, src2);
1703 void ShaderCore::cmp0i(Float4 &dst, const Float4 &src0, const Float4 &src1, const Float4 &src2)
1706 select(dst, pos, src1, src2);
1709 void ShaderCore::select(Float4 &dst, RValue<Int4> src0, const Float4 &src1, const Float4 &src2)
1712 dst = As<Float4>((src0 & As<Int4>(src1)) | (~src0 & As<Int4>(src2)));
1715 void ShaderCore::cmp(Vector4f &dst, const Vector4f &src0, const Vector4f &src1, Control control)
1720 dst.x = As<Float4>(CmpNLE(src0.x, src1.x));
1721 dst.y = As<Float4>(CmpNLE(src0.y, src1.y));
1722 dst.z = As<Float4>(CmpNLE(src0.z, src1.z));
1723 dst.w = As<Float4>(CmpNLE(src0.w, src1.w));
1726 dst.x = As<Float4>(CmpEQ(src0.x, src1.x));
1727 dst.y = As<Float4>(CmpEQ(src0.y, src1.y));
1728 dst.z = As<Float4>(CmpEQ(src0.z, src1.z));
1729 dst.w = As<Float4>(CmpEQ(src0.w, src1.w));
1732 dst.x = As<Float4>(CmpNLT(src0.x, src1.x));
1733 dst.y = As<Float4>(CmpNLT(src0.y, src1.y));
1734 dst.z = As<Float4>(CmpNLT(src0.z, src1.z));
1735 dst.w = As<Float4>(CmpNLT(src0.w, src1.w));
1738 dst.x = As<Float4>(CmpLT(src0.x, src1.x));
1739 dst.y = As<Float4>(CmpLT(src0.y, src1.y));
1740 dst.z = As<Float4>(CmpLT(src0.z, src1.z));
1741 dst.w = As<Float4>(CmpLT(src0.w, src1.w));
1744 dst.x = As<Float4>(CmpNEQ(src0.x, src1.x));
1745 dst.y = As<Float4>(CmpNEQ(src0.y, src1.y));
1746 dst.z = As<Float4>(CmpNEQ(src0.z, src1.z));
1747 dst.w = As<Float4>(CmpNEQ(src0.w, src1.w));
1750 dst.x = As<Float4>(CmpLE(src0.x, src1.x));
1751 dst.y = As<Float4>(CmpLE(src0.y, src1.y));
1752 dst.z = As<Float4>(CmpLE(src0.z, src1.z));
1753 dst.w = As<Float4>(CmpLE(src0.w, src1.w));
1760 void ShaderCore::icmp(Vector4f &dst, const Vector4f &src0, const Vector4f &src1, Control control)
1765 dst.x = As<Float4>(CmpNLE(As<Int4>(src0.x), As<Int4>(src1.x)));
1766 dst.y = As<Float4>(CmpNLE(As<Int4>(src0.y), As<Int4>(src1.y)));
1767 dst.z = As<Float4>(CmpNLE(As<Int4>(src0.z), As<Int4>(src1.z)));
1768 dst.w = As<Float4>(CmpNLE(As<Int4>(src0.w), As<Int4>(src1.w)));
1771 dst.x = As<Float4>(CmpEQ(As<Int4>(src0.x), As<Int4>(src1.x)));
1772 dst.y = As<Float4>(CmpEQ(As<Int4>(src0.y), As<Int4>(src1.y)));
1773 dst.z = As<Float4>(CmpEQ(As<Int4>(src0.z), As<Int4>(src1.z)));
1774 dst.w = As<Float4>(CmpEQ(As<Int4>(src0.w), As<Int4>(src1.w)));
1777 dst.x = As<Float4>(CmpNLT(As<Int4>(src0.x), As<Int4>(src1.x)));
1778 dst.y = As<Float4>(CmpNLT(As<Int4>(src0.y), As<Int4>(src1.y)));
1779 dst.z = As<Float4>(CmpNLT(As<Int4>(src0.z), As<Int4>(src1.z)));
1780 dst.w = As<Float4>(CmpNLT(As<Int4>(src0.w), As<Int4>(src1.w)));
1783 dst.x = As<Float4>(CmpLT(As<Int4>(src0.x), As<Int4>(src1.x)));
1784 dst.y = As<Float4>(CmpLT(As<Int4>(src0.y), As<Int4>(src1.y)));
1785 dst.z = As<Float4>(CmpLT(As<Int4>(src0.z), As<Int4>(src1.z)));
1786 dst.w = As<Float4>(CmpLT(As<Int4>(src0.w), As<Int4>(src1.w)));
1789 dst.x = As<Float4>(CmpNEQ(As<Int4>(src0.x), As<Int4>(src1.x)));
1790 dst.y = As<Float4>(CmpNEQ(As<Int4>(src0.y), As<Int4>(src1.y)));
1791 dst.z = As<Float4>(CmpNEQ(As<Int4>(src0.z), As<Int4>(src1.z)));
1792 dst.w = As<Float4>(CmpNEQ(As<Int4>(src0.w), As<Int4>(src1.w)));
1795 dst.x = As<Float4>(CmpLE(As<Int4>(src0.x), As<Int4>(src1.x)));
1796 dst.y = As<Float4>(CmpLE(As<Int4>(src0.y), As<Int4>(src1.y)));
1797 dst.z = As<Float4>(CmpLE(As<Int4>(src0.z), As<Int4>(src1.z)));
1798 dst.w = As<Float4>(CmpLE(As<Int4>(src0.w), As<Int4>(src1.w)));
1805 void ShaderCore::ucmp(Vector4f &dst, const Vector4f &src0, const Vector4f &src1, Control control)
1810 dst.x = As<Float4>(CmpNLE(As<UInt4>(src0.x), As<UInt4>(src1.x)));
1811 dst.y = As<Float4>(CmpNLE(As<UInt4>(src0.y), As<UInt4>(src1.y)));
1812 dst.z = As<Float4>(CmpNLE(As<UInt4>(src0.z), As<UInt4>(src1.z)));
1813 dst.w = As<Float4>(CmpNLE(As<UInt4>(src0.w), As<UInt4>(src1.w)));
1816 dst.x = As<Float4>(CmpEQ(As<UInt4>(src0.x), As<UInt4>(src1.x)));
1817 dst.y = As<Float4>(CmpEQ(As<UInt4>(src0.y), As<UInt4>(src1.y)));
1818 dst.z = As<Float4>(CmpEQ(As<UInt4>(src0.z), As<UInt4>(src1.z)));
1819 dst.w = As<Float4>(CmpEQ(As<UInt4>(src0.w), As<UInt4>(src1.w)));
1822 dst.x = As<Float4>(CmpNLT(As<UInt4>(src0.x), As<UInt4>(src1.x)));
1823 dst.y = As<Float4>(CmpNLT(As<UInt4>(src0.y), As<UInt4>(src1.y)));
1824 dst.z = As<Float4>(CmpNLT(As<UInt4>(src0.z), As<UInt4>(src1.z)));
1825 dst.w = As<Float4>(CmpNLT(As<UInt4>(src0.w), As<UInt4>(src1.w)));
1828 dst.x = As<Float4>(CmpLT(As<UInt4>(src0.x), As<UInt4>(src1.x)));
1829 dst.y = As<Float4>(CmpLT(As<UInt4>(src0.y), As<UInt4>(src1.y)));
1830 dst.z = As<Float4>(CmpLT(As<UInt4>(src0.z), As<UInt4>(src1.z)));
1831 dst.w = As<Float4>(CmpLT(As<UInt4>(src0.w), As<UInt4>(src1.w)));
1834 dst.x = As<Float4>(CmpNEQ(As<UInt4>(src0.x), As<UInt4>(src1.x)));
1835 dst.y = As<Float4>(CmpNEQ(As<UInt4>(src0.y), As<UInt4>(src1.y)));
1836 dst.z = As<Float4>(CmpNEQ(As<UInt4>(src0.z), As<UInt4>(src1.z)));
1837 dst.w = As<Float4>(CmpNEQ(As<UInt4>(src0.w), As<UInt4>(src1.w)));
1840 dst.x = As<Float4>(CmpLE(As<UInt4>(src0.x), As<UInt4>(src1.x)));
1841 dst.y = As<Float4>(CmpLE(As<UInt4>(src0.y), As<UInt4>(src1.y)));
1842 dst.z = As<Float4>(CmpLE(As<UInt4>(src0.z), As<UInt4>(src1.z)));
1843 dst.w = As<Float4>(CmpLE(As<UInt4>(src0.w), As<UInt4>(src1.w)));
1850 void ShaderCore::all(Float4 &dst, const Vector4f &src)
1852 dst = As<Float4>(As<Int4>(src.x) & As<Int4>(src.y) & As<Int4>(src.z) & As<Int4>(src.w));
1855 void ShaderCore::any(Float4 &dst, const Vector4f &src)
1857 dst = As<Float4>(As<Int4>(src.x) | As<Int4>(src.y) | As<Int4>(src.z) | As<Int4>(src.w));
1860 void ShaderCore::bitwise_not(Vector4f &dst, const Vector4f &src)
1862 dst.x = As<Float4>(As<Int4>(src.x) ^ Int4(0xFFFFFFFF));
1863 dst.y = As<Float4>(As<Int4>(src.y) ^ Int4(0xFFFFFFFF));
1864 dst.z = As<Float4>(As<Int4>(src.z) ^ Int4(0xFFFFFFFF));
1865 dst.w = As<Float4>(As<Int4>(src.w) ^ Int4(0xFFFFFFFF));
1868 void ShaderCore::bitwise_or(Vector4f &dst, const Vector4f &src0, const Vector4f &src1)
1870 dst.x = As<Float4>(As<Int4>(src0.x) | As<Int4>(src1.x));
1871 dst.y = As<Float4>(As<Int4>(src0.y) | As<Int4>(src1.y));
1872 dst.z = As<Float4>(As<Int4>(src0.z) | As<Int4>(src1.z));
1873 dst.w = As<Float4>(As<Int4>(src0.w) | As<Int4>(src1.w));
1876 void ShaderCore::bitwise_xor(Vector4f &dst, const Vector4f &src0, const Vector4f &src1)
1878 dst.x = As<Float4>(As<Int4>(src0.x) ^ As<Int4>(src1.x));
1879 dst.y = As<Float4>(As<Int4>(src0.y) ^ As<Int4>(src1.y));
1880 dst.z = As<Float4>(As<Int4>(src0.z) ^ As<Int4>(src1.z));
1881 dst.w = As<Float4>(As<Int4>(src0.w) ^ As<Int4>(src1.w));
1884 void ShaderCore::bitwise_and(Vector4f &dst, const Vector4f &src0, const Vector4f &src1)
1886 dst.x = As<Float4>(As<Int4>(src0.x) & As<Int4>(src1.x));
1887 dst.y = As<Float4>(As<Int4>(src0.y) & As<Int4>(src1.y));
1888 dst.z = As<Float4>(As<Int4>(src0.z) & As<Int4>(src1.z));
1889 dst.w = As<Float4>(As<Int4>(src0.w) & As<Int4>(src1.w));
1892 void ShaderCore::equal(Vector4f &dst, const Vector4f &src0, const Vector4f &src1)
1894 dst.x = As<Float4>(CmpEQ(As<UInt4>(src0.x), As<UInt4>(src1.x)) &
1898 dst.y = dst.x;
1899 dst.z = dst.x;
1900 dst.w = dst.x;
1903 void ShaderCore::notEqual(Vector4f &dst, const Vector4f &src0, const Vector4f &src1)
1905 dst.x = As<Float4>(CmpNEQ(As<UInt4>(src0.x), As<UInt4>(src1.x)) |
1909 dst.y = dst.x;
1910 dst.z = dst.x;
1911 dst.w = dst.x;