Lines Matching defs:sampler
38 static bool isSamplerSupported (const Sampler& sampler)
40 return sampler.compare != Sampler::COMPAREMODE_NONE &&
41 isWrapModeSupported(sampler.wrapS) &&
42 isWrapModeSupported(sampler.wrapT) &&
43 isWrapModeSupported(sampler.wrapR);
135 static float lookupDepthNoBorder (const tcu::ConstPixelBufferAccess& access, const Sampler& sampler, int i, int j, int k = 0)
137 DE_UNREF(sampler);
148 static float lookupDepth (const tcu::ConstPixelBufferAccess& access, const Sampler& sampler, int i, int j, int k)
151 return lookupDepthNoBorder(access, sampler, i, j, k);
153 return sampleTextureBorder<float>(access.getFormat(), sampler).x();
547 const Sampler& sampler,
555 const Vec2 uBounds = computeNonNormalizedCoordBounds(sampler.normalizedCoords, level.getWidth(), coord.x(), prec.coordBits.x(), prec.uvwBits.x());
556 const Vec2 vBounds = computeNonNormalizedCoordBounds(sampler.normalizedCoords, level.getHeight(), coord.y(), prec.coordBits.y(), prec.uvwBits.y());
568 const int x = wrap(sampler.wrapS, i, level.getWidth());
569 const int y = wrap(sampler.wrapT, j, level.getHeight());
570 const float depth = lookupDepth(level, sampler, x, y, coordZ);
571 const CmpResultSet resSet = execCompare(sampler.compare, depth, cmpReference, prec.referenceBits, isFixedPointDepth);
582 const Sampler& sampler,
590 const Vec2 uBounds = computeNonNormalizedCoordBounds(sampler.normalizedCoords, level.getWidth(), coord.x(), prec.coordBits.x(), prec.uvwBits.x());
591 const Vec2 vBounds = computeNonNormalizedCoordBounds(sampler.normalizedCoords, level.getHeight(), coord.y(), prec.coordBits.y(), prec.uvwBits.y());
609 const int x0 = wrap(sampler.wrapS, i , w);
610 const int x1 = wrap(sampler.wrapS, i+1, w);
611 const int y0 = wrap(sampler.wrapT, j , h);
612 const int y1 = wrap(sampler.wrapT, j+1, h);
620 const Vec4 depths (lookupDepth(level, sampler, x0, y0, coordZ),
621 lookupDepth(level, sampler, x1, y0, coordZ),
622 lookupDepth(level, sampler, x0, y1, coordZ),
623 lookupDepth(level, sampler, x1, y1, coordZ));
625 if (isBilinearCompareValid(sampler.compare, prec, depths, Vec2(minA, maxA), Vec2(minB, maxB), cmpReference, result, isFixedPointDepth))
634 const Sampler& sampler,
643 return isLinearCompareResultValid(level, sampler, prec, coord, coordZ, cmpReference, result);
645 return isNearestCompareResultValid(level, sampler, prec, coord, coordZ, cmpReference, result);
650 const Sampler& sampler,
665 const Vec2 uBounds0 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, w0, coord.x(), prec.coordBits.x(), prec.uvwBits.x());
666 const Vec2 uBounds1 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, w1, coord.x(), prec.coordBits.x(), prec.uvwBits.x());
667 const Vec2 vBounds0 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, h0, coord.y(), prec.coordBits.y(), prec.uvwBits.y());
668 const Vec2 vBounds1 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, h1, coord.y(), prec.coordBits.y(), prec.uvwBits.y());
684 const float depth0 = lookupDepth(level0, sampler, wrap(sampler.wrapS, i0, w0), wrap(sampler.wrapT, j0, h0), coordZ);
690 const float depth1 = lookupDepth(level1, sampler, wrap(sampler.wrapS, i1, w1), wrap(sampler.wrapT, j1, h1), coordZ);
692 if (isLinearCompareValid(sampler.compare, prec, Vec2(depth0, depth1), fBounds, cmpReference, result, isFixedPointDepth))
704 const Sampler& sampler,
722 const Vec2 uBounds0 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, w0, coord.x(), prec.coordBits.x(), prec.uvwBits.x());
723 const Vec2 uBounds1 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, w1, coord.x(), prec.coordBits.x(), prec.uvwBits.x());
724 const Vec2 vBounds0 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, h0, coord.y(), prec.coordBits.y(), prec.uvwBits.y());
725 const Vec2 vBounds1 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, h1, coord.y(), prec.coordBits.y(), prec.uvwBits.y());
748 const int x0 = wrap(sampler.wrapS, i0 , w0);
749 const int x1 = wrap(sampler.wrapS, i0+1, w0);
750 const int y0 = wrap(sampler.wrapT, j0 , h0);
751 const int y1 = wrap(sampler.wrapT, j0+1, h0);
753 depths0[0] = lookupDepth(level0, sampler, x0, y0, coordZ);
754 depths0[1] = lookupDepth(level0, sampler, x1, y0, coordZ);
755 depths0[2] = lookupDepth(level0, sampler, x0, y1, coordZ);
756 depths0[3] = lookupDepth(level0, sampler, x1, y1, coordZ);
770 const int x0 = wrap(sampler.wrapS, i1 , w1);
771 const int x1 = wrap(sampler.wrapS, i1+1, w1);
772 const int y0 = wrap(sampler.wrapT, j1 , h1);
773 const int y1 = wrap(sampler.wrapT, j1+1, h1);
775 depths1[0] = lookupDepth(level1, sampler, x0, y0, coordZ);
776 depths1[1] = lookupDepth(level1, sampler, x1, y0, coordZ);
777 depths1[2] = lookupDepth(level1, sampler, x0, y1, coordZ);
778 depths1[3] = lookupDepth(level1, sampler, x1, y1, coordZ);
781 if (isTrilinearCompareValid(sampler.compare, prec, depths0, depths1,
796 const Sampler& sampler,
806 return isLinearMipmapLinearCompareResultValid(level0, level1, sampler, prec, coord, coordZ, fBounds, cmpReference, result);
808 return isNearestMipmapLinearCompareResultValid(level0, level1, sampler, prec, coord, coordZ, fBounds, cmpReference, result);
812 const Sampler& sampler,
821 const bool canBeMagnified = minLod <= sampler.lodThreshold;
822 const bool canBeMinified = maxLod > sampler.lodThreshold;
824 DE_ASSERT(isSamplerSupported(sampler));
828 if (isLevelCompareResultValid(texture.getLevel(0), sampler, sampler.magFilter, prec, coord, 0, cmpReference, result))
834 const bool isNearestMipmap = isNearestMipmapFilter(sampler.minFilter);
835 const bool isLinearMipmap = isLinearMipmapFilter(sampler.minFilter);
853 if (isMipmapLinearCompareResultValid(texture.getLevel(level), texture.getLevel(level+1), sampler, getLevelFilter(sampler.minFilter), prec, coord, 0, Vec2(minF, maxF), cmpReference, result))
868 if (isLevelCompareResultValid(texture.getLevel(level), sampler, getLevelFilter(sampler.minFilter), prec, coord, 0, cmpReference, result))
874 if (isLevelCompareResultValid(texture.getLevel(0), sampler, sampler.minFilter, prec, coord, 0, cmpReference, result))
884 const Sampler& sampler,
895 const Vec2 uBounds0 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, size0, coords.s, prec.coordBits.x(), prec.uvwBits.x());
896 const Vec2 uBounds1 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, size1, coords.s, prec.coordBits.x(), prec.uvwBits.x());
897 const Vec2 vBounds0 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, size0, coords.t, prec.coordBits.y(), prec.uvwBits.y());
898 const Vec2 vBounds1 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, size1, coords.t, prec.coordBits.y(), prec.uvwBits.y());
940 depths0[0] = lookupDepthNoBorder(faces0[c00.face], sampler, c00.s, c00.t);
941 depths0[1] = lookupDepthNoBorder(faces0[c10.face], sampler, c10.s, c10.t);
942 depths0[2] = lookupDepthNoBorder(faces0[c01.face], sampler, c01.s, c01.t);
943 depths0[3] = lookupDepthNoBorder(faces0[c11.face], sampler, c11.s, c11.t);
965 depths1[0] = lookupDepthNoBorder(faces1[c00.face], sampler, c00.s, c00.t);
966 depths1[1] = lookupDepthNoBorder(faces1[c10.face], sampler, c10.s, c10.t);
967 depths1[2] = lookupDepthNoBorder(faces1[c01.face], sampler, c01.s, c01.t);
968 depths1[3] = lookupDepthNoBorder(faces1[c11.face], sampler, c11.s, c11.t);
972 if (isTrilinearCompareValid(sampler.compare, prec, depths0, depths1,
987 const Sampler& sampler,
997 if (sampler.seamlessCubeMap)
998 return isSeamplessLinearMipmapLinearCompareResultValid(texture, baseLevelNdx, sampler, prec, coords, fBounds, cmpReference, result);
1002 sampler, prec, Vec2(coords.s, coords.t), 0, fBounds, cmpReference, result);
1007 sampler, prec, Vec2(coords.s, coords.t), 0, fBounds, cmpReference, result);
1012 const Sampler& sampler,
1021 const Vec2 uBounds = computeNonNormalizedCoordBounds(sampler.normalizedCoords, size, coords.s, prec.coordBits.x(), prec.uvwBits.x());
1022 const Vec2 vBounds = computeNonNormalizedCoordBounds(sampler.normalizedCoords, size, coords.t, prec.coordBits.y(), prec.uvwBits.y());
1056 depths[0] = lookupDepthNoBorder(faces[c00.face], sampler, c00.s, c00.t);
1057 depths[1] = lookupDepthNoBorder(faces[c10.face], sampler, c10.s, c10.t);
1058 depths[2] = lookupDepthNoBorder(faces[c01.face], sampler, c01.s, c01.t);
1059 depths[3] = lookupDepthNoBorder(faces[c11.face], sampler, c11.s, c11.t);
1061 if (isBilinearCompareValid(sampler.compare, prec, depths, Vec2(minA, maxA), Vec2(minB, maxB), cmpReference, result, isFixedPointDepth))
1071 const Sampler& sampler,
1080 if (sampler.seamlessCubeMap)
1081 return isSeamlessLinearCompareResultValid(texture, levelNdx, sampler, prec, coords, cmpReference, result);
1083 return isLinearCompareResultValid(texture.getLevelFace(levelNdx, coords.face), sampler, prec, Vec2(coords.s, coords.t), 0, cmpReference, result);
1086 return isNearestCompareResultValid(texture.getLevelFace(levelNdx, coords.face), sampler, prec, Vec2(coords.s, coords.t), 0, cmpReference, result);
1091 const Sampler& sampler,
1133 if (isCubeLevelCompareResultValid(TextureCubeView(numLevels, levels), baseLevelNdx, sampler, filterMode, prec, coords, cmpReference, result))
1142 const Sampler& sampler,
1185 if (isCubeMipmapLinearCompareResultValid(TextureCubeView(numLevels, levels), baseLevelNdx, sampler, levelFilter, prec, coords, fBounds, cmpReference, result))
1193 const Sampler& sampler,
1201 const Vec2 uBounds = computeNonNormalizedCoordBounds(sampler.normalizedCoords, level.getWidth(), coord.x(), prec.coordBits.x(), prec.uvwBits.x());
1209 const int x = wrap(sampler.wrapS, i, level.getWidth());
1210 const float depth = lookupDepth(level, sampler, x, coordZ, 0);
1211 const CmpResultSet resSet = execCompare(sampler.compare, depth, cmpReference, prec.referenceBits, isFixedPointDepth);
1221 const Sampler& sampler,
1229 const Vec2 uBounds = computeNonNormalizedCoordBounds(sampler.normalizedCoords, level.getWidth(), coord.x(), prec.coordBits.x(), prec.uvwBits.x());
1242 const int x0 = wrap(sampler.wrapS, i , w);
1243 const int x1 = wrap(sampler.wrapS, i + 1, w);
1249 const Vec2 depths (lookupDepth(level, sampler, x0, coordZ, 0),
1250 lookupDepth(level, sampler, x1, coordZ, 0));
1252 if (isLinearCompareValid(sampler.compare, prec, depths, Vec2(minA, maxA), cmpReference, result, isFixedPointDepth))
1260 const Sampler& sampler,
1269 return isLinearCompareResultValid(level, sampler, prec, coord, coordZ, cmpReference, result);
1271 return isNearestCompareResultValid(level, sampler, prec, coord, coordZ, cmpReference, result);
1276 const Sampler& sampler,
1290 const Vec2 uBounds0 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, w0, coord.x(), prec.coordBits.x(), prec.uvwBits.x());
1291 const Vec2 uBounds1 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, w1, coord.x(), prec.coordBits.x(), prec.uvwBits.x());
1301 const float depth0 = lookupDepth(level0, sampler, wrap(sampler.wrapS, i0, w0), coordZ, 0);
1305 const float depth1 = lookupDepth(level1, sampler, wrap(sampler.wrapS, i1, w1), coordZ, 0);
1307 if (isLinearCompareValid(sampler.compare, prec, Vec2(depth0, depth1), fBounds, cmpReference, result, isFixedPointDepth))
1318 const Sampler& sampler,
1335 const Vec2 uBounds0 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, w0, coord.x(), prec.coordBits.x(), prec.uvwBits.x());
1336 const Vec2 uBounds1 = computeNonNormalizedCoordBounds(sampler.normalizedCoords, w1, coord.x(), prec.coordBits.x(), prec.uvwBits.x());
1352 const int x0 = wrap(sampler.wrapS, i0 , w0);
1353 const int x1 = wrap(sampler.wrapS, i0 + 1, w0);
1355 depths[0] = lookupDepth(level0, sampler, x0, coordZ, 0);
1356 depths[1] = lookupDepth(level0, sampler, x1, coordZ, 0);
1366 const int x0 = wrap(sampler.wrapS, i1 , w1);
1367 const int x1 = wrap(sampler.wrapS, i1 + 1, w1);
1369 depths[2] = lookupDepth(level1, sampler, x0, coordZ, 0);
1370 depths[3] = lookupDepth(level1, sampler, x1, coordZ, 0);
1373 if (isBilinearCompareValid(sampler.compare,
1390 const Sampler& sampler,
1400 return isLinearMipmapLinearCompareResultValid(level0, level1, sampler, prec, coord, coordZ, fBounds, cmpReference, result);
1402 return isNearestMipmapLinearCompareResultValid(level0, level1, sampler, prec, coord, coordZ, fBounds, cmpReference, result);
1405 bool isTexCompareResultValid (const TextureCubeView& texture, const Sampler& sampler, const TexComparePrecision& prec, const Vec3& coord, const Vec2& lodBounds, const float cmpReference, const float result)
1410 DE_ASSERT(isSamplerSupported(sampler));
1422 const bool canBeMagnified = minLod <= sampler.lodThreshold;
1423 const bool canBeMinified = maxLod > sampler.lodThreshold;
1427 if (isCubeLevelCompareResultValid(texture, 0, sampler, sampler.magFilter, prec, faceCoords, cmpReference, result))
1433 const bool isNearestMipmap = isNearestMipmapFilter(sampler.minFilter);
1434 const bool isLinearMipmap = isLinearMipmapFilter(sampler.minFilter);
1452 if (isCubeMipmapLinearCompareResultValid(texture, level, sampler, getLevelFilter(sampler.minFilter), prec, faceCoords, Vec2(minF, maxF), cmpReference, result))
1467 if (isCubeLevelCompareResultValid(texture, level, sampler, getLevelFilter(sampler.minFilter), prec, faceCoords, cmpReference, result))
1473 if (isCubeLevelCompareResultValid(texture, 0, sampler, sampler.minFilter, prec, faceCoords, cmpReference, result))
1482 bool isTexCompareResultValid (const Texture2DArrayView& texture, const Sampler& sampler, const TexComparePrecision& prec, const Vec3& coord, const Vec2& lodBounds, const float cmpReference, const float result)
1490 DE_ASSERT(isSamplerSupported(sampler));
1496 const bool canBeMagnified = minLod <= sampler.lodThreshold;
1497 const bool canBeMinified = maxLod > sampler.lodThreshold;
1501 if (isLevelCompareResultValid(texture.getLevel(0), sampler, sampler.magFilter, prec, coord.swizzle(0,1), layer, cmpReference, result))
1507 const bool isNearestMipmap = isNearestMipmapFilter(sampler.minFilter);
1508 const bool isLinearMipmap = isLinearMipmapFilter(sampler.minFilter);
1526 if (isMipmapLinearCompareResultValid(texture.getLevel(level), texture.getLevel(level+1), sampler, getLevelFilter(sampler.minFilter), prec, coord.swizzle(0,1), layer, Vec2(minF, maxF), cmpReference, result))
1541 if (isLevelCompareResultValid(texture.getLevel(level), sampler, getLevelFilter(sampler.minFilter), prec, coord.swizzle(0,1), layer, cmpReference, result))
1547 if (isLevelCompareResultValid(texture.getLevel(0), sampler, sampler.minFilter, prec, coord.swizzle(0,1), layer, cmpReference, result))
1557 const Sampler& sampler,
1566 const bool canBeMagnified = minLod <= sampler.lodThreshold;
1567 const bool canBeMinified = maxLod > sampler.lodThreshold;
1569 DE_ASSERT(isSamplerSupported(sampler));
1573 if (isLevelCompareResultValid(texture.getLevel(0), sampler, sampler.magFilter, prec, coord, 0, cmpReference, result))
1579 const bool isNearestMipmap = isNearestMipmapFilter(sampler.minFilter);
1580 const bool isLinearMipmap = isLinearMipmapFilter(sampler.minFilter);
1598 if (isMipmapLinearCompareResultValid(texture.getLevel(level), texture.getLevel(level+1), sampler, getLevelFilter(sampler.minFilter), prec, coord, 0, Vec2(minF, maxF), cmpReference, result))
1613 if (isLevelCompareResultValid(texture.getLevel(level), sampler, getLevelFilter(sampler.minFilter), prec, coord, 0, cmpReference, result))
1619 if (isLevelCompareResultValid(texture.getLevel(0), sampler, sampler.minFilter, prec, coord, 0, cmpReference, result))
1628 const Sampler& sampler,
1641 DE_ASSERT(isSamplerSupported(sampler));
1647 const bool canBeMagnified = minLod <= sampler.lodThreshold;
1648 const bool canBeMinified = maxLod > sampler.lodThreshold;
1652 if (isLevelCompareResultValid(texture.getLevel(0), sampler, sampler.magFilter, prec, Vec1(coord.x()), layer, cmpReference, result))
1658 const bool isNearestMipmap = isNearestMipmapFilter(sampler.minFilter);
1659 const bool isLinearMipmap = isLinearMipmapFilter(sampler.minFilter);
1677 if (isMipmapLinearCompareResultValid(texture.getLevel(level), texture.getLevel(level+1), sampler, getLevelFilter(sampler.minFilter), prec, Vec1(coord.x()), layer, Vec2(minF, maxF), cmpReference, result))
1692 if (isLevelCompareResultValid(texture.getLevel(level), sampler, getLevelFilter(sampler.minFilter), prec, Vec1(coord.x()), layer, cmpReference, result))
1698 if (isLevelCompareResultValid(texture.getLevel(0), sampler, sampler.minFilter, prec, Vec1(coord.x()), layer, cmpReference, result))
1707 bool isTexCompareResultValid (const TextureCubeArrayView& texture, const Sampler& sampler, const TexComparePrecision& prec, const Vec4& coord, const Vec2& lodBounds, const float cmpReference, const float result)
1713 DE_ASSERT(isSamplerSupported(sampler));
1725 const bool canBeMagnified = minLod <= sampler.lodThreshold;
1726 const bool canBeMinified = maxLod > sampler.lodThreshold;
1730 if (isCubeLevelCompareResultValid(texture, 0, sampler, sampler.magFilter, prec, faceCoords, coord.w(), cmpReference, result))
1736 const bool isNearestMipmap = isNearestMipmapFilter(sampler.minFilter);
1737 const bool isLinearMipmap = isLinearMipmapFilter(sampler.minFilter);
1755 if (isCubeMipmapLinearCompareResultValid(texture, level, sampler, getLevelFilter(sampler.minFilter), prec, faceCoords, coord.w(), Vec2(minF, maxF), cmpReference, result))
1770 if (isCubeLevelCompareResultValid(texture, level, sampler, getLevelFilter(sampler.minFilter), prec, faceCoords, coord.w(), cmpReference, result))
1776 if (isCubeLevelCompareResultValid(texture, 0, sampler, sampler.minFilter, prec, faceCoords, coord.w(), cmpReference, result))
1786 const Sampler& sampler,
1795 const Vec2 uBounds = computeNonNormalizedCoordBounds(sampler.normalizedCoords, texture.getWidth(), coord.x(), prec.coordBits.x(), prec.uvwBits.x());
1796 const Vec2 vBounds = computeNonNormalizedCoordBounds(sampler.normalizedCoords, texture.getHeight(), coord.y(), prec.coordBits.y(), prec.uvwBits.y());
1816 const int x = wrap(sampler.wrapS, i+offsets[offNdx].x(), w);
1817 const int y = wrap(sampler.wrapT, j+offsets[offNdx].y(), h);
1818 const float depth = lookupDepth(texture, sampler, x, y, coordZ);
1819 const CmpResultSet resSet = execCompare(sampler.compare, depth, cmpReference, prec.referenceBits, isFixedPointDepth);
1834 const Sampler& sampler,
1841 DE_ASSERT(isSamplerSupported(sampler));
1843 return isGatherOffsetsCompareResultValid(texture.getLevel(0), sampler, prec, coord, 0, offsets, cmpReference, result);
1847 const Sampler& sampler,
1860 DE_ASSERT(isSamplerSupported(sampler));
1864 if (isGatherOffsetsCompareResultValid(texture.getLevel(0), sampler, prec, coord.swizzle(0,1), layer, offsets, cmpReference, result))
1871 const Sampler& sampler,
1879 const Vec2 uBounds = computeNonNormalizedCoordBounds(sampler.normalizedCoords, size, coords.s, prec.coordBits.x(), prec.uvwBits.x());
1880 const Vec2 vBounds = computeNonNormalizedCoordBounds(sampler.normalizedCoords, size, coords.t, prec.coordBits.y(), prec.uvwBits.y());
1916 const float depth = lookupDepthNoBorder(faces[c.face], sampler, c.s, c.t);
1917 const CmpResultSet resSet = execCompare(sampler.compare, depth, cmpReference, prec.referenceBits, isFixedPointDepth);
1932 const Sampler& sampler,
1941 DE_ASSERT(isSamplerSupported(sampler));
1952 if (isGatherCompareResultValid(texture, sampler, prec, faceCoords, cmpReference, result))