Merge "DO NOT MERGE: Add cube gather tests that avoid corners; remove D32F from...
authorDaniel Xie <dxie@google.com>
Tue, 27 Oct 2015 22:51:48 +0000 (22:51 +0000)
committerandroid-build-merger <android-build-merger@google.com>
Tue, 27 Oct 2015 22:51:48 +0000 (22:51 +0000)
am: 06627c74b4  -s ours

* commit '06627c74b4a3237034aaa10c8635a01cb25e72f7':
  DO NOT MERGE: Add cube gather tests that avoid corners; remove D32F from mustpass

framework/common/tcuImageCompare.cpp
modules/gles31/functional/es31fShaderCommonFunctionTests.cpp
modules/gles31/functional/es31fTessellationTests.cpp
modules/gles31/functional/es31fTextureGatherTests.cpp

index 5f9f67f..3bae0ef 100644 (file)
@@ -31,7 +31,6 @@
 #include "tcuRGBA.hpp"
 #include "tcuTexture.hpp"
 #include "tcuTextureUtil.hpp"
-#include "tcuFloat.hpp"
 
 #include <string.h>
 
@@ -387,74 +386,6 @@ int measurePixelDiffAccuracy (TestLog& log, const char* imageSetName, const char
 }
 
 /*--------------------------------------------------------------------*//*!
- * Returns the index of float in a float space without denormals
- * so that:
- * 1) f(0.0) = 0
- * 2) f(-0.0) = 0
- * 3) f(b) = f(a) + 1  <==>  b = nextAfter(a)
- *
- * See computeFloatFlushRelaxedULPDiff for details
- *//*--------------------------------------------------------------------*/
-static deInt32 getPositionOfIEEEFloatWithoutDenormals (float x)
-{
-       DE_ASSERT(!deIsNaN(x)); // not sane
-
-       if (x == 0.0f)
-               return 0;
-       else if (x < 0.0f)
-               return -getPositionOfIEEEFloatWithoutDenormals(-x);
-       else
-       {
-               DE_ASSERT(x > 0.0f);
-
-               const tcu::Float32 f(x);
-
-               if (f.isDenorm())
-               {
-                       // Denorms are flushed to zero
-                       return 0;
-               }
-               else
-               {
-                       // sign is 0, and it's a normal number. Natural position is its bit
-                       // pattern but since we've collapsed the denorms, we must remove
-                       // the gap here too to keep the float enumeration continuous.
-                       //
-                       // Denormals occupy one exponent pattern. Removing one from
-                       // exponent should to the trick.
-                       return (deInt32)(f.bits() - (1u << 23u));
-               }
-       }
-}
-
-static deUint32 computeFloatFlushRelaxedULPDiff (float a, float b)
-{
-       if (deIsNaN(a) && deIsNaN(b))
-               return 0;
-       else if (deIsNaN(a) || deIsNaN(b))
-       {
-               return 0xFFFFFFFFu;
-       }
-       else
-       {
-               // Using the "definition 5" in Muller, Jean-Michel. "On the definition of ulp (x)" (2005)
-               // assuming a floating point space is IEEE single precision floating point space without
-               // denormals (and signed zeros).
-               const deInt32 aIndex = getPositionOfIEEEFloatWithoutDenormals(a);
-               const deInt32 bIndex = getPositionOfIEEEFloatWithoutDenormals(b);
-               return (deUint32)de::abs(aIndex - bIndex);
-       }
-}
-
-static tcu::UVec4 computeFlushRelaxedULPDiff (const tcu::Vec4& a, const tcu::Vec4& b)
-{
-       return tcu::UVec4(computeFloatFlushRelaxedULPDiff(a.x(), b.x()),
-                                         computeFloatFlushRelaxedULPDiff(a.y(), b.y()),
-                                         computeFloatFlushRelaxedULPDiff(a.z(), b.z()),
-                                         computeFloatFlushRelaxedULPDiff(a.w(), b.w()));
-}
-
-/*--------------------------------------------------------------------*//*!
  * \brief Per-pixel threshold-based comparison
  *
  * This compare computes per-pixel differences between result and reference
@@ -462,8 +393,7 @@ static tcu::UVec4 computeFlushRelaxedULPDiff (const tcu::Vec4& a, const tcu::Vec
  *
  * This comparison uses ULP (units in last place) metric for computing the
  * difference between floating-point values and thus this function can
- * be used only for comparing floating-point texture data. In ULP calculation
- * the denormal numbers are allowed to be flushed to zero.
+ * be used only for comparing floating-point texture data.
  *
  * On failure error image is generated that shows where the failing pixels
  * are.
@@ -496,10 +426,17 @@ bool floatUlpThresholdCompare (TestLog& log, const char* imageSetName, const cha
                {
                        for (int x = 0; x < width; x++)
                        {
-                               const Vec4      refPix  = reference.getPixel(x, y, z);
-                               const Vec4      cmpPix  = result.getPixel(x, y, z);
-                               const UVec4     diff    = computeFlushRelaxedULPDiff(refPix, cmpPix);
-                               const bool      isOk    = boolAll(lessThanEqual(diff, threshold));
+                               Vec4    refPix          = reference.getPixel(x, y, z);
+                               Vec4    cmpPix          = result.getPixel(x, y, z);
+                               UVec4   refBits;
+                               UVec4   cmpBits;
+
+                               // memcpy() is the way to do float->uint32 reinterpretation.
+                               memcpy(refBits.getPtr(), refPix.getPtr(), 4*sizeof(deUint32));
+                               memcpy(cmpBits.getPtr(), cmpPix.getPtr(), 4*sizeof(deUint32));
+
+                               UVec4   diff            = abs(refBits.cast<int>() - cmpBits.cast<int>()).cast<deUint32>();
+                               bool    isOk            = boolAll(lessThanEqual(diff, threshold));
 
                                maxDiff = max(maxDiff, diff);
 
index 00ad997..1bac102 100644 (file)
@@ -1879,6 +1879,7 @@ public:
                const glu::DataType             type                    = m_spec.inputs[0].varType.getBasicType();
                const glu::Precision    precision               = m_spec.inputs[0].varType.getPrecision();
                const int                               scalarSize              = glu::getDataTypeScalarSize(type);
+               const bool                              signedZero              = supportsSignedZero(precision);
 
                const int                               mantissaBits    = getMinMantissaBits(precision);
                const deUint32                  maxUlpDiff              = getMaxUlpDiffFromBits(mantissaBits);
@@ -1889,7 +1890,7 @@ public:
                        const int               in1                     = ((const int*)inputs[1])[compNdx];
                        const float             out0            = ((const float*)outputs[0])[compNdx];
                        const float             refOut0         = ldexp(in0, in1);
-                       const deUint32  ulpDiff         = getUlpDiffIgnoreZeroSign(out0, refOut0);
+                       const deUint32  ulpDiff         = signedZero ? getUlpDiff(out0, refOut0) : getUlpDiffIgnoreZeroSign(out0, refOut0);
 
                        const int               inExp           = tcu::Float32(in0).exponent();
 
index 3dfef3b..5743788 100644 (file)
@@ -1322,12 +1322,6 @@ static bool verifyFractionalSpacingSingle (TestLog& log, SpacingMode spacingMode
                                        return false;
                                }
                        }
-                       else
-                       {
-                               // We have 2 segmentsA and 2 segmentsB, ensure segmentsB has the shorter lengths
-                               if (segmentsB[0].length > segmentsA[0].length)
-                                       std::swap(segmentsA, segmentsB);
-                       }
 
                        // Check that the additional segments are placed symmetrically.
                        if (segmentsB[0].index + segmentsB[1].index + 1 != (int)segments.size())
@@ -1344,8 +1338,8 @@ static bool verifyFractionalSpacingSingle (TestLog& log, SpacingMode spacingMode
                                additionalSegmentLocationDst = de::min(segmentsB[0].index, segmentsB[1].index);
                        else
                                additionalSegmentLocationDst = segmentsB[0].length < segmentsA[0].length - 0.001f ? de::min(segmentsB[0].index, segmentsB[1].index)
+                                                                                        : segmentsA[0].length < segmentsB[0].length - 0.001f ? de::min(segmentsA[0].index, segmentsA[1].index)
                                                                                         : -1; // \note -1 when can't reliably decide which ones are the additional segments, a or b.
-
                        return true;
                }
        }
index 74e6354..a35444c 100644 (file)
@@ -85,8 +85,8 @@ static inline int divRoundToZero (int a, int b)
 
 static void fillWithRandomColorTiles (const PixelBufferAccess& dst, const Vec4& minVal, const Vec4& maxVal, deUint32 seed)
 {
-       const int       numCols         = dst.getWidth()  >= 7 ? 7 : dst.getWidth();
-       const int       numRows         = dst.getHeight() >= 5 ? 5 : dst.getHeight();
+       const int       numCols         = 7;
+       const int       numRows         = 5;
        de::Random      rnd                     (seed);
 
        for (int slice = 0; slice < dst.getDepth(); slice++)
@@ -751,12 +751,6 @@ enum GatherType
        GATHERTYPE_LAST
 };
 
-enum GatherCaseFlags
-{
-       GATHERCASE_MIPMAP_INCOMPLETE            = (1<<0),       //!< Excercise special case of sampling mipmap-incomplete texture
-       GATHERCASE_DONT_SAMPLE_CUBE_CORNERS     = (1<<1)        //!< For cube map cases: do not sample cube corners
-};
-
 static inline const char* gatherTypeName (GatherType type)
 {
        switch (type)
@@ -956,7 +950,7 @@ public:
                                                                                                                                 tcu::Sampler::FilterMode       minFilter,
                                                                                                                                 tcu::Sampler::FilterMode       magFilter,
                                                                                                                                 int                                            baseLevel,
-                                                                                                                                deUint32                                       flags);
+                                                                                                                                bool                                           mipmapIncomplete);
 
        void                                                            init                                    (void);
        void                                                            deinit                                  (void);
@@ -988,7 +982,7 @@ protected:
        const tcu::Sampler::FilterMode          m_minFilter;
        const tcu::Sampler::FilterMode          m_magFilter;
        const int                                                       m_baseLevel;
-       const deUint32                                          m_flags;
+       const bool                                                      m_mipmapIncomplete;
 
 private:
        enum
@@ -1030,7 +1024,7 @@ TextureGatherCase::TextureGatherCase (Context&                                            context,
                                                                          tcu::Sampler::FilterMode              minFilter,
                                                                          tcu::Sampler::FilterMode              magFilter,
                                                                          int                                                   baseLevel,
-                                                                         deUint32                                              flags)
+                                                                         bool                                                  mipmapIncomplete)
        : TestCase                              (context, name, description)
        , m_gatherType                  (gatherType)
        , m_offsetSize                  (offsetSize)
@@ -1042,7 +1036,7 @@ TextureGatherCase::TextureGatherCase (Context&                                            context,
        , m_minFilter                   (minFilter)
        , m_magFilter                   (magFilter)
        , m_baseLevel                   (baseLevel)
-       , m_flags                               (flags)
+       , m_mipmapIncomplete    (mipmapIncomplete)
        , m_textureType                 (textureType)
        , m_colorBufferFormat   (tcu::TextureFormat(tcu::TextureFormat::RGBA,
                                                                                                isDepthFormat(textureFormat) ? tcu::TextureFormat::UNORM_INT8 : textureFormat.type))
@@ -1057,9 +1051,8 @@ TextureGatherCase::TextureGatherCase (Context&                                            context,
                          m_colorBufferFormat.type == tcu::TextureFormat::SIGNED_INT16);
        DE_ASSERT(glu::isGLInternalColorFormatFilterable(glu::getInternalFormat(m_colorBufferFormat)) ||
                          (m_magFilter == tcu::Sampler::NEAREST && (m_minFilter == tcu::Sampler::NEAREST || m_minFilter == tcu::Sampler::NEAREST_MIPMAP_NEAREST)));
-       DE_ASSERT(isMipmapFilter(m_minFilter) || !(m_flags & GATHERCASE_MIPMAP_INCOMPLETE));
-       DE_ASSERT(m_textureType == TEXTURETYPE_CUBE || !(m_flags & GATHERCASE_DONT_SAMPLE_CUBE_CORNERS));
-       DE_ASSERT(!((m_flags & GATHERCASE_MIPMAP_INCOMPLETE) && isDepthFormat(m_textureFormat))); // It's not clear what shadow textures should return when incomplete.
+       DE_ASSERT(isMipmapFilter(m_minFilter) || !m_mipmapIncomplete);
+       DE_ASSERT(!(m_mipmapIncomplete && isDepthFormat(m_textureFormat))); // It's not clear what shadow textures should return when incomplete.
 }
 
 IVec2 TextureGatherCase::getOffsetRange (void) const
@@ -1313,7 +1306,7 @@ void TextureGatherCase::init (void)
                << TestLog::Message << "Minification and magnification filter modes are "
                                                        << glu::getTextureFilterName(glu::getGLFilterMode(m_minFilter)) << " and "
                                                        << glu::getTextureFilterName(glu::getGLFilterMode(m_magFilter)) << ", respectively "
-                                                       << ((m_flags & GATHERCASE_MIPMAP_INCOMPLETE) ?
+                                                       << (m_mipmapIncomplete ?
                                                                "(note that they cause the texture to be incomplete)" :
                                                                "(note that they should have no effect on gather result)")
                                                        << TestLog::EndMessage
@@ -1455,7 +1448,7 @@ bool TextureGatherCase::verify (const ConstPixelBufferAccess&     rendered,
 {
        TestLog& log = m_testCtx.getLog();
 
-       if (m_flags & GATHERCASE_MIPMAP_INCOMPLETE)
+       if (m_mipmapIncomplete)
        {
                const int       componentNdx            = de::max(0, gatherArgs.componentNdx);
                const Vec4      incompleteColor         (0.0f, 0.0f, 0.0f, 1.0f);
@@ -1630,9 +1623,9 @@ public:
                                                 tcu::Sampler::FilterMode       minFilter,
                                                 tcu::Sampler::FilterMode       magFilter,
                                                 int                                            baseLevel,
-                                                deUint32                                       flags,
+                                                bool                                           mipmapIncomplete,
                                                 const IVec2&                           textureSize)
-               : TextureGatherCase             (context, name, description, TEXTURETYPE_2D, gatherType, offsetSize, textureFormat, shadowCompareMode, wrapS, wrapT, texSwizzle, minFilter, magFilter, baseLevel, flags)
+               : TextureGatherCase             (context, name, description, TEXTURETYPE_2D, gatherType, offsetSize, textureFormat, shadowCompareMode, wrapS, wrapT, texSwizzle, minFilter, magFilter, baseLevel, mipmapIncomplete)
                , m_textureSize                 (textureSize)
                , m_swizzledTexture             (tcu::TextureFormat(), 1, 1)
        {
@@ -1678,7 +1671,7 @@ void TextureGather2DCase::createAndUploadTexture (void)
        {
                tcu::Texture2D&         refTexture      = m_texture->getRefTexture();
                const int                       levelBegin      = m_baseLevel;
-               const int                       levelEnd        = isMipmapFilter(m_minFilter) && !(m_flags & GATHERCASE_MIPMAP_INCOMPLETE) ? refTexture.getNumLevels() : m_baseLevel+1;
+               const int                       levelEnd        = isMipmapFilter(m_minFilter) && !m_mipmapIncomplete ? refTexture.getNumLevels() : m_baseLevel+1;
                DE_ASSERT(m_baseLevel < refTexture.getNumLevels());
 
                for (int levelNdx = levelBegin; levelNdx < levelEnd; levelNdx++)
@@ -1720,9 +1713,9 @@ public:
                                                          tcu::Sampler::FilterMode              minFilter,
                                                          tcu::Sampler::FilterMode              magFilter,
                                                          int                                                   baseLevel,
-                                                         deUint32                                              flags,
+                                                         bool                                                  mipmapIncomplete,
                                                          const IVec3&                                  textureSize)
-               : TextureGatherCase             (context, name, description, TEXTURETYPE_2D_ARRAY, gatherType, offsetSize, textureFormat, shadowCompareMode, wrapS, wrapT, texSwizzle, minFilter, magFilter, baseLevel, flags)
+               : TextureGatherCase             (context, name, description, TEXTURETYPE_2D_ARRAY, gatherType, offsetSize, textureFormat, shadowCompareMode, wrapS, wrapT, texSwizzle, minFilter, magFilter, baseLevel, mipmapIncomplete)
                , m_textureSize                 (textureSize)
                , m_swizzledTexture             (tcu::TextureFormat(), 1, 1, 1)
        {
@@ -1805,7 +1798,7 @@ void TextureGather2DArrayCase::createAndUploadTexture (void)
        {
                tcu::Texture2DArray&    refTexture      = m_texture->getRefTexture();
                const int                               levelBegin      = m_baseLevel;
-               const int                               levelEnd        = isMipmapFilter(m_minFilter) && !(m_flags & GATHERCASE_MIPMAP_INCOMPLETE) ? refTexture.getNumLevels() : m_baseLevel+1;
+               const int                               levelEnd        = isMipmapFilter(m_minFilter) && !m_mipmapIncomplete ? refTexture.getNumLevels() : m_baseLevel+1;
                DE_ASSERT(m_baseLevel < refTexture.getNumLevels());
 
                for (int levelNdx = levelBegin; levelNdx < levelEnd; levelNdx++)
@@ -1852,9 +1845,9 @@ public:
                                                   tcu::Sampler::FilterMode             minFilter,
                                                   tcu::Sampler::FilterMode             magFilter,
                                                   int                                                  baseLevel,
-                                                  deUint32                                             flags,
+                                                  bool                                                 mipmapIncomplete,
                                                   int                                                  textureSize)
-               : TextureGatherCase             (context, name, description, TEXTURETYPE_CUBE, GATHERTYPE_BASIC, OFFSETSIZE_NONE, textureFormat, shadowCompareMode, wrapS, wrapT, texSwizzle, minFilter, magFilter, baseLevel, flags)
+               : TextureGatherCase             (context, name, description, TEXTURETYPE_CUBE, GATHERTYPE_BASIC, OFFSETSIZE_NONE, textureFormat, shadowCompareMode, wrapS, wrapT, texSwizzle, minFilter, magFilter, baseLevel, mipmapIncomplete)
                , m_textureSize                 (textureSize)
                , m_swizzledTexture             (tcu::TextureFormat(), 1)
        {
@@ -1884,11 +1877,8 @@ private:
 
 vector<float> TextureGatherCubeCase::computeQuadTexCoord (int iterationNdx) const
 {
-       const bool              corners = (m_flags & GATHERCASE_DONT_SAMPLE_CUBE_CORNERS) == 0;
-       const Vec2              minC    = corners ? Vec2(-1.2f) : Vec2(-0.6f, -1.2f);
-       const Vec2              maxC    = corners ? Vec2( 1.2f) : Vec2( 0.6f,  1.2f);
-       vector<float>   res;
-       gls::TextureTestUtil::computeQuadTexCoordCube(res, m_iterations[iterationNdx].face, minC, maxC);
+       vector<float> res;
+       gls::TextureTestUtil::computeQuadTexCoordCube(res, m_iterations[iterationNdx].face, Vec2(-1.2f), Vec2(1.2f));
        return res;
 }
 
@@ -1941,7 +1931,7 @@ void TextureGatherCubeCase::createAndUploadTexture (void)
        {
                tcu::TextureCube&       refTexture      = m_texture->getRefTexture();
                const int                       levelBegin      = m_baseLevel;
-               const int                       levelEnd        = isMipmapFilter(m_minFilter) && !(m_flags & GATHERCASE_MIPMAP_INCOMPLETE) ? refTexture.getNumLevels() : m_baseLevel+1;
+               const int                       levelEnd        = isMipmapFilter(m_minFilter) && !m_mipmapIncomplete ? refTexture.getNumLevels() : m_baseLevel+1;
                DE_ASSERT(m_baseLevel < refTexture.getNumLevels());
 
                for (int levelNdx = levelBegin; levelNdx < levelEnd; levelNdx++)
@@ -1993,23 +1983,23 @@ static inline TextureGatherCase* makeTextureGatherCase (TextureType                                     textureT
                                                                                                                tcu::Sampler::FilterMode        magFilter,
                                                                                                                int                                                     baseLevel,
                                                                                                                const IVec3&                            textureSize,
-                                                                                                               deUint32                                        flags = 0)
+                                                                                                               bool                                            mipmapIncomplete = false)
 {
        switch (textureType)
        {
                case TEXTURETYPE_2D:
                        return new TextureGather2DCase(context, name, description, gatherType, offsetSize, textureFormat, shadowCompareMode,
-                                                                                  wrapS, wrapT, texSwizzle, minFilter, magFilter, baseLevel, flags, textureSize.swizzle(0, 1));
+                                                                                  wrapS, wrapT, texSwizzle, minFilter, magFilter, baseLevel, mipmapIncomplete, textureSize.swizzle(0, 1));
 
                case TEXTURETYPE_2D_ARRAY:
                        return new TextureGather2DArrayCase(context, name, description, gatherType, offsetSize, textureFormat, shadowCompareMode,
-                                                                                               wrapS, wrapT, texSwizzle, minFilter, magFilter, baseLevel, flags, textureSize);
+                                                                                               wrapS, wrapT, texSwizzle, minFilter, magFilter, baseLevel, mipmapIncomplete, textureSize);
 
                case TEXTURETYPE_CUBE:
                        DE_ASSERT(gatherType == GATHERTYPE_BASIC);
                        DE_ASSERT(offsetSize == OFFSETSIZE_NONE);
                        return new TextureGatherCubeCase(context, name, description, textureFormat, shadowCompareMode,
-                                                                                        wrapS, wrapT, texSwizzle, minFilter, magFilter, baseLevel, flags, textureSize.x());
+                                                                                        wrapS, wrapT, texSwizzle, minFilter, magFilter, baseLevel, mipmapIncomplete, textureSize.x());
 
                default:
                        DE_ASSERT(false);
@@ -2126,55 +2116,43 @@ void TextureGatherTests::init (void)
                                        TestCaseGroup* const            formatGroup             = new TestCaseGroup(m_context, formats[formatNdx].name, "");
                                        textureTypeGroup->addChild(formatGroup);
 
-                                       for (int noCornersI = 0; noCornersI <= (textureType == TEXTURETYPE_CUBE)?1:0; noCornersI++)
+                                       for (int textureSizeNdx = 0; textureSizeNdx < DE_LENGTH_OF_ARRAY(textureSizes); textureSizeNdx++)
                                        {
-                                               const bool                              noCorners               = noCornersI!= 0;
-                                               TestCaseGroup* const    cornersGroup    = noCorners
-                                                                                                                               ? new TestCaseGroup(m_context, "no_corners", "Test case variants that don't sample around cube map corners")
-                                                                                                                               : formatGroup;
-
-                                               if (formatGroup != cornersGroup)
-                                                       formatGroup->addChild(cornersGroup);
+                                               const IVec3&                    textureSize                     = textureSizes[textureSizeNdx].size;
+                                               TestCaseGroup* const    textureSizeGroup        = new TestCaseGroup(m_context, textureSizes[textureSizeNdx].name, "");
+                                               formatGroup->addChild(textureSizeGroup);
 
-                                               for (int textureSizeNdx = 0; textureSizeNdx < DE_LENGTH_OF_ARRAY(textureSizes); textureSizeNdx++)
+                                               for (int compareModeI = 0; compareModeI < tcu::Sampler::COMPAREMODE_LAST; compareModeI++)
                                                {
-                                                       const IVec3&                    textureSize                     = textureSizes[textureSizeNdx].size;
-                                                       TestCaseGroup* const    textureSizeGroup        = new TestCaseGroup(m_context, textureSizes[textureSizeNdx].name, "");
-                                                       cornersGroup->addChild(textureSizeGroup);
-
-                                                       for (int compareModeI = 0; compareModeI < tcu::Sampler::COMPAREMODE_LAST; compareModeI++)
-                                                       {
-                                                               const tcu::Sampler::CompareMode compareMode = (tcu::Sampler::CompareMode)compareModeI;
+                                                       const tcu::Sampler::CompareMode compareMode = (tcu::Sampler::CompareMode)compareModeI;
 
-                                                               if ((compareMode != tcu::Sampler::COMPAREMODE_NONE) != isDepthFormat(format))
-                                                                       continue;
+                                                       if ((compareMode != tcu::Sampler::COMPAREMODE_NONE) != isDepthFormat(format))
+                                                               continue;
 
-                                                               if (compareMode != tcu::Sampler::COMPAREMODE_NONE &&
-                                                                       compareMode != tcu::Sampler::COMPAREMODE_LESS &&
-                                                                       compareMode != tcu::Sampler::COMPAREMODE_GREATER)
-                                                                       continue;
+                                                       if (compareMode != tcu::Sampler::COMPAREMODE_NONE &&
+                                                               compareMode != tcu::Sampler::COMPAREMODE_LESS &&
+                                                               compareMode != tcu::Sampler::COMPAREMODE_GREATER)
+                                                               continue;
 
-                                                               TestCaseGroup* const compareModeGroup = compareMode == tcu::Sampler::COMPAREMODE_NONE ?
-                                                                                                                                                       textureSizeGroup :
-                                                                                                                                                       new TestCaseGroup(m_context,
-                                                                                                                                                                                         (string() + "compare_" + compareModeName(compareMode)).c_str(),
-                                                                                                                                                                                         "");
-                                                               if (compareModeGroup != textureSizeGroup)
-                                                                       textureSizeGroup->addChild(compareModeGroup);
+                                                       TestCaseGroup* const compareModeGroup = compareMode == tcu::Sampler::COMPAREMODE_NONE ?
+                                                                                                                                               textureSizeGroup :
+                                                                                                                                               new TestCaseGroup(m_context,
+                                                                                                                                                                                 (string() + "compare_" + compareModeName(compareMode)).c_str(),
+                                                                                                                                                                                 "");
+                                                       if (compareModeGroup != textureSizeGroup)
+                                                               textureSizeGroup->addChild(compareModeGroup);
 
-                                                               for (int wrapCaseNdx = 0; wrapCaseNdx < DE_LENGTH_OF_ARRAY(wrapModes); wrapCaseNdx++)
-                                                               {
-                                                                       const int                                               wrapSNdx        = wrapCaseNdx;
-                                                                       const int                                               wrapTNdx        = (wrapCaseNdx + 1) % DE_LENGTH_OF_ARRAY(wrapModes);
-                                                                       const tcu::Sampler::WrapMode    wrapS           = wrapModes[wrapSNdx].mode;
-                                                                       const tcu::Sampler::WrapMode    wrapT           = wrapModes[wrapTNdx].mode;
+                                                       for (int wrapCaseNdx = 0; wrapCaseNdx < DE_LENGTH_OF_ARRAY(wrapModes); wrapCaseNdx++)
+                                                       {
+                                                               const int                                               wrapSNdx        = wrapCaseNdx;
+                                                               const int                                               wrapTNdx        = (wrapCaseNdx + 1) % DE_LENGTH_OF_ARRAY(wrapModes);
+                                                               const tcu::Sampler::WrapMode    wrapS           = wrapModes[wrapSNdx].mode;
+                                                               const tcu::Sampler::WrapMode    wrapT           = wrapModes[wrapTNdx].mode;
 
-                                                                       const string caseName = string() + wrapModes[wrapSNdx].name + "_" + wrapModes[wrapTNdx].name;
+                                                               const string caseName = string() + wrapModes[wrapSNdx].name + "_" + wrapModes[wrapTNdx].name;
 
-                                                                       compareModeGroup->addChild(makeTextureGatherCase(textureType, m_context, caseName.c_str(), "", gatherType, offsetSize, format, compareMode, wrapS, wrapT,
-                                                                                                                                                                        MaybeTextureSwizzle::createNoneTextureSwizzle(), tcu::Sampler::NEAREST, tcu::Sampler::NEAREST, 0, textureSize,
-                                                                                                                                                                        noCorners ? GATHERCASE_DONT_SAMPLE_CUBE_CORNERS : 0));
-                                                               }
+                                                               compareModeGroup->addChild(makeTextureGatherCase(textureType, m_context, caseName.c_str(), "", gatherType, offsetSize, format, compareMode, wrapS, wrapT,
+                                                                                                                                                                MaybeTextureSwizzle::createNoneTextureSwizzle(), tcu::Sampler::NEAREST, tcu::Sampler::NEAREST, 0, textureSize));
                                                        }
                                                }
                                        }
@@ -2277,7 +2255,7 @@ void TextureGatherTests::init (void)
                                                        incompleteGroup->addChild(makeTextureGatherCase(textureType, m_context, "mipmap_incomplete", "", gatherType, offsetSize, format,
                                                                                                                                                        compareMode, tcu::Sampler::REPEAT_GL, tcu::Sampler::REPEAT_GL,
                                                                                                                                                        MaybeTextureSwizzle::createNoneTextureSwizzle(), tcu::Sampler::NEAREST_MIPMAP_NEAREST, tcu::Sampler::NEAREST,
-                                                                                                                                                       0, IVec3(64, 64, 3), GATHERCASE_MIPMAP_INCOMPLETE));
+                                                                                                                                                       0, IVec3(64, 64, 3), true /* Mipmap-incomplete */));
                                                }
                                        }
                                }