Lines Matching refs:Int4
29 …at4 &dRef, Float &&lodOrBias, Float4 &dsx, Float4 &dsy, Vector4i &offset, Int4 &sample, SamplerFun… in sampleTexture()
53 Int4 face = cubeFace(u, v, uvwa[0], uvwa[1], uvwa[2], M); in sampleTexture()
295 c.x = c.y = c.z = c.w = integer ? As<Float4>(Int4(1)) : RValue<Float4>(Float4(1.0f)); in sampleTexture()
315 return Float4(As<Float4>(sw::Int4(1, 1, 1, 1))); in applySwizzle()
362 …Float4 &u, Float4 &v, Float4 &w, const Float4 &a, Vector4i &offset, const Int4 &sample, Float &lod… in sampleFilter()
431 …Float4 &u, Float4 &v, Float4 &w, const Float4 &a, Vector4i &offset, const Int4 &sample, Float &lod… in sampleAniso()
515 …Float4 &u, Float4 &v, Float4 &w, const Float4 &a, Vector4i &offset, const Int4 &sample, Float &lod… in sampleQuad()
527 …Float4 &u, Float4 &v, Float4 &w, const Float4 &a, Vector4i &offset, const Int4 &sample, Float &lod… in sampleQuad2D()
562 UShort4 f0u = As<UShort4>(uuuu0) * UShort4(*Pointer<Int4>(mipmap + OFFSET(Mipmap, width))); in sampleQuad2D()
563 UShort4 f0v = As<UShort4>(vvvv0) * UShort4(*Pointer<Int4>(mipmap + OFFSET(Mipmap, height))); in sampleQuad2D()
730 …te> &texture, Float4 &u_, Float4 &v_, Float4 &w_, Vector4i &offset, const Int4 &sample, Float &lod… in sample3D()
770 UShort4 f0u = As<UShort4>(u[0][0][0]) * UShort4(*Pointer<Int4>(mipmap + OFFSET(Mipmap, width))); in sample3D()
771 UShort4 f0v = As<UShort4>(v[0][0][0]) * UShort4(*Pointer<Int4>(mipmap + OFFSET(Mipmap, height))); in sample3D()
772 UShort4 f0s = As<UShort4>(s[0][0][0]) * UShort4(*Pointer<Int4>(mipmap + OFFSET(Mipmap, depth))); in sample3D()
879 …at4 &v, Float4 &w, const Float4 &a, Float4 &dRef, Vector4i &offset, const Int4 &sample, Float &lod… in sampleFloatFilter()
903 …at4 &v, Float4 &w, const Float4 &a, Float4 &dRef, Vector4i &offset, const Int4 &sample, Float &lod… in sampleFloatAniso()
961 …at4 &v, Float4 &w, const Float4 &a, Float4 &dRef, Vector4i &offset, const Int4 &sample, Float &lod… in sampleFloat()
973 …at4 &v, Float4 &w, const Float4 &a, Float4 &dRef, Vector4i &offset, const Int4 &sample, Float &lod… in sampleFloat2D()
984 Int4 x0, x1, y0, y1; in sampleFloat2D()
986 Int4 filter = computeFilterOffset(lod); in sampleFloat2D()
990 Int4 pitchP = *Pointer<Int4>(mipmap + OFFSET(Mipmap, pitchP), 16); in sampleFloat2D()
993 Int4 z; in sampleFloat2D()
996 Int4 face = As<Int4>(w); in sampleFloat2D()
997 Int4 layerIndex = computeLayerIndex(a, mipmap, function); in sampleFloat2D()
1002 layerIndex *= Int4(6); in sampleFloat2D()
1012 z *= *Pointer<Int4>(mipmap + OFFSET(Mipmap, sliceP), 16); in sampleFloat2D()
1067 …e, Float4 &u, Float4 &v, Float4 &w, Float4 &dRef, Vector4i &offset, const Int4 &sample, Float &lod… in sampleFloat3D()
1077 Int4 x0, x1, y0, y1, z0, z1; in sampleFloat3D()
1079 Int4 filter = computeFilterOffset(lod); in sampleFloat3D()
1084 Int4 pitchP = *Pointer<Int4>(mipmap + OFFSET(Mipmap, pitchP), 16); in sampleFloat3D()
1085 Int4 sliceP = *Pointer<Int4>(mipmap + OFFSET(Mipmap, sliceP), 16); in sampleFloat3D()
1225 Int4 mask = As<Int4>(CmpNLT(dUV2.x, dUV2.y)); in computeLod2D()
1226 uDelta = As<Float4>((As<Int4>(dudx) & mask) | ((As<Int4>(dudy) & ~mask))); in computeLod2D()
1227 vDelta = As<Float4>((As<Int4>(dvdx) & mask) | ((As<Int4>(dvdy) & ~mask))); in computeLod2D()
1313 Int4 SamplerCore::cubeFace(Float4 &U, Float4 &V, Float4 &x, Float4 &y, Float4 &z, Float4 &M) in cubeFace()
1318 Int4 xn = CmpLT(x, Float4(0.0f)); // x < 0 in cubeFace()
1319 Int4 yn = CmpLT(y, Float4(0.0f)); // y < 0 in cubeFace()
1320 Int4 zn = CmpLT(z, Float4(0.0f)); // z < 0 in cubeFace()
1326 Int4 xy = CmpNLE(absX, absY); // abs(x) > abs(y) in cubeFace()
1327 Int4 yz = CmpNLE(absY, absZ); // abs(y) > abs(z) in cubeFace()
1328 Int4 zx = CmpNLE(absZ, absX); // abs(z) > abs(x) in cubeFace()
1329 Int4 xMajor = xy & ~zx; // abs(x) > abs(y) && abs(x) > abs(z) in cubeFace()
1330 Int4 yMajor = yz & ~xy; // abs(y) > abs(z) && abs(y) > abs(x) in cubeFace()
1331 Int4 zMajor = zx & ~yz; // abs(z) > abs(x) && abs(z) > abs(y) in cubeFace()
1343 Int4 n = ((xn & xMajor) | (yn & yMajor) | (zn & zMajor)) & Int4(0x80000000); in cubeFace()
1350 Int4 face; in cubeFace()
1359 U = As<Float4>((xMajor & (n ^ As<Int4>(-z))) | (~xMajor & ((zMajor & n) ^ As<Int4>(x)))); in cubeFace()
1362 V = As<Float4>((~yMajor & As<Int4>(-y)) | (yMajor & (n ^ As<Int4>(z)))); in cubeFace()
1371 Short4 SamplerCore::applyOffset(Short4 &uvw, Int4 &offset, const Int4 &whd, AddressingMode mode) in applyOffset()
1373 Int4 tmp = Int4(As<UShort4>(uvw)); in applyOffset()
1379 tmp = (tmp + whd * Int4(-MIN_TEXEL_OFFSET)) % whd; in applyOffset()
1385 tmp = Min(Max(tmp, Int4(0)), whd - Int4(1)); in applyOffset()
1396 …ort4 vvvv, Short4 wwww, const Short4 &layerIndex, Vector4i &offset, const Int4 &sample, const Poin… in computeIndices()
1398 uuuu = MulHigh(As<UShort4>(uuuu), UShort4(*Pointer<Int4>(mipmap + OFFSET(Mipmap, width)))); in computeIndices()
1402 …uuuu = applyOffset(uuuu, offset.x, *Pointer<Int4>(mipmap + OFFSET(Mipmap, width)), state.addressin… in computeIndices()
1405 UInt4 indices = Int4(uuuu); in computeIndices()
1409 vvvv = MulHigh(As<UShort4>(vvvv), UShort4(*Pointer<Int4>(mipmap + OFFSET(Mipmap, height)))); in computeIndices()
1413 …vvvv = applyOffset(vvvv, offset.y, *Pointer<Int4>(mipmap + OFFSET(Mipmap, height)), state.addressi… in computeIndices()
1426 wwww = MulHigh(As<UShort4>(wwww), UShort4(*Pointer<Int4>(mipmap + OFFSET(Mipmap, depth)))); in computeIndices()
1430 …wwww = applyOffset(wwww, offset.z, *Pointer<Int4>(mipmap + OFFSET(Mipmap, depth)), state.addressin… in computeIndices()
1433 indices += As<UInt4>(Int4(As<UShort4>(wwww))) * *Pointer<UInt4>(mipmap + OFFSET(Mipmap, sliceP)); in computeIndices()
1438 Int4 layer = Int4(As<UShort4>(layerIndex)); in computeIndices()
1442 layer *= Int4(6); in computeIndices()
1463 void SamplerCore::computeIndices(UInt index[4], Int4 uuuu, Int4 vvvv, Int4 wwww, const Int4 &sample… in computeIndices()
1492 index[i] = Extract(As<Int4>(indices), i); in computeIndices()
1696 Int4 cc; in sampleTexel()
1706 Int4 cc; in sampleTexel()
1716 Int4 cc; in sampleTexel()
1722 c.x = Short4((cc & Int4(0x3FF))); in sampleTexel()
1723 c.y = Short4(((cc >> 10) & Int4(0x3FF))); in sampleTexel()
1724 c.z = Short4(((cc >> 20) & Int4(0x3FF))); in sampleTexel()
1725 c.w = Short4(((cc >> 30) & Int4(0x3))); in sampleTexel()
1729 Int4 cc; in sampleTexel()
1735 c.z = Short4((cc & Int4(0x3FF))); in sampleTexel()
1736 c.y = Short4(((cc >> 10) & Int4(0x3FF))); in sampleTexel()
1737 c.x = Short4(((cc >> 20) & Int4(0x3FF))); in sampleTexel()
1738 c.w = Short4(((cc >> 30) & Int4(0x3))); in sampleTexel()
1760 …t4 &vvvv, Short4 &wwww, const Short4 &layerIndex, Vector4i &offset, const Int4 &sample, Pointer<By… in sampleTexel()
1909 Vector4f SamplerCore::sampleTexel(Int4 &uuuu, Int4 &vvvv, Int4 &wwww, Float4 &dRef, const Int4 &sam… in sampleTexel()
1911 Int4 valid; in sampleTexel()
1916 Int4 negative = uuuu; in sampleTexel()
1919 valid = CmpNLT(negative, Int4(0)); in sampleTexel()
1934 t0 = Int4(*Pointer<UShort4>(buffer + index[0] * 2)); in sampleTexel()
1935 t1 = Int4(*Pointer<UShort4>(buffer + index[1] * 2)); in sampleTexel()
1936 t2 = Int4(*Pointer<UShort4>(buffer + index[2] * 2)); in sampleTexel()
1937 t3 = Int4(*Pointer<UShort4>(buffer + index[3] * 2)); in sampleTexel()
1945 t0 = Int4(*Pointer<UShort4>(buffer + index[0] * 4)); in sampleTexel()
1946 t1 = Int4(*Pointer<UShort4>(buffer + index[1] * 4)); in sampleTexel()
1947 t2 = Int4(*Pointer<UShort4>(buffer + index[2] * 4)); in sampleTexel()
1948 t3 = Int4(*Pointer<UShort4>(buffer + index[3] * 4)); in sampleTexel()
1958 t0 = Int4(*Pointer<UShort4>(buffer + index[0] * 8)); in sampleTexel()
1959 t1 = Int4(*Pointer<UShort4>(buffer + index[1] * 8)); in sampleTexel()
1960 t2 = Int4(*Pointer<UShort4>(buffer + index[2] * 8)); in sampleTexel()
1961 t3 = Int4(*Pointer<UShort4>(buffer + index[3] * 8)); in sampleTexel()
2045 c[n] = As<Float4>(Int4(As<UShort4>(cs[n]))); in sampleTexel()
2056 c[n] = As<Float4>(Int4(cs[n])); in sampleTexel()
2077 Int4 boolean; in sampleTexel()
2087 case VK_COMPARE_OP_ALWAYS: boolean = Int4(-1); break; in sampleTexel()
2088 case VK_COMPARE_OP_NEVER: boolean = Int4(0); break; in sampleTexel()
2092 c.x = As<Float4>(boolean & As<Int4>(Float4(1.0f))); in sampleTexel()
2106 Vector4f SamplerCore::replaceBorderTexel(const Vector4f &c, Int4 valid) in replaceBorderTexel()
2108 Int4 borderRGB; in replaceBorderTexel()
2109 Int4 borderA; in replaceBorderTexel()
2113 …Int4 float_one = scaled ? As<Int4>(Float4(static_cast<float>(sign ? 0x7FFF : 0xFFFF))) : As<Int4>(… in replaceBorderTexel()
2119 borderRGB = Int4(0); in replaceBorderTexel()
2120 borderA = Int4(0); in replaceBorderTexel()
2123 borderRGB = Int4(0); in replaceBorderTexel()
2127 borderRGB = Int4(0); in replaceBorderTexel()
2128 borderA = Int4(1); in replaceBorderTexel()
2135 borderRGB = Int4(1); in replaceBorderTexel()
2136 borderA = Int4(1); in replaceBorderTexel()
2143 out.x = As<Float4>((valid & As<Int4>(c.x)) | (~valid & borderRGB)); // TODO: IfThenElse() in replaceBorderTexel()
2144 out.y = As<Float4>((valid & As<Int4>(c.y)) | (~valid & borderRGB)); in replaceBorderTexel()
2145 out.z = As<Float4>((valid & As<Int4>(c.z)) | (~valid & borderRGB)); in replaceBorderTexel()
2146 out.w = As<Float4>((valid & As<Int4>(c.w)) | (~valid & borderA)); in replaceBorderTexel()
2179 Int4 SamplerCore::computeFilterOffset(Float &lod) in computeFilterOffset()
2183 return Int4(0); in computeFilterOffset()
2194 return Int4(~0); in computeFilterOffset()
2207 return Short4(Int4(clamp * Float4(1 << 16))); in address()
2211 Int4 convert = Int4(uw * Float4(1 << 16)); in address()
2212 Int4 mirror = (convert << 15) >> 31; in address()
2221 Int4 convert = Int4(Abs(uw * Float4(1 << 16))); in address()
2224 convert -= Int4(0x00008000, 0x00008000, 0x00008000, 0x00008000); in address()
2225 convert = As<Int4>(PackSigned(convert, convert)); in address()
2231 return Short4(Int4(uw * Float4(1 << 16))); in address()
2242 Int4 layers = *Pointer<Int4>(mipmap + OFFSET(Mipmap, depth)); in computeLayerIndex()
2244 return Short4(Min(Max(RoundInt(a), Int4(0)), layers - Int4(1))); in computeLayerIndex()
2248 static Int4 mirror(Int4 n) in mirror()
2250 auto positive = CmpNLT(n, Int4(0)); in mirror()
2251 return (positive & n) | (~positive & (-(Int4(1) + n))); in mirror()
2254 static Int4 mod(Int4 n, Int4 d) in mod()
2257 auto positive = CmpNLT(x, Int4(0)); in mod()
2261 …mplerCore::address(const Float4 &uvw, Int4 &xyz0, Int4 &xyz1, Float4 &f, Pointer<Byte> &mipmap, In… in address()
2269 Int4 dim = *Pointer<Int4>(mipmap + whd, 16); in address()
2270 Int4 maxXYZ = dim - Int4(1); in address()
2274 Int4 xyz = function.offset ? As<Int4>(uvw) + offset : As<Int4>(uvw); in address()
2275 xyz0 = Min(Max(xyz, Int4(0)), maxXYZ); in address()
2281 Int4 outOfBounds = CmpNEQ(xyz, xyz0); in address()
2286 xyz0 = As<Int4>(uvw); in address()
2301 coord = Min(Max(coord, Float4(0.0f)), Float4(dim) * As<Float4>(Int4(oneBits))); in address()
2323 xyz0 = Int4(floor); in address()
2330 xyz1 = xyz0 + Int4(1); in address()
2332 xyz0 = (maxXYZ)-mirror(mod(xyz0, Int4(2) * dim) - dim); in address()
2333 xyz1 = (maxXYZ)-mirror(mod(xyz1, Int4(2) * dim) - dim); in address()
2350 Float4 one = As<Float4>(Int4(oneBits)); in address()
2356 Float4 half = As<Float4>(Int4(halfBits)); in address()
2357 Float4 one = As<Float4>(Int4(oneBits)); in address()
2358 Float4 two = As<Float4>(Int4(twoBits)); in address()
2364 Float4 half = As<Float4>(Int4(halfBits)); in address()
2365 Float4 one = As<Float4>(Int4(oneBits)); in address()
2366 Float4 two = As<Float4>(Int4(twoBits)); in address()
2386 xyz0 = Int4(Floor(coord)); in address()
2390 xyz0 = Int4(coord); in address()
2398 coord -= As<Float4>(As<Int4>(Float4(0.5f)) & filter); in address()
2406 xyz0 = Int4(floor); in address()
2417 xyz0 += Int4(1); in address()
2425 Int4 border0 = CmpLT(xyz0, Int4(0)) | CmpNLT(xyz0, dim); in address()
2426 Int4 border1 = CmpLT(xyz1, Int4(0)) | CmpNLT(xyz1, dim); in address()
2441 xyz0 = Min(Max(xyz0, Int4(0)), maxXYZ); in address()
2442 xyz1 = Min(Max(xyz1, Int4(0)), maxXYZ); in address()
2459 xyz0 = Max(xyz0, Int4(0)); in address()
2464 Int4 under = CmpLT(xyz0, Int4(0)); in address()
2467 Int4 nover = CmpLT(xyz1, dim); in address()
2476 Int4 SamplerCore::computeLayerIndex(const Float4 &a, Pointer<Byte> &mipmap, SamplerFunction functio… in computeLayerIndex()
2483 Int4 layers = *Pointer<Int4>(mipmap + OFFSET(Mipmap, depth), 16); in computeLayerIndex()
2484 Int4 maxLayer = layers - Int4(1); in computeLayerIndex()
2488 Int4 xyz = As<Int4>(a); in computeLayerIndex()
2489 Int4 xyz0 = Min(Max(xyz, Int4(0)), maxLayer); in computeLayerIndex()
2495 Int4 outOfBounds = CmpNEQ(xyz, xyz0); in computeLayerIndex()
2502 return Min(Max(RoundInt(a), Int4(0)), maxLayer); in computeLayerIndex()