Lines Matching refs:Int
81 sw::SIMD::Int linear = CmpLT(c, sw::SIMD::Float(0.04045f)); in sRGBtoLinear()
83 …urn rr::As<sw::SIMD::Float>((linear & rr::As<sw::SIMD::Int>(lc)) | (~linear & rr::As<sw::SIMD::Int… in sRGBtoLinear()
304 in[i] = As<SIMD::Float>(SIMD::Int(0)); in EmitImageSampleUnconditional()
315 in[i] = As<SIMD::Float>(offsetValue.Int(j)); // Integer values, but transfered as float. in EmitImageSampleUnconditional()
322 in[i] = As<SIMD::Float>(sampleValue.Int(0)); in EmitImageSampleUnconditional()
384 Int width; in GetImageDimensions()
385 Int height; in GetImageDimensions()
386 Int depth; in GetImageDimensions()
392 width = *Pointer<Int>(descriptor + OFFSET(vk::StorageImageDescriptor, width)); in GetImageDimensions()
393 height = *Pointer<Int>(descriptor + OFFSET(vk::StorageImageDescriptor, height)); in GetImageDimensions()
394 depth = *Pointer<Int>(descriptor + OFFSET(vk::StorageImageDescriptor, depth)); in GetImageDimensions()
399 width = *Pointer<Int>(descriptor + OFFSET(vk::SampledImageDescriptor, width)); in GetImageDimensions()
400 height = *Pointer<Int>(descriptor + OFFSET(vk::SampledImageDescriptor, height)); in GetImageDimensions()
401 depth = *Pointer<Int>(descriptor + OFFSET(vk::SampledImageDescriptor, depth)); in GetImageDimensions()
411 auto lod = lodVal.Int(0); in GetImageDimensions()
412 auto one = SIMD::Int(1); in GetImageDimensions()
414 if(dimensions >= 1) dst.move(0, Max(SIMD::Int(width) >> lod, one)); in GetImageDimensions()
415 if(dimensions >= 2) dst.move(1, Max(SIMD::Int(height) >> lod, one)); in GetImageDimensions()
416 if(dimensions >= 3) dst.move(2, Max(SIMD::Int(depth) >> lod, one)); in GetImageDimensions()
421 if(dimensions >= 1) dst.move(0, SIMD::Int(width)); in GetImageDimensions()
422 if(dimensions >= 2) dst.move(1, SIMD::Int(height)); in GetImageDimensions()
423 if(dimensions >= 3) dst.move(2, SIMD::Int(depth)); in GetImageDimensions()
428 dst.move(dimensions, SIMD::Int(depth)); in GetImageDimensions()
442 Int mipLevels = 0; in EmitImageQueryLevels()
448 …mipLevels = *Pointer<Int>(descriptor + OFFSET(vk::SampledImageDescriptor, mipLevels)); // uint32_t in EmitImageQueryLevels()
455 dst.move(0, SIMD::Int(mipLevels)); in EmitImageQueryLevels()
474 Int sampleCount = 0; in EmitImageQuerySamples()
478 …sampleCount = *Pointer<Int>(descriptor + OFFSET(vk::StorageImageDescriptor, sampleCount)); // uin… in EmitImageQuerySamples()
483 …sampleCount = *Pointer<Int>(descriptor + OFFSET(vk::SampledImageDescriptor, sampleCount)); // uin… in EmitImageQuerySamples()
490 dst.move(0, SIMD::Int(sampleCount)); in EmitImageQuerySamples()
495 SIMD::Pointer SpirvShader::GetTexelAddress(EmitState const *state, Pointer<Byte> imageBase, Int ima… in GetTexelAddress()
502 SIMD::Int u = coordinate.Int(0); in GetTexelAddress()
503 SIMD::Int v = SIMD::Int(0); in GetTexelAddress()
507 v = coordinate.Int(1); in GetTexelAddress()
516 auto rowPitch = SIMD::Int(*Pointer<Int>(descriptor + (useStencilAspect in GetTexelAddress()
519 auto slicePitch = SIMD::Int( in GetTexelAddress()
520 *Pointer<Int>(descriptor + (useStencilAspect in GetTexelAddress()
523 auto samplePitch = SIMD::Int( in GetTexelAddress()
524 *Pointer<Int>(descriptor + (useStencilAspect in GetTexelAddress()
528 SIMD::Int ptrOffset = u * SIMD::Int(texelSize); in GetTexelAddress()
535 SIMD::Int w = 0; in GetTexelAddress()
540 w += coordinate.Int(2); in GetTexelAddress()
545 w += coordinate.Int(dims); in GetTexelAddress()
554 ptrOffset += SIMD::Int(routine->viewID) * slicePitch; in GetTexelAddress()
557 SIMD::Int n = 0; in GetTexelAddress()
563 n = sample.Int(0); in GetTexelAddress()
573 SIMD::Int oobMask = As<SIMD::Int>(CmpNLT(As<SIMD::UInt>(u), width)); in GetTexelAddress()
578 oobMask |= As<SIMD::Int>(CmpNLT(As<SIMD::UInt>(v), height)); in GetTexelAddress()
585 oobMask |= As<SIMD::Int>(CmpNLT(As<SIMD::UInt>(w), SIMD::UInt(depth))); in GetTexelAddress()
594 oobMask |= As<SIMD::Int>(CmpNLT(As<SIMD::UInt>(n), sampleCount)); in GetTexelAddress()
601 …ptrOffset = (ptrOffset & ~oobMask) | (oobMask & SIMD::Int(OOB_OFFSET)); // oob ? OOB_OFFSET : ptr… in GetTexelAddress()
670 auto imageSizeInBytes = *Pointer<Int>(binding + OFFSET(vk::StorageImageDescriptor, sizeInBytes)); in EmitImageRead()
683 SIMD::Int packed[4]; in EmitImageRead()
688 packed[i] = texelPtr.Load<SIMD::Int>(robustness, state->activeLaneMask()); in EmitImageRead()
694 SIMD::Int offsets = texelPtr.offsets(); in EmitImageRead()
695 SIMD::Int mask = state->activeLaneMask() & texelPtr.isInBounds(2, robustness); in EmitImageRead()
701 packed[0] = Insert(packed[0], Int(*Pointer<Short>(texelPtr.base + Extract(offsets, i))), i); in EmitImageRead()
707 SIMD::Int offsets = texelPtr.offsets(); in EmitImageRead()
708 SIMD::Int mask = state->activeLaneMask() & texelPtr.isInBounds(1, robustness); in EmitImageRead()
714 packed[0] = Insert(packed[0], Int(*Pointer<Byte>(texelPtr.base + Extract(offsets, i))), i); in EmitImageRead()
738 dst.move(1, SIMD::Int(0)); in EmitImageRead()
739 dst.move(2, SIMD::Int(0)); in EmitImageRead()
740 dst.move(3, SIMD::Int(1)); in EmitImageRead()
752 dst.move(0, SIMD::Float(packed[0] & SIMD::Int(0xFFFF)) * SIMD::Float(1.0f / 0xFFFF)); in EmitImageRead()
758 dst.move(0, SIMD::Float(packed[0] & SIMD::Int(0xFFFF)) * SIMD::Float(1.0f / 0xFFFF)); in EmitImageRead()
759 dst.move(1, SIMD::Float((packed[0] >> 16) & SIMD::Int(0xFFFF)) * SIMD::Float(1.0f / 0xFFFF)); in EmitImageRead()
760 dst.move(2, SIMD::Float(packed[1] & SIMD::Int(0xFFFF)) * SIMD::Float(1.0f / 0xFFFF)); in EmitImageRead()
761 dst.move(3, SIMD::Float((packed[1] >> 16) & SIMD::Int(0xFFFF)) * SIMD::Float(1.0f / 0xFFFF)); in EmitImageRead()
764 …dst.move(0, Max(SIMD::Float((packed[0] << 16) & SIMD::Int(0xFFFF0000)) * SIMD::Float(1.0f / 0x7FFF… in EmitImageRead()
765 …dst.move(1, Max(SIMD::Float(packed[0] & SIMD::Int(0xFFFF0000)) * SIMD::Float(1.0f / 0x7FFF0000), S… in EmitImageRead()
766 …dst.move(2, Max(SIMD::Float((packed[1] << 16) & SIMD::Int(0xFFFF0000)) * SIMD::Float(1.0f / 0x7FFF… in EmitImageRead()
767 …dst.move(3, Max(SIMD::Float(packed[1] & SIMD::Int(0xFFFF0000)) * SIMD::Float(1.0f / 0x7FFF0000), S… in EmitImageRead()
776 dst.move(0, packed[0] & SIMD::Int(0xFFFF)); in EmitImageRead()
777 dst.move(1, (packed[0] >> 16) & SIMD::Int(0xFFFF)); in EmitImageRead()
778 dst.move(2, packed[1] & SIMD::Int(0xFFFF)); in EmitImageRead()
779 dst.move(3, (packed[1] >> 16) & SIMD::Int(0xFFFF)); in EmitImageRead()
789 …dst.move(0, Max(SIMD::Float((packed[0] << 24) & SIMD::Int(0xFF000000)) * SIMD::Float(1.0f / 0x7F00… in EmitImageRead()
790 …dst.move(1, Max(SIMD::Float((packed[0] << 16) & SIMD::Int(0xFF000000)) * SIMD::Float(1.0f / 0x7F00… in EmitImageRead()
791 …dst.move(2, Max(SIMD::Float((packed[0] << 8) & SIMD::Int(0xFF000000)) * SIMD::Float(1.0f / 0x7F000… in EmitImageRead()
792 …dst.move(3, Max(SIMD::Float((packed[0]) & SIMD::Int(0xFF000000)) * SIMD::Float(1.0f / 0x7F000000),… in EmitImageRead()
796 dst.move(0, SIMD::Float(packed[0] & SIMD::Int(0xFF)) * SIMD::Float(1.0f / 0xFF)); in EmitImageRead()
797 dst.move(1, SIMD::Float((packed[0] >> 8) & SIMD::Int(0xFF)) * SIMD::Float(1.0f / 0xFF)); in EmitImageRead()
798 dst.move(2, SIMD::Float((packed[0] >> 16) & SIMD::Int(0xFF)) * SIMD::Float(1.0f / 0xFF)); in EmitImageRead()
799 dst.move(3, SIMD::Float((packed[0] >> 24) & SIMD::Int(0xFF)) * SIMD::Float(1.0f / 0xFF)); in EmitImageRead()
803 dst.move(0, ::sRGBtoLinear(SIMD::Float(packed[0] & SIMD::Int(0xFF)) * SIMD::Float(1.0f / 0xFF))); in EmitImageRead()
804 …dst.move(1, ::sRGBtoLinear(SIMD::Float((packed[0] >> 8) & SIMD::Int(0xFF)) * SIMD::Float(1.0f / 0x… in EmitImageRead()
805 …dst.move(2, ::sRGBtoLinear(SIMD::Float((packed[0] >> 16) & SIMD::Int(0xFF)) * SIMD::Float(1.0f / 0… in EmitImageRead()
806 dst.move(3, SIMD::Float((packed[0] >> 24) & SIMD::Int(0xFF)) * SIMD::Float(1.0f / 0xFF)); in EmitImageRead()
809 dst.move(0, SIMD::Float((packed[0] >> 16) & SIMD::Int(0xFF)) * SIMD::Float(1.0f / 0xFF)); in EmitImageRead()
810 dst.move(1, SIMD::Float((packed[0] >> 8) & SIMD::Int(0xFF)) * SIMD::Float(1.0f / 0xFF)); in EmitImageRead()
811 dst.move(2, SIMD::Float(packed[0] & SIMD::Int(0xFF)) * SIMD::Float(1.0f / 0xFF)); in EmitImageRead()
812 dst.move(3, SIMD::Float((packed[0] >> 24) & SIMD::Int(0xFF)) * SIMD::Float(1.0f / 0xFF)); in EmitImageRead()
815 …dst.move(0, ::sRGBtoLinear(SIMD::Float((packed[0] >> 16) & SIMD::Int(0xFF)) * SIMD::Float(1.0f / 0… in EmitImageRead()
816 …dst.move(1, ::sRGBtoLinear(SIMD::Float((packed[0] >> 8) & SIMD::Int(0xFF)) * SIMD::Float(1.0f / 0x… in EmitImageRead()
817 dst.move(2, ::sRGBtoLinear(SIMD::Float(packed[0] & SIMD::Int(0xFF)) * SIMD::Float(1.0f / 0xFF))); in EmitImageRead()
818 dst.move(3, SIMD::Float((packed[0] >> 24) & SIMD::Int(0xFF)) * SIMD::Float(1.0f / 0xFF)); in EmitImageRead()
835 dst.move(0, SIMD::Float((packed[0] & SIMD::Int(0xFF))) * SIMD::Float(1.0f / 0xFF)); in EmitImageRead()
841 …dst.move(0, Max(SIMD::Float((packed[0] << 24) & SIMD::Int(0xFF000000)) * SIMD::Float(1.0f / 0x7F00… in EmitImageRead()
855 dst.move(1, SIMD::Int(0)); in EmitImageRead()
856 dst.move(2, SIMD::Int(0)); in EmitImageRead()
857 dst.move(3, SIMD::Int(1)); in EmitImageRead()
860 dst.move(0, SIMD::Float(packed[0] & SIMD::Int(0xFF)) * SIMD::Float(1.0f / 0xFF)); in EmitImageRead()
861 dst.move(1, SIMD::Float((packed[0] >> 8) & SIMD::Int(0xFF)) * SIMD::Float(1.0f / 0xFF)); in EmitImageRead()
866 …dst.move(0, Max(SIMD::Float((packed[0] << 24) & SIMD::Int(0xFF000000)) * SIMD::Float(1.0f / 0x7F00… in EmitImageRead()
867 …dst.move(1, Max(SIMD::Float((packed[0] << 16) & SIMD::Int(0xFF000000)) * SIMD::Float(1.0f / 0x7F00… in EmitImageRead()
880 dst.move(2, SIMD::Int(0)); in EmitImageRead()
881 dst.move(3, SIMD::Int(1)); in EmitImageRead()
890 dst.move(0, SIMD::Float(packed[0] & SIMD::Int(0xFFFF)) * SIMD::Float(1.0f / 0xFFFF)); in EmitImageRead()
896 …dst.move(0, Max(SIMD::Float((packed[0] << 16) & SIMD::Int(0xFFFF0000)) * SIMD::Float(1.0f / 0x7FFF… in EmitImageRead()
902 dst.move(0, packed[0] & SIMD::Int(0xFFFF)); in EmitImageRead()
909 dst.move(1, SIMD::Int(0)); in EmitImageRead()
910 dst.move(2, SIMD::Int(0)); in EmitImageRead()
911 dst.move(3, SIMD::Int(1)); in EmitImageRead()
920 dst.move(0, SIMD::Float(packed[0] & SIMD::Int(0xFFFF)) * SIMD::Float(1.0f / 0xFFFF)); in EmitImageRead()
926 …dst.move(0, Max(SIMD::Float((packed[0] << 16) & SIMD::Int(0xFFFF0000)) * SIMD::Float(1.0f / 0x7FFF… in EmitImageRead()
927 …dst.move(1, Max(SIMD::Float(packed[0] & SIMD::Int(0xFFFF0000)) * SIMD::Float(1.0f / 0x7FFF0000), S… in EmitImageRead()
932 dst.move(0, packed[0] & SIMD::Int(0xFFFF)); in EmitImageRead()
933 dst.move(1, (packed[0] >> 16) & SIMD::Int(0xFFFF)); in EmitImageRead()
940 dst.move(2, SIMD::Int(0)); in EmitImageRead()
941 dst.move(3, SIMD::Int(1)); in EmitImageRead()
947 dst.move(2, SIMD::Int(0)); in EmitImageRead()
948 dst.move(3, SIMD::Int(1)); in EmitImageRead()
957 dst.move(0, packed[0] & SIMD::Int(0x3FF)); in EmitImageRead()
958 dst.move(1, (packed[0] >> 10) & SIMD::Int(0x3FF)); in EmitImageRead()
959 dst.move(2, (packed[0] >> 20) & SIMD::Int(0x3FF)); in EmitImageRead()
960 dst.move(3, (packed[0] >> 30) & SIMD::Int(0x3)); in EmitImageRead()
963 dst.move(2, packed[0] & SIMD::Int(0x3FF)); in EmitImageRead()
964 dst.move(1, (packed[0] >> 10) & SIMD::Int(0x3FF)); in EmitImageRead()
965 dst.move(0, (packed[0] >> 20) & SIMD::Int(0x3FF)); in EmitImageRead()
966 dst.move(3, (packed[0] >> 30) & SIMD::Int(0x3)); in EmitImageRead()
969 dst.move(0, SIMD::Float((packed[0]) & SIMD::Int(0x3FF)) * SIMD::Float(1.0f / 0x3FF)); in EmitImageRead()
970 dst.move(1, SIMD::Float((packed[0] >> 10) & SIMD::Int(0x3FF)) * SIMD::Float(1.0f / 0x3FF)); in EmitImageRead()
971 dst.move(2, SIMD::Float((packed[0] >> 20) & SIMD::Int(0x3FF)) * SIMD::Float(1.0f / 0x3FF)); in EmitImageRead()
972 dst.move(3, SIMD::Float((packed[0] >> 30) & SIMD::Int(0x3)) * SIMD::Float(1.0f / 0x3)); in EmitImageRead()
975 dst.move(2, SIMD::Float((packed[0]) & SIMD::Int(0x3FF)) * SIMD::Float(1.0f / 0x3FF)); in EmitImageRead()
976 dst.move(1, SIMD::Float((packed[0] >> 10) & SIMD::Int(0x3FF)) * SIMD::Float(1.0f / 0x3FF)); in EmitImageRead()
977 dst.move(0, SIMD::Float((packed[0] >> 20) & SIMD::Int(0x3FF)) * SIMD::Float(1.0f / 0x3FF)); in EmitImageRead()
978 dst.move(3, SIMD::Float((packed[0] >> 30) & SIMD::Int(0x3)) * SIMD::Float(1.0f / 0x3)); in EmitImageRead()
981 dst.move(0, SIMD::Float((packed[0] >> 11) & SIMD::Int(0x1F)) * SIMD::Float(1.0f / 0x1F)); in EmitImageRead()
982 dst.move(1, SIMD::Float((packed[0] >> 5) & SIMD::Int(0x3F)) * SIMD::Float(1.0f / 0x3F)); in EmitImageRead()
983 dst.move(2, SIMD::Float((packed[0]) & SIMD::Int(0x1F)) * SIMD::Float(1.0f / 0x1F)); in EmitImageRead()
987 dst.move(0, SIMD::Float((packed[0] >> 10) & SIMD::Int(0x1F)) * SIMD::Float(1.0f / 0x1F)); in EmitImageRead()
988 dst.move(1, SIMD::Float((packed[0] >> 5) & SIMD::Int(0x1F)) * SIMD::Float(1.0f / 0x1F)); in EmitImageRead()
989 dst.move(2, SIMD::Float((packed[0]) & SIMD::Int(0x1F)) * SIMD::Float(1.0f / 0x1F)); in EmitImageRead()
990 dst.move(3, SIMD::Float((packed[0] >> 15) & SIMD::Int(0x1))); in EmitImageRead()
993 dst.move(0, halfToFloatBits((packed[0] << 4) & SIMD::Int(0x7FF0))); in EmitImageRead()
994 dst.move(1, halfToFloatBits((packed[0] >> 7) & SIMD::Int(0x7FF0))); in EmitImageRead()
995 dst.move(2, halfToFloatBits((packed[0] >> 17) & SIMD::Int(0x7FE0))); in EmitImageRead()
1049 auto imageSizeInBytes = *Pointer<Int>(binding + OFFSET(vk::StorageImageDescriptor, sizeInBytes)); in EmitImageWrite()
1051 SIMD::Int packed[4]; in EmitImageWrite()
1060 packed[0] = texel.Int(0); in EmitImageWrite()
1061 packed[1] = texel.Int(1); in EmitImageWrite()
1062 packed[2] = texel.Int(2); in EmitImageWrite()
1063 packed[3] = texel.Int(3); in EmitImageWrite()
1069 packed[0] = texel.Int(0); in EmitImageWrite()
1080 …packed[0] = (SIMD::Int(Round(Min(Max(texel.Float(0), SIMD::Float(-1.0f)), SIMD::Float(1.0f)) * SIM… in EmitImageWrite()
1081 SIMD::Int(0xFF)) | in EmitImageWrite()
1082 …((SIMD::Int(Round(Min(Max(texel.Float(1), SIMD::Float(-1.0f)), SIMD::Float(1.0f)) * SIMD::Float(12… in EmitImageWrite()
1083 SIMD::Int(0xFF)) in EmitImageWrite()
1085 …((SIMD::Int(Round(Min(Max(texel.Float(2), SIMD::Float(-1.0f)), SIMD::Float(1.0f)) * SIMD::Float(12… in EmitImageWrite()
1086 SIMD::Int(0xFF)) in EmitImageWrite()
1088 …((SIMD::Int(Round(Min(Max(texel.Float(3), SIMD::Float(-1.0f)), SIMD::Float(1.0f)) * SIMD::Float(12… in EmitImageWrite()
1089 SIMD::Int(0xFF)) in EmitImageWrite()
1115 packed[0] = texel.Int(0); in EmitImageWrite()
1116 packed[1] = texel.Int(1); in EmitImageWrite()
1172 …packed[0] = (SIMD::Int(Round(Min(Max(texel.Float(0), SIMD::Float(-1.0f)), SIMD::Float(1.0f)) * SIM… in EmitImageWrite()
1173 …(SIMD::Int(Round(Min(Max(texel.Float(1), SIMD::Float(-1.0f)), SIMD::Float(1.0f)) * SIMD::Float(0x7… in EmitImageWrite()
1174 …packed[1] = (SIMD::Int(Round(Min(Max(texel.Float(2), SIMD::Float(-1.0f)), SIMD::Float(1.0f)) * SIM… in EmitImageWrite()
1175 …(SIMD::Int(Round(Min(Max(texel.Float(3), SIMD::Float(-1.0f)), SIMD::Float(1.0f)) * SIMD::Float(0x7… in EmitImageWrite()
1179 …packed[0] = (SIMD::Int(Round(Min(Max(texel.Float(0), SIMD::Float(-1.0f)), SIMD::Float(1.0f)) * SIM… in EmitImageWrite()
1180 …(SIMD::Int(Round(Min(Max(texel.Float(1), SIMD::Float(-1.0f)), SIMD::Float(1.0f)) * SIMD::Float(0x7… in EmitImageWrite()
1184 …packed[0] = (SIMD::Int(Round(Min(Max(texel.Float(0), SIMD::Float(-1.0f)), SIMD::Float(1.0f)) * SIM… in EmitImageWrite()
1185 …(SIMD::Int(Round(Min(Max(texel.Float(1), SIMD::Float(-1.0f)), SIMD::Float(1.0f)) * SIMD::Float(0x7… in EmitImageWrite()
1189 …packed[0] = SIMD::Int(Round(Min(Max(texel.Float(0), SIMD::Float(-1.0f)), SIMD::Float(1.0f)) * SIMD… in EmitImageWrite()
1193 …packed[0] = SIMD::Int(Round(Min(Max(texel.Float(0), SIMD::Float(-1.0f)), SIMD::Float(1.0f)) * SIMD… in EmitImageWrite()
1241 SIMD::Int offsets = texelPtr.offsets(); in EmitImageWrite()
1242 SIMD::Int mask = state->activeLaneMask() & texelPtr.isInBounds(2, robustness); in EmitImageWrite()
1254 SIMD::Int offsets = texelPtr.offsets(); in EmitImageWrite()
1255 SIMD::Int mask = state->activeLaneMask() & texelPtr.isInBounds(1, robustness); in EmitImageWrite()
1290 auto imageSizeInBytes = *Pointer<Int>(binding + OFFSET(vk::StorageImageDescriptor, sizeInBytes)); in EmitImageTexelPointer()