Lines Matching refs:SIMD
56 sw::SIMD::Float sRGBtoLinear(sw::SIMD::Float c) in sRGBtoLinear()
58 sw::SIMD::Float lc = c * sw::SIMD::Float(1.0f / 12.92f); in sRGBtoLinear()
59 …sw::SIMD::Float ec = sw::power((c + sw::SIMD::Float(0.055f)) * sw::SIMD::Float(1.0f / 1.055f), sw:… in sRGBtoLinear()
61 sw::SIMD::Int linear = CmpLT(c, sw::SIMD::Float(0.04045f)); in sRGBtoLinear()
63 …return rr::As<sw::SIMD::Float>((linear & rr::As<sw::SIMD::Int>(lc)) | (~linear & rr::As<sw::SIMD::… in sRGBtoLinear()
207 Array<SIMD::Float> in(16); // Maximum 16 input parameter components. in EmitImageSample()
271 in[i] = As<SIMD::Float>(SIMD::Int(0)); in EmitImageSample()
284 in[i] = As<SIMD::Float>(offsetValue.Int(j)); // Integer values, but transfered as float. in EmitImageSample()
291 in[i] = As<SIMD::Float>(sampleValue.Int(0)); in EmitImageSample()
306 Array<SIMD::Float> out(4); in EmitImageSample()
392 auto one = SIMD::Int(1); in GetImageDimensions()
395 dst.move(i, Max(SIMD::Int(extent[i]) >> lod, one)); in GetImageDimensions()
402 dst.move(i, SIMD::Int(extent[i])); in GetImageDimensions()
409 dst.move(dimensions, SIMD::Int(numElements)); in GetImageDimensions()
438 dst.move(0, SIMD::Int(mipLevels)); in EmitImageQueryLevels()
475 dst.move(0, SIMD::Int(sampleCount)); in EmitImageQuerySamples()
480 SIMD::Pointer SpirvShader::GetTexelAddress(EmitState const *state, SIMD::Pointer ptr, GenericValue … in GetTexelAddress()
487 SIMD::Int u = coordinate.Int(0); in GetTexelAddress()
488 SIMD::Int v = SIMD::Int(0); in GetTexelAddress()
501 auto rowPitch = SIMD::Int(*Pointer<Int>(descriptor + (useStencilAspect in GetTexelAddress()
504 auto slicePitch = SIMD::Int( in GetTexelAddress()
508 auto samplePitch = SIMD::Int( in GetTexelAddress()
513 ptr += u * SIMD::Int(texelSize); in GetTexelAddress()
530 ptr += SIMD::Int(routine->viewID) * slicePitch; in GetTexelAddress()
599 auto basePtr = SIMD::Pointer(imageBase, imageSizeInBytes); in EmitImageRead()
607 SIMD::Int packed[4]; in EmitImageRead()
613 …packed[i] = texelPtr.Load<SIMD::Int>(robustness, state->activeLaneMask(), false, std::memory_order… in EmitImageRead()
634 dst.move(1, SIMD::Int(0)); in EmitImageRead()
635 dst.move(2, SIMD::Int(0)); in EmitImageRead()
636 dst.move(3, SIMD::Int(1)); in EmitImageRead()
643 dst.move(1, SIMD::Float(0)); in EmitImageRead()
644 dst.move(2, SIMD::Float(0)); in EmitImageRead()
645 dst.move(3, SIMD::Float(1)); in EmitImageRead()
648 dst.move(0, SIMD::Float(packed[0] & SIMD::Int(0xffff)) * SIMD::Float(1.0f / 65535.0f)); in EmitImageRead()
649 dst.move(1, SIMD::Float(0)); in EmitImageRead()
650 dst.move(2, SIMD::Float(0)); in EmitImageRead()
651 dst.move(3, SIMD::Float(1)); in EmitImageRead()
660 dst.move(0, packed[0] & SIMD::Int(0xffff)); in EmitImageRead()
661 dst.move(1, (packed[0] >> 16) & SIMD::Int(0xffff)); in EmitImageRead()
662 dst.move(2, packed[1] & SIMD::Int(0xffff)); in EmitImageRead()
663 dst.move(3, (packed[1] >> 16) & SIMD::Int(0xffff)); in EmitImageRead()
666 dst.move(0, halfToFloatBits(As<SIMD::UInt>(packed[0]) & SIMD::UInt(0x0000FFFF))); in EmitImageRead()
667 dst.move(1, halfToFloatBits((As<SIMD::UInt>(packed[0]) & SIMD::UInt(0xFFFF0000)) >> 16)); in EmitImageRead()
668 dst.move(2, halfToFloatBits(As<SIMD::UInt>(packed[1]) & SIMD::UInt(0x0000FFFF))); in EmitImageRead()
669 dst.move(3, halfToFloatBits((As<SIMD::UInt>(packed[1]) & SIMD::UInt(0xFFFF0000)) >> 16)); in EmitImageRead()
672 …ove(0, Min(Max(SIMD::Float(((packed[0] << 24) & SIMD::Int(0xFF000000))) * SIMD::Float(1.0f / float… in EmitImageRead()
673 …ove(1, Min(Max(SIMD::Float(((packed[0] << 16) & SIMD::Int(0xFF000000))) * SIMD::Float(1.0f / float… in EmitImageRead()
674 …ove(2, Min(Max(SIMD::Float(((packed[0] << 8) & SIMD::Int(0xFF000000))) * SIMD::Float(1.0f / float(… in EmitImageRead()
675 …t.move(3, Min(Max(SIMD::Float(((packed[0]) & SIMD::Int(0xFF000000))) * SIMD::Float(1.0f / float(0x… in EmitImageRead()
679 dst.move(0, SIMD::Float((packed[0] & SIMD::Int(0xFF))) * SIMD::Float(1.0f / 255.f)); in EmitImageRead()
680 dst.move(1, SIMD::Float(((packed[0] >> 8) & SIMD::Int(0xFF))) * SIMD::Float(1.0f / 255.f)); in EmitImageRead()
681 dst.move(2, SIMD::Float(((packed[0] >> 16) & SIMD::Int(0xFF))) * SIMD::Float(1.0f / 255.f)); in EmitImageRead()
682 dst.move(3, SIMD::Float(((packed[0] >> 24) & SIMD::Int(0xFF))) * SIMD::Float(1.0f / 255.f)); in EmitImageRead()
686 …dst.move(0, ::sRGBtoLinear(SIMD::Float((packed[0] & SIMD::Int(0xFF))) * SIMD::Float(1.0f / 255.f))… in EmitImageRead()
687 …dst.move(1, ::sRGBtoLinear(SIMD::Float(((packed[0] >> 8) & SIMD::Int(0xFF))) * SIMD::Float(1.0f / … in EmitImageRead()
688 …dst.move(2, ::sRGBtoLinear(SIMD::Float(((packed[0] >> 16) & SIMD::Int(0xFF))) * SIMD::Float(1.0f /… in EmitImageRead()
689 dst.move(3, SIMD::Float(((packed[0] >> 24) & SIMD::Int(0xFF))) * SIMD::Float(1.0f / 255.f)); in EmitImageRead()
692 dst.move(0, SIMD::Float(((packed[0] >> 16) & SIMD::Int(0xFF))) * SIMD::Float(1.0f / 255.f)); in EmitImageRead()
693 dst.move(1, SIMD::Float(((packed[0] >> 8) & SIMD::Int(0xFF))) * SIMD::Float(1.0f / 255.f)); in EmitImageRead()
694 dst.move(2, SIMD::Float((packed[0] & SIMD::Int(0xFF))) * SIMD::Float(1.0f / 255.f)); in EmitImageRead()
695 dst.move(3, SIMD::Float(((packed[0] >> 24) & SIMD::Int(0xFF))) * SIMD::Float(1.0f / 255.f)); in EmitImageRead()
698 …dst.move(0, ::sRGBtoLinear(SIMD::Float(((packed[0] >> 16) & SIMD::Int(0xFF))) * SIMD::Float(1.0f /… in EmitImageRead()
699 …dst.move(1, ::sRGBtoLinear(SIMD::Float(((packed[0] >> 8) & SIMD::Int(0xFF))) * SIMD::Float(1.0f / … in EmitImageRead()
700 …dst.move(2, ::sRGBtoLinear(SIMD::Float((packed[0] & SIMD::Int(0xFF))) * SIMD::Float(1.0f / 255.f))… in EmitImageRead()
701 dst.move(3, SIMD::Float(((packed[0] >> 24) & SIMD::Int(0xFF))) * SIMD::Float(1.0f / 255.f)); in EmitImageRead()
705 dst.move(0, (As<SIMD::UInt>(packed[0]) & SIMD::UInt(0xFF))); in EmitImageRead()
706 dst.move(1, ((As<SIMD::UInt>(packed[0]) >> 8) & SIMD::UInt(0xFF))); in EmitImageRead()
707 dst.move(2, ((As<SIMD::UInt>(packed[0]) >> 16) & SIMD::UInt(0xFF))); in EmitImageRead()
708 dst.move(3, ((As<SIMD::UInt>(packed[0]) >> 24) & SIMD::UInt(0xFF))); in EmitImageRead()
718 dst.move(0, SIMD::Float((packed[0] & SIMD::Int(0xFF))) * SIMD::Float(1.0f / 255.f)); in EmitImageRead()
719 dst.move(1, SIMD::Float(0)); in EmitImageRead()
720 dst.move(2, SIMD::Float(0)); in EmitImageRead()
721 dst.move(3, SIMD::Float(1)); in EmitImageRead()
725 dst.move(0, (As<SIMD::UInt>(packed[0]) & SIMD::UInt(0xFF))); in EmitImageRead()
726 dst.move(1, SIMD::UInt(0)); in EmitImageRead()
727 dst.move(2, SIMD::UInt(0)); in EmitImageRead()
728 dst.move(3, SIMD::UInt(1)); in EmitImageRead()
732 dst.move(1, SIMD::Int(0)); in EmitImageRead()
733 dst.move(2, SIMD::Int(0)); in EmitImageRead()
734 dst.move(3, SIMD::Int(1)); in EmitImageRead()
737 dst.move(0, SIMD::Float((packed[0] & SIMD::Int(0xFF))) * SIMD::Float(1.0f / 255.f)); in EmitImageRead()
738 dst.move(1, SIMD::Float(((packed[0] >> 8) & SIMD::Int(0xFF))) * SIMD::Float(1.0f / 255.f)); in EmitImageRead()
739 dst.move(2, SIMD::Float(0)); in EmitImageRead()
740 dst.move(3, SIMD::Float(1)); in EmitImageRead()
743 dst.move(0, (As<SIMD::UInt>(packed[0]) & SIMD::UInt(0xFF))); in EmitImageRead()
744 dst.move(1, ((As<SIMD::UInt>(packed[0]) >> 8) & SIMD::UInt(0xFF))); in EmitImageRead()
745 dst.move(2, SIMD::UInt(0)); in EmitImageRead()
746 dst.move(3, SIMD::UInt(1)); in EmitImageRead()
751 dst.move(2, SIMD::Int(0)); in EmitImageRead()
752 dst.move(3, SIMD::Int(1)); in EmitImageRead()
755 dst.move(0, halfToFloatBits(As<SIMD::UInt>(packed[0]) & SIMD::UInt(0x0000FFFF))); in EmitImageRead()
756 dst.move(1, SIMD::Float(0)); in EmitImageRead()
757 dst.move(2, SIMD::Float(0)); in EmitImageRead()
758 dst.move(3, SIMD::Float(1)); in EmitImageRead()
761 dst.move(0, packed[0] & SIMD::Int(0xffff)); in EmitImageRead()
762 dst.move(1, SIMD::UInt(0)); in EmitImageRead()
763 dst.move(2, SIMD::UInt(0)); in EmitImageRead()
764 dst.move(3, SIMD::UInt(1)); in EmitImageRead()
768 dst.move(1, SIMD::Int(0)); in EmitImageRead()
769 dst.move(2, SIMD::Int(0)); in EmitImageRead()
770 dst.move(3, SIMD::Int(1)); in EmitImageRead()
773 dst.move(0, halfToFloatBits(As<SIMD::UInt>(packed[0]) & SIMD::UInt(0x0000FFFF))); in EmitImageRead()
774 dst.move(1, halfToFloatBits((As<SIMD::UInt>(packed[0]) & SIMD::UInt(0xFFFF0000)) >> 16)); in EmitImageRead()
775 dst.move(2, SIMD::Float(0)); in EmitImageRead()
776 dst.move(3, SIMD::Float(1)); in EmitImageRead()
779 dst.move(0, packed[0] & SIMD::Int(0xffff)); in EmitImageRead()
780 dst.move(1, (packed[0] >> 16) & SIMD::Int(0xffff)); in EmitImageRead()
781 dst.move(2, SIMD::UInt(0)); in EmitImageRead()
782 dst.move(3, SIMD::UInt(1)); in EmitImageRead()
787 dst.move(2, SIMD::Int(0)); in EmitImageRead()
788 dst.move(3, SIMD::Int(1)); in EmitImageRead()
794 dst.move(2, SIMD::Int(0)); in EmitImageRead()
795 dst.move(3, SIMD::Int(1)); in EmitImageRead()
800 dst.move(2, SIMD::Float(0)); in EmitImageRead()
801 dst.move(3, SIMD::Float(1)); in EmitImageRead()
804 dst.move(0, (packed[0]) & SIMD::Int(0x3FF)); in EmitImageRead()
805 dst.move(1, (packed[0] >> 10) & SIMD::Int(0x3FF)); in EmitImageRead()
806 dst.move(2, (packed[0] >> 20) & SIMD::Int(0x3FF)); in EmitImageRead()
807 dst.move(3, (packed[0] >> 30) & SIMD::Int(0x3)); in EmitImageRead()
810 dst.move(2, (packed[0]) & SIMD::Int(0x3FF)); in EmitImageRead()
811 dst.move(1, (packed[0] >> 10) & SIMD::Int(0x3FF)); in EmitImageRead()
812 dst.move(0, (packed[0] >> 20) & SIMD::Int(0x3FF)); in EmitImageRead()
813 dst.move(3, (packed[0] >> 30) & SIMD::Int(0x3)); in EmitImageRead()
816 dst.move(0, SIMD::Float((packed[0]) & SIMD::Int(0x3FF)) * SIMD::Float(1.0f / 0x3FF)); in EmitImageRead()
817 dst.move(1, SIMD::Float((packed[0] >> 10) & SIMD::Int(0x3FF)) * SIMD::Float(1.0f / 0x3FF)); in EmitImageRead()
818 dst.move(2, SIMD::Float((packed[0] >> 20) & SIMD::Int(0x3FF)) * SIMD::Float(1.0f / 0x3FF)); in EmitImageRead()
819 dst.move(3, SIMD::Float((packed[0] >> 30) & SIMD::Int(0x3)) * SIMD::Float(1.0f / 0x3)); in EmitImageRead()
822 dst.move(2, SIMD::Float((packed[0]) & SIMD::Int(0x3FF)) * SIMD::Float(1.0f / 0x3FF)); in EmitImageRead()
823 dst.move(1, SIMD::Float((packed[0] >> 10) & SIMD::Int(0x3FF)) * SIMD::Float(1.0f / 0x3FF)); in EmitImageRead()
824 dst.move(0, SIMD::Float((packed[0] >> 20) & SIMD::Int(0x3FF)) * SIMD::Float(1.0f / 0x3FF)); in EmitImageRead()
825 dst.move(3, SIMD::Float((packed[0] >> 30) & SIMD::Int(0x3)) * SIMD::Float(1.0f / 0x3)); in EmitImageRead()
828 dst.move(0, SIMD::Float((packed[0] >> 11) & SIMD::Int(0x1F)) * SIMD::Float(1.0f / 0x1F)); in EmitImageRead()
829 dst.move(1, SIMD::Float((packed[0] >> 5) & SIMD::Int(0x3F)) * SIMD::Float(1.0f / 0x3F)); in EmitImageRead()
830 dst.move(2, SIMD::Float((packed[0]) & SIMD::Int(0x1F)) * SIMD::Float(1.0f / 0x1F)); in EmitImageRead()
831 dst.move(3, SIMD::Float(1)); in EmitImageRead()
834 dst.move(0, SIMD::Float((packed[0] >> 10) & SIMD::Int(0x1F)) * SIMD::Float(1.0f / 0x1F)); in EmitImageRead()
835 dst.move(1, SIMD::Float((packed[0] >> 5) & SIMD::Int(0x1F)) * SIMD::Float(1.0f / 0x1F)); in EmitImageRead()
836 dst.move(2, SIMD::Float((packed[0]) & SIMD::Int(0x1F)) * SIMD::Float(1.0f / 0x1F)); in EmitImageRead()
837 dst.move(3, SIMD::Float((packed[0] >> 15) & SIMD::Int(0x1))); in EmitImageRead()
865 SIMD::Int packed[4]; in EmitImageWrite()
890 …packed[0] = (SIMD::UInt(Round(Min(Max(texel.Float(0), SIMD::Float(0.0f)), SIMD::Float(1.0f)) * SIM… in EmitImageWrite()
891 …((SIMD::UInt(Round(Min(Max(texel.Float(1), SIMD::Float(0.0f)), SIMD::Float(1.0f)) * SIMD::Float(25… in EmitImageWrite()
892 …((SIMD::UInt(Round(Min(Max(texel.Float(2), SIMD::Float(0.0f)), SIMD::Float(1.0f)) * SIMD::Float(25… in EmitImageWrite()
893 …((SIMD::UInt(Round(Min(Max(texel.Float(3), SIMD::Float(0.0f)), SIMD::Float(1.0f)) * SIMD::Float(25… in EmitImageWrite()
898 …packed[0] = (SIMD::Int(Round(Min(Max(texel.Float(0), SIMD::Float(-1.0f)), SIMD::Float(1.0f)) * SIM… in EmitImageWrite()
899 SIMD::Int(0xFF)) | in EmitImageWrite()
900 …((SIMD::Int(Round(Min(Max(texel.Float(1), SIMD::Float(-1.0f)), SIMD::Float(1.0f)) * SIMD::Float(12… in EmitImageWrite()
901 SIMD::Int(0xFF)) in EmitImageWrite()
903 …((SIMD::Int(Round(Min(Max(texel.Float(2), SIMD::Float(-1.0f)), SIMD::Float(1.0f)) * SIMD::Float(12… in EmitImageWrite()
904 SIMD::Int(0xFF)) in EmitImageWrite()
906 …((SIMD::Int(Round(Min(Max(texel.Float(3), SIMD::Float(-1.0f)), SIMD::Float(1.0f)) * SIMD::Float(12… in EmitImageWrite()
907 SIMD::Int(0xFF)) in EmitImageWrite()
914 packed[0] = (SIMD::UInt(texel.UInt(0) & SIMD::UInt(0xff))) | in EmitImageWrite()
915 (SIMD::UInt(texel.UInt(1) & SIMD::UInt(0xff)) << 8) | in EmitImageWrite()
916 (SIMD::UInt(texel.UInt(2) & SIMD::UInt(0xff)) << 16) | in EmitImageWrite()
917 (SIMD::UInt(texel.UInt(3) & SIMD::UInt(0xff)) << 24); in EmitImageWrite()
929 …packed[0] = SIMD::UInt(texel.UInt(0) & SIMD::UInt(0xffff)) | (SIMD::UInt(texel.UInt(1) & SIMD::UIn… in EmitImageWrite()
930 …packed[1] = SIMD::UInt(texel.UInt(2) & SIMD::UInt(0xffff)) | (SIMD::UInt(texel.UInt(3) & SIMD::UIn… in EmitImageWrite()
949 …packed[0] = SIMD::UInt(texel.UInt(0) & SIMD::UInt(0xffff)) | (SIMD::UInt(texel.UInt(1) & SIMD::UIn… in EmitImageWrite()
981 auto basePtr = SIMD::Pointer(imageBase, imageSizeInBytes); in EmitImageWrite()
1016 auto basePtr = SIMD::Pointer(imageBase, imageSizeInBytes); in EmitImageTexelPointer()