Lines Matching defs:sampler
39 static bool isSamplerSupported (const Sampler& sampler)
41 return sampler.compare == Sampler::COMPAREMODE_NONE &&
42 isWrapModeSupported(sampler.wrapS) &&
43 isWrapModeSupported(sampler.wrapT) &&
44 isWrapModeSupported(sampler.wrapR);
56 inline Vector<ScalarType, 4> lookup (const ConstPixelBufferAccess& access, const Sampler& sampler, int i, int j, int k)
61 return sampleTextureBorder<ScalarType>(access.getFormat(), sampler);
65 inline Vector<float, 4> lookup (const ConstPixelBufferAccess& access, const Sampler& sampler, int i, int j, int k)
74 return sampleTextureBorder<float>(access.getFormat(), sampler);
101 static void lookupQuad (ColorQuad& dst, const ConstPixelBufferAccess& level, const Sampler& sampler, int x0, int x1, int y0, int y1, int z)
103 dst.p00 = lookup<float>(level, sampler, x0, y0, z);
104 dst.p10 = lookup<float>(level, sampler, x1, y0, z);
105 dst.p01 = lookup<float>(level, sampler, x0, y1, z);
106 dst.p11 = lookup<float>(level, sampler, x1, y1, z);
115 static void lookupLine (ColorLine& dst, const ConstPixelBufferAccess& level, const Sampler& sampler, int x0, int x1, int y)
117 dst.p0 = lookup<float>(level, sampler, x0, y, 0);
118 dst.p1 = lookup<float>(level, sampler, x1, y, 0);
566 const Sampler& sampler,
574 const Vec2 uBounds = computeNonNormalizedCoordBounds(sampler.normalizedCoords, level.getWidth(), coordX, prec.coordBits.x(), prec.uvwBits.x());
581 const int x = wrap(sampler.wrapS, i, level.getWidth());
582 const Vector<ScalarType, 4> color = lookup<ScalarType>(level, sampler, x, coordY, 0);
593 const Sampler& sampler,
599 const Vec2 uBounds = computeNonNormalizedCoordBounds(sampler.normalizedCoords, level.getWidth(), coord.x(), prec.coordBits.x(), prec.uvwBits.x());
600 const Vec2 vBounds = computeNonNormalizedCoordBounds(sampler.normalizedCoords, level.getHeight(), coord.y(), prec.coordBits.y(), prec.uvwBits.y());
614 const int x = wrap(sampler.wrapS, i, level.getWidth());
615 const int y = wrap(sampler.wrapT, j, level.getHeight());
616 const Vector<ScalarType, 4> color = lookup<ScalarType>(level, sampler, x, y, coordZ);
628 const Sampler& sampler,
633 const Vec2 uBounds = computeNonNormalizedCoordBounds(sampler.normalizedCoords, level.getWidth(), coord.x(), prec.coordBits.x(), prec.uvwBits.x());
634 const Vec2 vBounds = computeNonNormalizedCoordBounds(sampler.normalizedCoords, level.getHeight(), coord.y(), prec.coordBits.y(), prec.uvwBits.y());
635 const Vec2 wBounds = computeNonNormalizedCoordBounds(sampler.normalizedCoords, level.getDepth(), coord.z(), prec.coordBits.z(), prec.uvwBits.z());
653 const int x = wrap(sampler.wrapS, i, level.getWidth());
654 const int y = wrap(sampler.wrapT, j, level.getHeight());
655 const int z = wrap(sampler.wrapR, k, level.getDepth());
656 const Vector<ScalarType, 4> color = lookup<ScalarType>(level, sampler, x, y, z);
668 const Sampler& sampler,
674 const Vec2 uBounds = computeNonNormalizedCoordBounds(sampler.normalizedCoords, level.getWidth(), coordX, prec.coordBits.x(), prec.uvwBits.x());
687 sampler.reductionMode != Sampler::WEIGHTED_AVERAGE);
695 const int x0 = wrap(sampler.wrapS, i , w);
696 const int x1 = wrap(sampler.wrapS, i+1, w);
702 const Vec4 colorA = lookup<float>(level, sampler, x0, coordY, 0);
703 const Vec4 colorB = lookup<float>(level, sampler, x1, coordY, 0);
705 if (sampler.reductionMode == Sampler::WEIGHTED_AVERAGE)
712 if (isReductionValid(prec, colorA, colorB, sampler.reductionMode, result))
721 const Sampler& sampler,
727 const Vec2 uBounds = computeNonNormalizedCoordBounds(sampler.normalizedCoords, level.getWidth(), coord.x(), prec.coordBits.x(), prec.uvwBits.x());
728 const Vec2 vBounds = computeNonNormalizedCoordBounds(sampler.normalizedCoords, level.getHeight(), coord.y(), prec.coordBits.y(), prec.uvwBits.y());
747 sampler.reductionMode != Sampler::WEIGHTED_AVERAGE);
756 const int x0 = wrap(sampler.wrapS, i , w);
757 const int x1 = wrap(sampler.wrapS, i+1, w);
758 const int y0 = wrap(sampler.wrapT, j , h);
759 const int y1 = wrap(sampler.wrapT, j+1, h);
768 lookupQuad(quad, level, sampler, x0, x1, y0, y1, coordZ);
773 if (sampler.reductionMode == Sampler::WEIGHTED_AVERAGE)
780 if (isReductionValid(prec, quad, sampler.reductionMode, result))
790 const Sampler& sampler,
795 const Vec2 uBounds = computeNonNormalizedCoordBounds(sampler.normalizedCoords, level.getWidth(), coord.x(), prec.coordBits.x(), prec.uvwBits.x());
796 const Vec2 vBounds = computeNonNormalizedCoordBounds(sampler.normalizedCoords, level.getHeight(), coord.y(), prec.coordBits.y(), prec.uvwBits.y());
797 const Vec2 wBounds = computeNonNormalizedCoordBounds(sampler.normalizedCoords, level.getDepth(), coord.z(), prec.coordBits.z(), prec.uvwBits.z());
819 sampler.reductionMode != Sampler::WEIGHTED_AVERAGE);
830 const int x0 = wrap(sampler.wrapS, i , w);
831 const int x1 = wrap(sampler.wrapS, i+1, w);
832 const int y0 = wrap(sampler.wrapT, j , h);
833 const int y1 = wrap(sampler.wrapT, j+1, h);
834 const int z0 = wrap(sampler.wrapR, k , d);
835 const int z1 = wrap(sampler.wrapR, k+1, d);
846 lookupQuad(quad0, level, sampler, x0, x1, y0, y1, z0);
847 lookupQuad(quad1, level, sampler, x0, x1, y0, y1, z1);
852 if (sampler.reductionMode == Sampler::WEIGHTED_AVERAGE)
859 if (isReductionValid(prec, quad0, quad1, sampler.reductionMode, result))
871 const Sampler& sampler,
881 const Vec2 uBounds0 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, w0, coord, prec.coordBits.x(), prec.uvwBits.x());
882 const Vec2 uBounds1 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, w1, coord, prec.coordBits.x(), prec.uvwBits.x());
894 const Vec4 c0 = lookup<float>(level0, sampler, wrap(sampler.wrapS, i0, w0), coordY, 0);
895 const Vec4 c1 = lookup<float>(level1, sampler, wrap(sampler.wrapS, i1, w1), coordY, 0);
907 const Sampler& sampler,
919 const Vec2 uBounds0 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, w0, coord.x(), prec.coordBits.x(), prec.uvwBits.x());
920 const Vec2 uBounds1 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, w1, coord.x(), prec.coordBits.x(), prec.uvwBits.x());
921 const Vec2 vBounds0 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, h0, coord.y(), prec.coordBits.y(), prec.uvwBits.y());
922 const Vec2 vBounds1 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, h1, coord.y(), prec.coordBits.y(), prec.uvwBits.y());
942 const Vec4 c0 = lookup<float>(level0, sampler, wrap(sampler.wrapS, i0, w0), wrap(sampler.wrapT, j0, h0), coordZ);
943 const Vec4 c1 = lookup<float>(level1, sampler, wrap(sampler.wrapS, i1, w1), wrap(sampler.wrapT, j1, h1), coordZ);
957 const Sampler& sampler,
970 const Vec2 uBounds0 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, w0, coord.x(), prec.coordBits.x(), prec.uvwBits.x());
971 const Vec2 uBounds1 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, w1, coord.x(), prec.coordBits.x(), prec.uvwBits.x());
972 const Vec2 vBounds0 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, h0, coord.y(), prec.coordBits.y(), prec.uvwBits.y());
973 const Vec2 vBounds1 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, h1, coord.y(), prec.coordBits.y(), prec.uvwBits.y());
974 const Vec2 wBounds0 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, d0, coord.z(), prec.coordBits.z(), prec.uvwBits.z());
975 const Vec2 wBounds1 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, d1, coord.z(), prec.coordBits.z(), prec.uvwBits.z());
1003 const Vec4 c0 = lookup<float>(level0, sampler, wrap(sampler.wrapS, i0, w0), wrap(sampler.wrapT, j0, h0), wrap(sampler.wrapR, k0, d0));
1004 const Vec4 c1 = lookup<float>(level1, sampler, wrap(sampler.wrapS, i1, w1), wrap(sampler.wrapT, j1, h1), wrap(sampler.wrapR, k1, d1));
1020 const Sampler& sampler,
1033 const Vec2 uBounds0 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, w0, coordX, prec.coordBits.x(), prec.uvwBits.x());
1034 const Vec2 uBounds1 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, w1, coordX, prec.coordBits.x(), prec.uvwBits.x());
1050 sampler.reductionMode != Sampler::WEIGHTED_AVERAGE);
1058 const int x0 = wrap(sampler.wrapS, i0 , w0);
1059 const int x1 = wrap(sampler.wrapS, i0+1, w0);
1060 lookupLine(line0, level0, sampler, x0, x1, coordY);
1077 const int x0 = wrap(sampler.wrapS, i1 , w1);
1078 const int x1 = wrap(sampler.wrapS, i1+1, w1);
1079 lookupLine(line1, level1, sampler, x0, x1, coordY);
1100 const Sampler& sampler,
1115 const Vec2 uBounds0 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, w0, coord.x(), prec.coordBits.x(), prec.uvwBits.x());
1116 const Vec2 uBounds1 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, w1, coord.x(), prec.coordBits.x(), prec.uvwBits.x());
1117 const Vec2 vBounds0 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, h0, coord.y(), prec.coordBits.y(), prec.uvwBits.y());
1118 const Vec2 vBounds1 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, h1, coord.y(), prec.coordBits.y(), prec.uvwBits.y());
1138 sampler.reductionMode != Sampler::WEIGHTED_AVERAGE);
1148 const int x0 = wrap(sampler.wrapS, i0 , w0);
1149 const int x1 = wrap(sampler.wrapS, i0+1, w0);
1150 const int y0 = wrap(sampler.wrapT, j0 , h0);
1151 const int y1 = wrap(sampler.wrapT, j0+1, h0);
1152 lookupQuad(quad0, level0, sampler, x0, x1, y0, y1, coordZ);
1173 const int x0 = wrap(sampler.wrapS, i1 , w1);
1174 const int x1 = wrap(sampler.wrapS, i1+1, w1);
1175 const int y0 = wrap(sampler.wrapT, j1 , h1);
1176 const int y1 = wrap(sampler.wrapT, j1+1, h1);
1177 lookupQuad(quad1, level1, sampler, x0, x1, y0, y1, coordZ);
1203 const Sampler& sampler,
1219 const Vec2 uBounds0 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, w0, coord.x(), prec.coordBits.x(), prec.uvwBits.x());
1220 const Vec2 uBounds1 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, w1, coord.x(), prec.coordBits.x(), prec.uvwBits.x());
1221 const Vec2 vBounds0 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, h0, coord.y(), prec.coordBits.y(), prec.uvwBits.y());
1222 const Vec2 vBounds1 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, h1, coord.y(), prec.coordBits.y(), prec.uvwBits.y());
1223 const Vec2 wBounds0 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, d0, coord.z(), prec.coordBits.z(), prec.uvwBits.z());
1224 const Vec2 wBounds1 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, d1, coord.z(), prec.coordBits.z(), prec.uvwBits.z());
1248 sampler.reductionMode != Sampler::WEIGHTED_AVERAGE);
1260 const int x0 = wrap(sampler.wrapS, i0 , w0);
1261 const int x1 = wrap(sampler.wrapS, i0+1, w0);
1262 const int y0 = wrap(sampler.wrapT, j0 , h0);
1263 const int y1 = wrap(sampler.wrapT, j0+1, h0);
1264 const int z0 = wrap(sampler.wrapR, k0 , d0);
1265 const int z1 = wrap(sampler.wrapR, k0+1, d0);
1266 lookupQuad(quad00, level0, sampler, x0, x1, y0, y1, z0);
1267 lookupQuad(quad01, level0, sampler, x0, x1, y0, y1, z1);
1292 const int x0 = wrap(sampler.wrapS, i1 , w1);
1293 const int x1 = wrap(sampler.wrapS, i1+1, w1);
1294 const int y0 = wrap(sampler.wrapT, j1 , h1);
1295 const int y1 = wrap(sampler.wrapT, j1+1, h1);
1296 const int z0 = wrap(sampler.wrapR, k1 , d1);
1297 const int z1 = wrap(sampler.wrapR, k1+1, d1);
1298 lookupQuad(quad10, level1, sampler, x0, x1, y0, y1, z0);
1299 lookupQuad(quad11, level1, sampler, x0, x1, y0, y1, z1);
1330 const Sampler& sampler,
1338 return isLinearSampleResultValid(level, sampler, prec, coordX, coordY, result);
1340 return isNearestSampleResultValid(level, sampler, prec, coordX, coordY, result);
1344 const Sampler& sampler,
1352 return isLinearSampleResultValid(level, sampler, prec, coord, coordZ, result);
1354 return isNearestSampleResultValid(level, sampler, prec, coord, coordZ, result);
1359 const Sampler& sampler,
1368 return isLinearMipmapLinearSampleResultValid(level0, level1, sampler, prec, coordX, coordY, fBounds, result);
1370 return isNearestMipmapLinearSampleResultValid(level0, level1, sampler, prec, coordX, coordY, fBounds, result);
1375 const Sampler& sampler,
1384 return isLinearMipmapLinearSampleResultValid(level0, level1, sampler, prec, coord, coordZ, fBounds, result);
1386 return isNearestMipmapLinearSampleResultValid(level0, level1, sampler, prec, coord, coordZ, fBounds, result);
1389 bool isLookupResultValid (const Texture2DView& texture, const Sampler& sampler, const LookupPrecision& prec, const Vec2& coord, const Vec2& lodBounds, const Vec4& result)
1393 const bool canBeMagnified = minLod <= sampler.lodThreshold;
1394 const bool canBeMinified = maxLod > sampler.lodThreshold;
1396 DE_ASSERT(isSamplerSupported(sampler));
1400 if (isLevelSampleResultValid(texture.getLevel(0), sampler, sampler.magFilter, prec, coord, 0, result))
1406 const bool isNearestMipmap = isNearestMipmapFilter(sampler.minFilter);
1407 const bool isLinearMipmap = isLinearMipmapFilter(sampler.minFilter);
1425 if (isMipmapLinearSampleResultValid(texture.getLevel(level), texture.getLevel(level+1), sampler, getLevelFilter(sampler.minFilter), prec, coord, 0, Vec2(minF, maxF), result))
1440 if (isLevelSampleResultValid(texture.getLevel(level), sampler, getLevelFilter(sampler.minFilter), prec, coord, 0, result))
1446 if (isLevelSampleResultValid(texture.getLevel(0), sampler, sampler.minFilter, prec, coord, 0, result))
1454 bool isLookupResultValid (const Texture1DView& texture, const Sampler& sampler, const LookupPrecision& prec, const float coord, const Vec2& lodBounds, const Vec4& result)
1458 const bool canBeMagnified = minLod <= sampler.lodThreshold;
1459 const bool canBeMinified = maxLod > sampler.lodThreshold;
1461 DE_ASSERT(isSamplerSupported(sampler));
1465 if (isLevelSampleResultValid(texture.getLevel(0), sampler, sampler.magFilter, prec, coord, 0, result))
1471 const bool isNearestMipmap = isNearestMipmapFilter(sampler.minFilter);
1472 const bool isLinearMipmap = isLinearMipmapFilter(sampler.minFilter);
1490 if (isMipmapLinearSampleResultValid(texture.getLevel(level), texture.getLevel(level+1), sampler, getLevelFilter(sampler.minFilter), prec, coord, 0, Vec2(minF, maxF), result))
1505 if (isLevelSampleResultValid(texture.getLevel(level), sampler, getLevelFilter(sampler.minFilter), prec, coord, 0, result))
1511 if (isLevelSampleResultValid(texture.getLevel(0), sampler, sampler.minFilter, prec, coord, 0, result))
1520 const Sampler& sampler,
1527 const Vec2 uBounds = computeNonNormalizedCoordBounds(sampler.normalizedCoords, size, coords.s, prec.coordBits.x(), prec.uvwBits.x());
1528 const Vec2 vBounds = computeNonNormalizedCoordBounds(sampler.normalizedCoords, size, coords.t, prec.coordBits.y(), prec.uvwBits.y());
1544 sampler.reductionMode != Sampler::WEIGHTED_AVERAGE);
1567 quad.p00 = lookup<float>(faces[c00.face], sampler, c00.s, c00.t, 0);
1568 quad.p10 = lookup<float>(faces[c10.face], sampler, c10.s, c10.t, 0);
1569 quad.p01 = lookup<float>(faces[c01.face], sampler, c01.s, c01.t, 0);
1570 quad.p11 = lookup<float>(faces[c11.face], sampler, c11.s, c11.t, 0);
1575 if (sampler.reductionMode == Sampler::WEIGHTED_AVERAGE)
1582 if (isReductionValid(prec, quad, sampler.reductionMode, result))
1593 const Sampler& sampler,
1605 const Vec2 uBounds0 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, size0, coords.s, prec.coordBits.x(), prec.uvwBits.x());
1606 const Vec2 uBounds1 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, size1, coords.s, prec.coordBits.x(), prec.uvwBits.x());
1607 const Vec2 vBounds0 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, size0, coords.t, prec.coordBits.y(), prec.uvwBits.y());
1608 const Vec2 vBounds1 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, size1, coords.t, prec.coordBits.y(), prec.uvwBits.y());
1628 sampler.reductionMode != Sampler::WEIGHTED_AVERAGE);
1648 quad0.p00 = lookup<float>(faces0[c00.face], sampler, c00.s, c00.t, 0);
1649 quad0.p10 = lookup<float>(faces0[c10.face], sampler, c10.s, c10.t, 0);
1650 quad0.p01 = lookup<float>(faces0[c01.face], sampler, c01.s, c01.t, 0);
1651 quad0.p11 = lookup<float>(faces0[c11.face], sampler, c11.s, c11.t, 0);
1680 quad1.p00 = lookup<float>(faces1[c00.face], sampler, c00.s, c00.t, 0);
1681 quad1.p10 = lookup<float>(faces1[c10.face], sampler, c10.s, c10.t, 0);
1682 quad1.p01 = lookup<float>(faces1[c01.face], sampler, c01.s, c01.t, 0);
1683 quad1.p11 = lookup<float>(faces1[c11.face], sampler, c11.s, c11.t, 0);
1708 const Sampler& sampler,
1716 if (sampler.seamlessCubeMap)
1717 return isSeamlessLinearSampleResultValid(level, sampler, prec, coords, result);
1719 return isLinearSampleResultValid(level[coords.face], sampler, prec, Vec2(coords.s, coords.t), 0, result);
1722 return isNearestSampleResultValid(level[coords.face], sampler, prec, Vec2(coords.s, coords.t), 0, result);
1727 const Sampler& sampler,
1736 if (sampler.seamlessCubeMap)
1737 return isSeamplessLinearMipmapLinearSampleResultValid(faces0, faces1, sampler, prec, coords, fBounds, result);
1739 return isLinearMipmapLinearSampleResultValid(faces0[coords.face], faces1[coords.face], sampler, prec, Vec2(coords.s, coords.t), 0, fBounds, result);
1742 return isNearestMipmapLinearSampleResultValid(faces0[coords.face], faces1[coords.face], sampler, prec, Vec2(coords.s, coords.t), 0, fBounds, result);
1751 bool isLookupResultValid (const TextureCubeView& texture, const Sampler& sampler, const LookupPrecision& prec, const Vec3& coord, const Vec2& lodBounds, const Vec4& result)
1756 DE_ASSERT(isSamplerSupported(sampler));
1768 const bool canBeMagnified = minLod <= sampler.lodThreshold;
1769 const bool canBeMinified = maxLod > sampler.lodThreshold;
1776 if (isCubeLevelSampleResultValid(faces, sampler, sampler.magFilter, prec, faceCoords, result))
1782 const bool isNearestMipmap = isNearestMipmapFilter(sampler.minFilter);
1783 const bool isLinearMipmap = isLinearMipmapFilter(sampler.minFilter);
1807 if (isCubeMipmapLinearSampleResultValid(faces0, faces1, sampler, getLevelFilter(sampler.minFilter), prec, faceCoords, Vec2(minF, maxF), result))
1825 if (isCubeLevelSampleResultValid(faces, sampler, getLevelFilter(sampler.minFilter), prec, faceCoords, result))
1834 if (isCubeLevelSampleResultValid(faces, sampler, sampler.minFilter, prec, faceCoords, result))
1854 bool isLookupResultValid (const Texture1DArrayView& texture, const Sampler& sampler, const LookupPrecision& prec, const Vec2& coord, const Vec2& lodBounds, const Vec4& result)
1860 const bool canBeMagnified = minLod <= sampler.lodThreshold;
1861 const bool canBeMinified = maxLod > sampler.lodThreshold;
1863 DE_ASSERT(isSamplerSupported(sampler));
1869 if (isLevelSampleResultValid(texture.getLevel(0), sampler, sampler.magFilter, prec, coordX, layer, result))
1875 const bool isNearestMipmap = isNearestMipmapFilter(sampler.minFilter);
1876 const bool isLinearMipmap = isLinearMipmapFilter(sampler.minFilter);
1894 if (isMipmapLinearSampleResultValid(texture.getLevel(level), texture.getLevel(level+1), sampler, getLevelFilter(sampler.minFilter), prec, coordX, layer, Vec2(minF, maxF), result))
1909 if (isLevelSampleResultValid(texture.getLevel(level), sampler, getLevelFilter(sampler.minFilter), prec, coordX, layer, result))
1915 if (isLevelSampleResultValid(texture.getLevel(0), sampler, sampler.minFilter, prec, coordX, layer, result))
1924 bool isLookupResultValid (const Texture2DArrayView& texture, const Sampler& sampler, const LookupPrecision& prec, const Vec3& coord, const Vec2& lodBounds, const Vec4& result)
1930 const bool canBeMagnified = minLod <= sampler.lodThreshold;
1931 const bool canBeMinified = maxLod > sampler.lodThreshold;
1933 DE_ASSERT(isSamplerSupported(sampler));
1939 if (isLevelSampleResultValid(texture.getLevel(0), sampler, sampler.magFilter, prec, coordXY, layer, result))
1945 const bool isNearestMipmap = isNearestMipmapFilter(sampler.minFilter);
1946 const bool isLinearMipmap = isLinearMipmapFilter(sampler.minFilter);
1964 if (isMipmapLinearSampleResultValid(texture.getLevel(level), texture.getLevel(level+1), sampler, getLevelFilter(sampler.minFilter), prec, coordXY, layer, Vec2(minF, maxF), result))
1979 if (isLevelSampleResultValid(texture.getLevel(level), sampler, getLevelFilter(sampler.minFilter), prec, coordXY, layer, result))
1985 if (isLevelSampleResultValid(texture.getLevel(0), sampler, sampler.minFilter, prec, coordXY, layer, result))
1995 const Sampler& sampler,
2002 return isLinearSampleResultValid(level, sampler, prec, coord, result);
2004 return isNearestSampleResultValid(level, sampler, prec, coord, result);
2009 const Sampler& sampler,
2017 return isLinearMipmapLinearSampleResultValid(level0, level1, sampler, prec, coord, fBounds, result);
2019 return isNearestMipmapLinearSampleResultValid(level0, level1, sampler, prec, coord, fBounds, result);
2022 bool isLookupResultValid (const Texture3DView& texture, const Sampler& sampler, const LookupPrecision& prec, const Vec3& coord, const Vec2& lodBounds, const Vec4& result)
2026 const bool canBeMagnified = minLod <= sampler.lodThreshold;
2027 const bool canBeMinified = maxLod > sampler.lodThreshold;
2029 DE_ASSERT(isSamplerSupported(sampler));
2033 if (isLevelSampleResultValid(texture.getLevel(0), sampler, sampler.magFilter, prec, coord, result))
2039 const bool isNearestMipmap = isNearestMipmapFilter(sampler.minFilter);
2040 const bool isLinearMipmap = isLinearMipmapFilter(sampler.minFilter);
2058 if (isMipmapLinearSampleResultValid(texture.getLevel(level), texture.getLevel(level+1), sampler, getLevelFilter(sampler.minFilter), prec, coord, Vec2(minF, maxF), result))
2073 if (isLevelSampleResultValid(texture.getLevel(level), sampler, getLevelFilter(sampler.minFilter), prec, coord, result))
2079 if (isLevelSampleResultValid(texture.getLevel(0), sampler, sampler.minFilter, prec, coord, result))
2099 bool isLookupResultValid (const TextureCubeArrayView& texture, const Sampler& sampler, const LookupPrecision& prec, const IVec4& coordBits, const Vec4& coord, const Vec2& lodBounds, const Vec4& result)
2106 DE_ASSERT(isSamplerSupported(sampler));
2120 const bool canBeMagnified = minLod <= sampler.lodThreshold;
2121 const bool canBeMinified = maxLod > sampler.lodThreshold;
2128 if (isCubeLevelSampleResultValid(faces, sampler, sampler.magFilter, prec, faceCoords, result))
2134 const bool isNearestMipmap = isNearestMipmapFilter(sampler.minFilter);
2135 const bool isLinearMipmap = isLinearMipmapFilter(sampler.minFilter);
2159 if (isCubeMipmapLinearSampleResultValid(faces0, faces1, sampler, getLevelFilter(sampler.minFilter), prec, faceCoords, Vec2(minF, maxF), result))
2177 if (isCubeLevelSampleResultValid(faces, sampler, getLevelFilter(sampler.minFilter), prec, faceCoords, result))
2186 if (isCubeLevelSampleResultValid(faces, sampler, sampler.minFilter, prec, faceCoords, result))
2326 const Sampler& sampler,
2333 const Sampler::FilterMode filterMode = scaleMode == TEX_LOOKUP_SCALE_MAGNIFY ? sampler.magFilter : sampler.minFilter;
2334 return isLevelSampleResultValid(access, sampler, filterMode, prec, coordX, coordY, result);
2338 const Sampler& sampler,
2345 DE_ASSERT(sampler.minFilter == Sampler::NEAREST && sampler.magFilter == Sampler::NEAREST);
2347 return isNearestSampleResultValid(access, sampler, prec, coordX, coordY, result);
2351 const Sampler& sampler,
2358 DE_ASSERT(sampler.minFilter == Sampler::NEAREST && sampler.magFilter == Sampler::NEAREST);
2360 return isNearestSampleResultValid(access, sampler, prec, coordX, coordY, result);
2364 const Sampler& sampler,
2371 const Sampler::FilterMode filterMode = scaleMode == TEX_LOOKUP_SCALE_MAGNIFY ? sampler.magFilter : sampler.minFilter;
2372 return isLevelSampleResultValid(access, sampler, filterMode, prec, coord, coordZ, result);
2376 const Sampler& sampler,
2383 DE_ASSERT(sampler.minFilter == Sampler::NEAREST && sampler.magFilter == Sampler::NEAREST);
2385 return isNearestSampleResultValid(access, sampler, prec, coord, coordZ, result);
2389 const Sampler& sampler,
2396 DE_ASSERT(sampler.minFilter == Sampler::NEAREST && sampler.magFilter == Sampler::NEAREST);
2398 return isNearestSampleResultValid(access, sampler, prec, coord, coordZ, result);
2402 const Sampler& sampler,
2408 const tcu::Sampler::FilterMode filterMode = scaleMode == TEX_LOOKUP_SCALE_MAGNIFY ? sampler.magFilter : sampler.minFilter;
2409 return isLevelSampleResultValid(access, sampler, filterMode, prec, coord, result);
2413 const Sampler& sampler,
2419 DE_ASSERT(sampler.minFilter == Sampler::NEAREST && sampler.magFilter == Sampler::NEAREST);
2421 return isNearestSampleResultValid(access, sampler, prec, coord, result);
2425 const Sampler& sampler,
2431 DE_ASSERT(sampler.minFilter == Sampler::NEAREST && sampler.magFilter == Sampler::NEAREST);
2433 return isNearestSampleResultValid(access, sampler, prec, coord, result);
2438 const Sampler& sampler,
2446 const Vec2 uBounds = computeNonNormalizedCoordBounds(sampler.normalizedCoords, level.getWidth(), coord.x(), prec.coordBits.x(), prec.uvwBits.x());
2447 const Vec2 vBounds = computeNonNormalizedCoordBounds(sampler.normalizedCoords, level.getHeight(), coord.y(), prec.coordBits.y(), prec.uvwBits.y());
2466 const int x = wrap(sampler.wrapS, i+offsets[offNdx].x(), w);
2467 const int y = wrap(sampler.wrapT, j+offsets[offNdx].y(), h);
2468 color[offNdx] = lookup<ScalarType>(level, sampler, x, y, coordZ)[componentNdx];
2480 const Sampler& sampler,
2487 return isGatherOffsetsResultValid(texture.getLevel(0), sampler, prec, coord, 0, componentNdx, offsets, result);
2491 const Sampler& sampler,
2498 return isGatherOffsetsResultValid(texture.getLevel(0), sampler, prec, coord, 0, componentNdx, offsets, result);
2502 const Sampler& sampler,
2509 return isGatherOffsetsResultValid(texture.getLevel(0), sampler, prec, coord, 0, componentNdx, offsets, result);
2514 const Sampler& sampler,
2524 if (isGatherOffsetsResultValid(texture.getLevel(0), sampler, prec, coord.swizzle(0,1), layer, componentNdx, offsets, result))
2531 const Sampler& sampler,
2538 return is2DArrayGatherOffsetsResultValid(texture, sampler, prec, coord, componentNdx, offsets, result);
2542 const Sampler& sampler,
2549 return is2DArrayGatherOffsetsResultValid(texture, sampler, prec, coord, componentNdx, offsets, result);
2553 const Sampler& sampler,
2560 return is2DArrayGatherOffsetsResultValid(texture, sampler, prec, coord, componentNdx, offsets, result);
2565 const Sampler& sampler,
2573 const Vec2 uBounds = computeNonNormalizedCoordBounds(sampler.normalizedCoords, size, coords.s, prec.coordBits.x(), prec.uvwBits.x());
2574 const Vec2 vBounds = computeNonNormalizedCoordBounds(sampler.normalizedCoords, size, coords.t, prec.coordBits.y(), prec.uvwBits.y());
2609 color[offNdx] = lookup<ScalarType>(faces[c.face], sampler, c.s, c.t, 0)[componentNdx];
2622 const Sampler& sampler,
2640 if (isGatherResultValid(texture, sampler, prec, faceCoords, componentNdx, result))
2648 const Sampler& sampler,
2654 return isCubeGatherResultValid(texture, sampler, prec, coord, componentNdx, result);
2658 const Sampler& sampler,
2664 return isCubeGatherResultValid(texture, sampler, prec, coord, componentNdx, result);
2668 const Sampler& sampler,
2674 return isCubeGatherResultValid(texture, sampler, prec, coord, componentNdx, result);