Merge "Fail call log code generation if method had zero matching outputs."
authorJarkko Pöyry <jpoyry@google.com>
Wed, 25 Feb 2015 22:08:25 +0000 (22:08 +0000)
committerAndroid (Google) Code Review <android-gerrit@google.com>
Wed, 25 Feb 2015 22:08:25 +0000 (22:08 +0000)
59 files changed:
CMakeLists.txt
android/cts/es30-lmp-mr1.txt
framework/common/tcuEither.cpp
framework/common/tcuVectorUtil.hpp
framework/delibs/scripts/git-check.py [deleted file]
framework/opengl/gluTextureUtil.cpp
framework/opengl/gluTextureUtil.hpp
framework/referencerenderer/rrFragmentOperations.cpp
framework/referencerenderer/rrRasterizer.cpp
modules/egl/teglImageTests.cpp
modules/egl/teglQuerySurfaceTests.cpp
modules/egl/teglResizeTests.cpp
modules/egl/teglTestPackage.cpp
modules/egl/teglTestPackage.hpp
modules/gles2/accuracy/es2aTextureFilteringTests.cpp
modules/gles2/accuracy/es2aTextureMipmapTests.cpp
modules/gles2/accuracy/es2aVaryingInterpolationTests.cpp
modules/gles2/functional/es2fClippingTests.cpp
modules/gles2/functional/es2fTextureCompletenessTests.cpp
modules/gles2/functional/es2fTextureFilteringTests.cpp
modules/gles2/functional/es2fTextureFormatTests.cpp
modules/gles2/functional/es2fTextureMipmapTests.cpp
modules/gles2/functional/es2fTextureSizeTests.cpp
modules/gles2/functional/es2fTextureSpecificationTests.cpp
modules/gles2/functional/es2fTextureWrapTests.cpp
modules/gles3/accuracy/es3aTextureFilteringTests.cpp
modules/gles3/accuracy/es3aTextureMipmapTests.cpp
modules/gles3/accuracy/es3aVaryingInterpolationTests.cpp
modules/gles3/functional/es3fASTCDecompressionCases.cpp
modules/gles3/functional/es3fClippingTests.cpp
modules/gles3/functional/es3fDrawTests.cpp
modules/gles3/functional/es3fTextureFilteringTests.cpp
modules/gles3/functional/es3fTextureFormatTests.cpp
modules/gles3/functional/es3fTextureMipmapTests.cpp
modules/gles3/functional/es3fTextureShadowTests.cpp
modules/gles3/functional/es3fTextureSizeTests.cpp
modules/gles3/functional/es3fTextureSwizzleTests.cpp
modules/gles3/functional/es3fTextureWrapTests.cpp
modules/gles31/functional/es31fCopyImageTests.cpp
modules/gles31/functional/es31fDrawTests.cpp
modules/gles31/functional/es31fGeometryShaderTests.cpp
modules/gles31/functional/es31fShaderImageLoadStoreTests.cpp
modules/gles31/functional/es31fTessellationTests.cpp
modules/gles31/functional/es31fTextureFilteringTests.cpp
modules/gles31/functional/es31fTextureFormatTests.cpp
modules/gles31/functional/es31fTextureGatherTests.cpp
modules/gles31/functional/es31fVertexAttributeBindingTests.cpp
modules/gles31/stress/es31sVertexAttributeBindingTests.cpp
modules/glshared/glsRasterizationTestUtil.cpp
modules/glshared/glsTextureBufferCase.cpp
modules/glshared/glsTextureTestUtil.cpp
modules/glshared/glsTextureTestUtil.hpp
scripts/check_redundant_include_guards.py [deleted file]
scripts/src_util/check_all.py [new file with mode: 0644]
scripts/src_util/check_include_guards.py [moved from scripts/check_include_guards.py with 92% similarity]
scripts/src_util/check_whitespace.py [new file with mode: 0644]
scripts/src_util/common.py [new file with mode: 0644]
scripts/src_util/pre_commit.py [moved from framework/delibs/scripts/pre_commit.py with 100% similarity]
scripts/update-copyright-year.py [moved from framework/delibs/scripts/update-copyright-year.py with 100% similarity]

index 4df4f6a..9760d72 100644 (file)
@@ -30,6 +30,9 @@ set(DEQP_VG_LIBRARIES         )                               # VG libraries
 set(DEQP_SUPPORT_EGL           OFF)                    # Is EGL supported
 set(DEQP_EGL_LIBRARIES         )                               # EGL libraries
 
+set(DEQP_SUPPORT_GLX           OFF)                    # Is GLX supported
+set(DEQP_SUPPORT_WGL           OFF)                    # Is WGL supported
+
 set(DEQP_PLATFORM_LIBRARIES    )                               # Other platform libraries
 
 set(DEQP_SUPPORT_OPENGL                OFF)                    # Is OpenGL supported on platform
@@ -87,6 +90,8 @@ message(STATUS "DEQP_SUPPORT_EGL        = ${DEQP_SUPPORT_EGL}")
 message(STATUS "DEQP_EGL_LIBRARIES      = ${DEQP_EGL_LIBRARIES}")
 message(STATUS "DEQP_SUPPORT_OPENGL     = ${DEQP_SUPPORT_OPENGL}")
 message(STATUS "DEQP_PLATFORM_LIBRARIES = ${DEQP_PLATFORM_LIBRARIES}")
+message(STATUS "DEQP_SUPPORT_WGL        = ${DEQP_SUPPORT_WGL}")
+message(STATUS "DEQP_SUPPORT_GLX        = ${DEQP_SUPPORT_GLX}")
 
 # Defines
 add_definitions(-DDEQP_TARGET_NAME="${DEQP_TARGET_NAME}")
index 69decbe..f4ba082 100644 (file)
@@ -33499,11 +33499,9 @@ dEQP-GLES3.functional.rasterization.culling.both_triangle_fan_reverse
 dEQP-GLES3.functional.rasterization.interpolation.basic.triangles
 dEQP-GLES3.functional.rasterization.interpolation.basic.triangle_strip
 dEQP-GLES3.functional.rasterization.interpolation.basic.triangle_fan
-dEQP-GLES3.functional.rasterization.interpolation.basic.line_loop
 dEQP-GLES3.functional.rasterization.interpolation.projected.triangles
 dEQP-GLES3.functional.rasterization.interpolation.projected.triangle_strip
 dEQP-GLES3.functional.rasterization.interpolation.projected.triangle_fan
-dEQP-GLES3.functional.rasterization.interpolation.projected.line_strip
 dEQP-GLES3.functional.rasterization.flatshading.triangles
 dEQP-GLES3.functional.rasterization.flatshading.triangle_strip
 dEQP-GLES3.functional.rasterization.flatshading.triangle_fan
index 64b9737..c640ded 100644 (file)
@@ -280,8 +280,7 @@ void Either_selfTest (void)
                Either<int, TestClassWithConstructor>           either          (intValue);
                const Either<int, TestClassWithConstructor>     otherEither     (testObject);
 
-
-               either = testObject;
+               either = otherEither;
 
                TCU_CHECK(!either.isFirst());
                TCU_CHECK(either.isSecond());
index 00ca7ec..de17642 100644 (file)
@@ -194,7 +194,6 @@ inline Vector<T, Size> reflect (const Vector<T, Size>& i, const Vector<T, Size>&
 template <typename T, int Size>
 inline Vector<T, Size> refract (const Vector<T, Size>& i, const Vector<T, Size>& n, T eta)
 {
-       Vector<T, Size> res;
        T cosAngle = dot(n, i);
        T k = T(1) - eta * eta * (T(1) - cosAngle * cosAngle);
        if (k < T(0))
diff --git a/framework/delibs/scripts/git-check.py b/framework/delibs/scripts/git-check.py
deleted file mode 100644 (file)
index 86ddccc..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-# Script for checking which projects have unsubmitted modifications in them.
-#
-# Usage:
-# - recommended to add a alias/bat/sh for a shorter command
-# - running without parameters will check any existing known dE projects.
-# - can give projects names on command line, if only wish to check a sub-set
-#   e.g., git-check.py delibs deqp
-
-import os
-import sys
-
-COMMANDS       = ["pull", "push", "check"]
-ALL_REPOS      = ["delibs", "deqp", "movies", "domeni", "demisc"]
-
-# Defaults.
-command = "check"
-repos  = ALL_REPOS
-
-# Parse command line.
-numArgs = len(sys.argv)
-if (numArgs == 1):
-       pass
-else:
-       if (sys.argv[1] in COMMANDS):
-               command = sys.argv[1]
-               if (numArgs > 2):
-                       repos = sys.argv[2:]
-       else:
-               repos = sys.argv[1:]
-
-def findRepo(x):
-       for repo in ALL_REPOS:
-               if repo.startswith(x):
-                       return repo
-       print "%s not a valid repository directory" % x
-       sys.exit(1)
-
-repoDirs = [findRepo(x) for x in repos]
-
-# Find git base repo directory.
-oldDir         = os.getcwd()
-baseDir        = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), "../.."))
-foundAny       = False
-
-# Execute the command.
-print "## Executing '%s' on repos: %s" % (command.upper(), ", ".join(repoDirs))
-print ""
-
-for gitDir in repoDirs:
-       subDir = os.path.join(baseDir, gitDir)
-       if os.path.exists(subDir):
-               foundAny = True
-               print "***** Check directory '%s' *****" % subDir
-               os.chdir(subDir)
-               if command == "check":
-                       os.system("git status")
-                       os.system("git push --dry-run")
-               elif command == "push":
-                       os.system("git push")
-               elif command == "pull":
-                       os.system("git pull")
-               else:
-                       assert False
-               print ""
-
-if not foundAny:
-       print "No subdirs found -- tried %s" % repoDirs
-       print "Searching in '%s'" % baseDir
-
-os.chdir(oldDir)
index 7a0ef98..777f7b3 100644 (file)
@@ -333,6 +333,56 @@ tcu::CompressedTexFormat mapGLCompressedTexFormat (deUint32 format)
        }
 }
 
+bool isCompressedFormat (deUint32 internalFormat)
+{
+       switch (internalFormat)
+       {
+               case GL_ETC1_RGB8_OES:
+               case GL_COMPRESSED_R11_EAC:
+               case GL_COMPRESSED_SIGNED_R11_EAC:
+               case GL_COMPRESSED_RG11_EAC:
+               case GL_COMPRESSED_SIGNED_RG11_EAC:
+               case GL_COMPRESSED_RGB8_ETC2:
+               case GL_COMPRESSED_SRGB8_ETC2:
+               case GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:
+               case GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:
+               case GL_COMPRESSED_RGBA8_ETC2_EAC:
+               case GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:
+               case GL_COMPRESSED_RGBA_ASTC_4x4_KHR:
+               case GL_COMPRESSED_RGBA_ASTC_5x4_KHR:
+               case GL_COMPRESSED_RGBA_ASTC_5x5_KHR:
+               case GL_COMPRESSED_RGBA_ASTC_6x5_KHR:
+               case GL_COMPRESSED_RGBA_ASTC_6x6_KHR:
+               case GL_COMPRESSED_RGBA_ASTC_8x5_KHR:
+               case GL_COMPRESSED_RGBA_ASTC_8x6_KHR:
+               case GL_COMPRESSED_RGBA_ASTC_8x8_KHR:
+               case GL_COMPRESSED_RGBA_ASTC_10x5_KHR:
+               case GL_COMPRESSED_RGBA_ASTC_10x6_KHR:
+               case GL_COMPRESSED_RGBA_ASTC_10x8_KHR:
+               case GL_COMPRESSED_RGBA_ASTC_10x10_KHR:
+               case GL_COMPRESSED_RGBA_ASTC_12x10_KHR:
+               case GL_COMPRESSED_RGBA_ASTC_12x12_KHR:
+               case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:
+               case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:
+               case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:
+               case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:
+               case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:
+               case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:
+               case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:
+               case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:
+               case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:
+               case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:
+               case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:
+               case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:
+               case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:
+               case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:
+                       return true;
+
+               default:
+                       return false;
+       }
+}
+
 static tcu::TextureFormat::ChannelType mapGLChannelType (deUint32 dataType, bool normalized)
 {
        // \note Normalized bit is ignored where it doesn't apply.
@@ -563,7 +613,7 @@ static inline tcu::Sampler::WrapMode mapGLWrapMode (deUint32 wrapMode)
        }
 }
 
-static inline tcu::Sampler::FilterMode mapGLFilterMode (deUint32 filterMode)
+static inline tcu::Sampler::FilterMode mapGLMinFilterMode (deUint32 filterMode)
 {
        switch (filterMode)
        {
@@ -574,7 +624,18 @@ static inline tcu::Sampler::FilterMode mapGLFilterMode (deUint32 filterMode)
                case GL_LINEAR_MIPMAP_NEAREST:  return tcu::Sampler::LINEAR_MIPMAP_NEAREST;
                case GL_LINEAR_MIPMAP_LINEAR:   return tcu::Sampler::LINEAR_MIPMAP_LINEAR;
                default:
-                       throw tcu::InternalError("Can't map GL filter mode" + tcu::toHex(filterMode).toString());
+                       throw tcu::InternalError("Can't map GL min filter mode" + tcu::toHex(filterMode).toString());
+       }
+}
+
+static inline tcu::Sampler::FilterMode mapGLMagFilterMode (deUint32 filterMode)
+{
+       switch (filterMode)
+       {
+               case GL_NEAREST:                                return tcu::Sampler::NEAREST;
+               case GL_LINEAR:                                 return tcu::Sampler::LINEAR;
+               default:
+                       throw tcu::InternalError("Can't map GL mag filter mode" + tcu::toHex(filterMode).toString());
        }
 }
 
@@ -625,7 +686,7 @@ tcu::Sampler mapGLSampler (deUint32 wrapS, deUint32 wrapT, deUint32 minFilter, d
 tcu::Sampler mapGLSampler (deUint32 wrapS, deUint32 wrapT, deUint32 wrapR, deUint32 minFilter, deUint32 magFilter)
 {
        return tcu::Sampler(mapGLWrapMode(wrapS), mapGLWrapMode(wrapT), mapGLWrapMode(wrapR),
-                                               mapGLFilterMode(minFilter), mapGLFilterMode(magFilter),
+                                               mapGLMinFilterMode(minFilter), mapGLMagFilterMode(magFilter),
                                                0.0f /* lod threshold */,
                                                true /* normalized coords */,
                                                tcu::Sampler::COMPAREMODE_NONE /* no compare */,
index c1cc6c8..9ce102e 100644 (file)
@@ -84,6 +84,7 @@ DataType                                              getSampler3DType                                        (tcu::TextureFormat format);
 DataType                                               getSamplerCubeArrayType                         (tcu::TextureFormat format);
 
 bool                                                   isSizedFormatColorRenderable            (const RenderContext& renderCtx, const ContextInfo& contextInfo, deUint32 sizedFormat);
+bool                                                   isCompressedFormat                                      (deUint32 internalFormat);
 
 } // glu
 
index 8113fbc..b8451e6 100644 (file)
@@ -672,7 +672,6 @@ void FragmentProcessor::executeRGBA8ColorWrite (int fragNdxOffset, int numSample
                {
                        const int                       fragSampleNdx   = regSampleNdx % numSamplesPerFragment;
                        const Fragment&         frag                    = inputFragments[fragNdxOffset + regSampleNdx/numSamplesPerFragment];
-                       Vec4                            combinedColor;
                        deUint8*                        dstPtr                  = basePtr + fragSampleNdx*fragStride + frag.pixelCoord.x()*xStride + frag.pixelCoord.y()*yStride;
 
                        dstPtr[0] = tcu::floatToU8(m_sampleRegister[regSampleNdx].blendedRGB.x());
index db222f6..53d3ecc 100644 (file)
@@ -876,7 +876,6 @@ void SingleSampleLineRasterizer::init (const tcu::Vec4& v0, const tcu::Vec4& v1,
        // Bounding box \note: with wide lines, the line is actually moved as in the spec
        const deInt32                                   lineWidthPixels = (lineWidth > 1.0f) ? (deInt32)floor(lineWidth + 0.5f) : 1;
 
-       const tcu::IVec2                                minorDirection  = (isXMajor ? tcu::IVec2(0, 1) : tcu::IVec2(1, 0));
        const tcu::Vector<deInt64,2>    widthOffset             = (isXMajor ? tcu::Vector<deInt64,2>(0, -1) : tcu::Vector<deInt64,2>(-1, 0)) * (toSubpixelCoord(lineWidthPixels - 1) / 2);
 
        const deInt64                                   x0                              = toSubpixelCoord(v0.x()) + widthOffset.x();
index 4cabdd3..b6ef160 100644 (file)
@@ -373,7 +373,6 @@ public:
 
 private:
        UniquePtr<ImageSource>  m_source;
-       EGLint                                  m_target;
 };
 
 class ImageTargetGLES2 : public ImageTestCase
index a31ca05..3db27f5 100644 (file)
@@ -40,7 +40,6 @@
 #include "tcuCommandLine.hpp"
 
 #include "deUniquePtr.hpp"
-#include "deRandom.hpp"
 
 #include <string>
 #include <vector>
@@ -476,7 +475,6 @@ void SurfaceAttribCase::testAttributes (EGLDisplay display, EGLSurface surface,
        const Library&          egl             = m_eglTestCtx.getLibrary();
        tcu::TestLog&           log             = m_testCtx.getLog();
        const eglu::Version     version = eglu::getVersion(egl, display);
-       de::Random                      rnd             (deStringHash(m_name.c_str()) ^ 0xf215918f);
 
        if (version.getMajor() == 1 && version.getMinor() == 0)
        {
index 81ba71b..4e829a6 100644 (file)
@@ -349,8 +349,6 @@ IVec2 checkSurfaceSize (const Library&              egl,
 IterateResult ChangeSurfaceSizeCase::iterate (void)
 {
        const Library&                  egl                     = m_eglTestCtx.getLibrary();
-       Surface                                 oldSurface;
-       Surface                                 newSurface;
        ScopedCurrentContext    currentCtx      (egl, m_display, **m_surface, **m_surface, **m_context);
        IVec2                                   oldEglSize      = checkSurfaceSize(egl,
                                                                                                                   m_display,
@@ -454,7 +452,9 @@ IvVec2 ivVec2 (const IVec2& vec)
 
 Interval approximateInt (int i)
 {
-       return (Interval(i) + Interval(-1.0, 1.0)) & Interval(0.0, TCU_INFINITY);
+       const Interval margin(-1.0, 1.0); // The resolution may be rounded
+
+       return (Interval(i) + margin) & Interval(0.0, TCU_INFINITY);
 }
 
 IvVec2 UpdateResolutionCase::getNativePixelsPerInch    (void)
@@ -464,7 +464,6 @@ IvVec2 UpdateResolutionCase::getNativePixelsPerInch (void)
        const IVec2             bufSize         = eglu::getSurfaceSize(egl, m_display, **m_surface);
        const IVec2             winSize         = m_nativeWindow->getScreenSize();
        const IVec2             bufPp10km       = eglu::getSurfaceResolution(egl, m_display, **m_surface);
-       const Interval  margin          (-1.0, 1.0); // The resolution may be rounded
        const IvVec2    bufPpiI         = (IvVec2(approximateInt(bufPp10km.x()),
                                                                                  approximateInt(bufPp10km.y()))
                                                                   / Interval(inchPer10km));
index 90fbe08..461c137 100644 (file)
@@ -128,8 +128,7 @@ public:
 };
 
 TestCaseWrapper::TestCaseWrapper (EglTestContext& eglTestCtx)
-       : tcu::TestCaseWrapper  (eglTestCtx.getTestContext())
-       , m_eglTestCtx                  (eglTestCtx)
+       : tcu::TestCaseWrapper(eglTestCtx.getTestContext())
 {
 }
 
index 8f0fd63..a6b1073 100644 (file)
@@ -43,9 +43,6 @@ public:
        bool                                                    deinitTestCase                  (tcu::TestCase* testCase);
 
        tcu::TestNode::IterateResult    iterateTestCase                 (tcu::TestCase* testCase);
-
-private:
-       EglTestContext&                                 m_eglTestCtx;
 };
 
 class PackageContext
index 2321491..03d7689 100644 (file)
@@ -97,7 +97,7 @@ Texture2DFilteringCase::Texture2DFilteringCase (tcu::TestContext& testCtx, glu::
        , m_dataType            (dataType)
        , m_width                       (width)
        , m_height                      (height)
-       , m_renderer            (renderCtx, testCtx, glu::GLSL_VERSION_100_ES, glu::PRECISION_MEDIUMP)
+       , m_renderer            (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_100_ES, glu::PRECISION_MEDIUMP)
 {
 }
 
@@ -114,7 +114,7 @@ Texture2DFilteringCase::Texture2DFilteringCase (tcu::TestContext& testCtx, glu::
        , m_width                       (0)
        , m_height                      (0)
        , m_filenames           (filenames)
-       , m_renderer            (renderCtx, testCtx, glu::GLSL_VERSION_100_ES, glu::PRECISION_MEDIUMP)
+       , m_renderer            (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_100_ES, glu::PRECISION_MEDIUMP)
 {
 }
 
@@ -358,7 +358,7 @@ TextureCubeFilteringCase::TextureCubeFilteringCase (tcu::TestContext& testCtx, g
        , m_dataType                            (dataType)
        , m_width                                       (width)
        , m_height                                      (height)
-       , m_renderer                            (renderCtx, testCtx, glu::GLSL_VERSION_100_ES, glu::PRECISION_MEDIUMP)
+       , m_renderer                            (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_100_ES, glu::PRECISION_MEDIUMP)
 {
 }
 
@@ -375,7 +375,7 @@ TextureCubeFilteringCase::TextureCubeFilteringCase (tcu::TestContext& testCtx, g
        , m_width                                       (0)
        , m_height                                      (0)
        , m_filenames                           (filenames)
-       , m_renderer                            (renderCtx, testCtx, glu::GLSL_VERSION_100_ES, glu::PRECISION_MEDIUMP)
+       , m_renderer                            (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_100_ES, glu::PRECISION_MEDIUMP)
 {
 }
 
index 6e47861..5387749 100644 (file)
@@ -137,7 +137,7 @@ Texture2DMipmapCase::Texture2DMipmapCase (tcu::TestContext&                 testCtx,
        , m_width                       (width)
        , m_height                      (height)
        , m_texture                     (DE_NULL)
-       , m_renderer            (renderCtx, testCtx, glu::GLSL_VERSION_100_ES,
+       , m_renderer            (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_100_ES,
                                                 renderCtxInfo.isFragmentHighPrecisionSupported() ? glu::PRECISION_HIGHP // Use highp if available.
                                                                                                                                                  : glu::PRECISION_MEDIUMP)
 {
@@ -434,7 +434,7 @@ TextureCubeMipmapCase::TextureCubeMipmapCase (tcu::TestContext&                     testCtx,
        , m_dataType            (dataType)
        , m_size                        (size)
        , m_texture                     (DE_NULL)
-       , m_renderer            (renderCtx, testCtx, glu::GLSL_VERSION_100_ES,
+       , m_renderer            (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_100_ES,
                                                 renderCtxInfo.isFragmentHighPrecisionSupported() ? glu::PRECISION_HIGHP // Use highp if available.
                                                                                                                                                  : glu::PRECISION_MEDIUMP)
 {
index 6c808ea..6b0b40c 100644 (file)
@@ -254,7 +254,6 @@ InterpolationCase::IterateResult InterpolationCase::iterate (void)
        // Frames.
        tcu::Surface    rendered                (viewportWidth, viewportHeight);
        tcu::Surface    reference               (viewportWidth, viewportHeight);
-       tcu::Surface    diffMask                (viewportWidth, viewportHeight);
 
        // Render with GL.
        glViewport(viewportX, viewportY, viewportWidth, viewportHeight);
index 74afc01..7037d7a 100644 (file)
@@ -121,7 +121,6 @@ void blitImageOnBlackSurface(const ConstPixelBufferAccess& src, const PixelBuffe
 {
        const int                       height  = src.getHeight();
        const int                       width   = src.getWidth();
-       const tcu::IVec4        black   = tcu::IVec4(0, 0, 0, 255);
 
        for (int y = 0; y < height; y++)
        for (int x = 0; x < width; x++)
index a4c92db..bc37fa8 100644 (file)
@@ -151,7 +151,7 @@ Tex2DCompletenessCase::IterateResult Tex2DCompletenessCase::iterate (void)
        int                                     viewportWidth   = de::min(64, m_renderCtx.getRenderTarget().getWidth());
        int                                     viewportHeight  = de::min(64, m_renderCtx.getRenderTarget().getHeight());
        TestLog&                        log                             = m_testCtx.getLog();
-       TextureRenderer         renderer                (m_renderCtx, m_testCtx, glu::GLSL_VERSION_100_ES, glu::PRECISION_MEDIUMP);
+       TextureRenderer         renderer                (m_renderCtx, log, glu::GLSL_VERSION_100_ES, glu::PRECISION_MEDIUMP);
        tcu::Surface            renderedFrame   (viewportWidth, viewportHeight);
        vector<float>           texCoord;
 
@@ -204,7 +204,7 @@ TexCubeCompletenessCase::IterateResult TexCubeCompletenessCase::iterate (void)
        int                                     viewportHeight  = de::min(64, m_renderCtx.getRenderTarget().getHeight());
        bool                            allFacesOk              = true;
        TestLog&                        log                             = m_testCtx.getLog();
-       TextureRenderer         renderer                (m_renderCtx, m_testCtx, glu::GLSL_VERSION_100_ES, glu::PRECISION_MEDIUMP);
+       TextureRenderer         renderer                (m_renderCtx, log, glu::GLSL_VERSION_100_ES, glu::PRECISION_MEDIUMP);
        tcu::Surface            renderedFrame   (viewportWidth, viewportHeight);
        vector<float>           texCoord;
 
@@ -537,9 +537,6 @@ Incomplete2DEmptyObjectCase::Incomplete2DEmptyObjectCase (tcu::TestContext& test
 
 void Incomplete2DEmptyObjectCase::createTexture (void)
 {
-       tcu::TextureFormat      fmt                     = glu::mapGLTransferFormat(GL_RGBA, GL_UNSIGNED_BYTE);
-       tcu::TextureLevel       levelData       (fmt);
-
        GLuint texture;
        glGenTextures   (1, &texture);
        glPixelStorei   (GL_UNPACK_ALIGNMENT, 1);
@@ -901,9 +898,6 @@ IncompleteCubeEmptyObjectCase::IncompleteCubeEmptyObjectCase (tcu::TestContext&
 
 void IncompleteCubeEmptyObjectCase::createTexture (void)
 {
-       tcu::TextureFormat              fmt                             = glu::mapGLTransferFormat(GL_RGBA, GL_UNSIGNED_BYTE);
-       tcu::TextureLevel               levelData               (fmt);
-
        GLuint texture;
        glGenTextures   (1, &texture);
        glPixelStorei   (GL_UNPACK_ALIGNMENT, 1);
index 784faae..1e9d5c4 100644 (file)
@@ -126,7 +126,7 @@ Texture2DFilteringCase::Texture2DFilteringCase (tcu::TestContext& testCtx, glu::
        , m_dataType            (dataType)
        , m_width                       (width)
        , m_height                      (height)
-       , m_renderer            (renderCtx, testCtx, glu::GLSL_VERSION_100_ES, glu::PRECISION_MEDIUMP)
+       , m_renderer            (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_100_ES, glu::PRECISION_MEDIUMP)
        , m_caseNdx                     (0)
 {
 }
@@ -144,7 +144,7 @@ Texture2DFilteringCase::Texture2DFilteringCase (tcu::TestContext& testCtx, glu::
        , m_width                       (0)
        , m_height                      (0)
        , m_filenames           (filenames)
-       , m_renderer            (renderCtx, testCtx, glu::GLSL_VERSION_100_ES, glu::PRECISION_MEDIUMP)
+       , m_renderer            (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_100_ES, glu::PRECISION_MEDIUMP)
        , m_caseNdx                     (0)
 {
 }
@@ -389,7 +389,7 @@ TextureCubeFilteringCase::TextureCubeFilteringCase (tcu::TestContext& testCtx, g
        , m_dataType                            (dataType)
        , m_width                                       (width)
        , m_height                                      (height)
-       , m_renderer                            (renderCtx, testCtx, glu::GLSL_VERSION_100_ES, glu::PRECISION_MEDIUMP)
+       , m_renderer                            (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_100_ES, glu::PRECISION_MEDIUMP)
        , m_caseNdx                                     (0)
 {
 }
@@ -407,7 +407,7 @@ TextureCubeFilteringCase::TextureCubeFilteringCase (tcu::TestContext& testCtx, g
        , m_width                                       (0)
        , m_height                                      (0)
        , m_filenames                           (filenames)
-       , m_renderer                            (renderCtx, testCtx, glu::GLSL_VERSION_100_ES, glu::PRECISION_MEDIUMP)
+       , m_renderer                            (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_100_ES, glu::PRECISION_MEDIUMP)
        , m_caseNdx                                     (0)
 {
 }
index a3e422d..9b8f4b2 100644 (file)
@@ -96,7 +96,7 @@ Texture2DFormatCase::Texture2DFormatCase (tcu::TestContext& testCtx, glu::Render
        , m_width               (width)
        , m_height              (height)
        , m_texture             (DE_NULL)
-       , m_renderer    (renderCtx, testCtx, glu::GLSL_VERSION_100_ES, glu::PRECISION_MEDIUMP)
+       , m_renderer    (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_100_ES, glu::PRECISION_MEDIUMP)
 {
 }
 
@@ -240,7 +240,7 @@ TextureCubeFormatCase::TextureCubeFormatCase (tcu::TestContext& testCtx, glu::Re
        , m_width               (width)
        , m_height              (height)
        , m_texture             (DE_NULL)
-       , m_renderer    (renderCtx, testCtx, glu::GLSL_VERSION_100_ES, glu::PRECISION_MEDIUMP)
+       , m_renderer    (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_100_ES, glu::PRECISION_MEDIUMP)
        , m_curFace             (0)
        , m_isOk                (false)
 {
@@ -420,7 +420,7 @@ Compressed2DFormatCase::Compressed2DFormatCase (tcu::TestContext& testCtx, glu::
        , m_renderCtxInfo       (renderCtxInfo)
        , m_filenames           (filenames)
        , m_texture                     (DE_NULL)
-       , m_renderer            (renderCtx, testCtx, glu::GLSL_VERSION_100_ES, glu::PRECISION_MEDIUMP)
+       , m_renderer            (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_100_ES, glu::PRECISION_MEDIUMP)
 {
 }
 
@@ -525,7 +525,7 @@ CompressedCubeFormatCase::CompressedCubeFormatCase (tcu::TestContext& testCtx, g
        , m_renderCtxInfo       (renderCtxInfo)
        , m_filenames           (filenames)
        , m_texture                     (DE_NULL)
-       , m_renderer            (renderCtx, testCtx, glu::GLSL_VERSION_100_ES, glu::PRECISION_MEDIUMP)
+       , m_renderer            (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_100_ES, glu::PRECISION_MEDIUMP)
        , m_curFace                     (0)
        , m_isOk                        (false)
 {
index e22ca8f..01c9d61 100644 (file)
@@ -138,7 +138,7 @@ Texture2DMipmapCase::Texture2DMipmapCase (tcu::TestContext&                 testCtx,
        , m_width                       (width)
        , m_height                      (height)
        , m_texture                     (DE_NULL)
-       , m_renderer            (renderCtx, testCtx, glu::GLSL_VERSION_100_ES,
+       , m_renderer            (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_100_ES,
                                                 renderCtxInfo.isFragmentHighPrecisionSupported() ? glu::PRECISION_HIGHP // Use highp if available.
                                                                                                                                                  : glu::PRECISION_MEDIUMP)
 {
@@ -488,7 +488,7 @@ TextureCubeMipmapCase::TextureCubeMipmapCase (tcu::TestContext&                     testCtx,
        , m_dataType            (dataType)
        , m_size                        (size)
        , m_texture                     (DE_NULL)
-       , m_renderer            (renderCtx, testCtx, glu::GLSL_VERSION_100_ES,
+       , m_renderer            (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_100_ES,
                                                 renderCtxInfo.isFragmentHighPrecisionSupported() ? glu::PRECISION_HIGHP // Use highp if available.
                                                                                                                                                  : glu::PRECISION_MEDIUMP)
 {
@@ -783,7 +783,7 @@ Texture2DGenMipmapCase::Texture2DGenMipmapCase (tcu::TestContext& testCtx, glu::
        , m_width                       (width)
        , m_height                      (height)
        , m_texture                     (DE_NULL)
-       , m_renderer            (renderCtx, testCtx, glu::GLSL_VERSION_100_ES, glu::PRECISION_MEDIUMP)
+       , m_renderer            (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_100_ES, glu::PRECISION_MEDIUMP)
 {
 }
 
@@ -816,7 +816,6 @@ Texture2DGenMipmapCase::IterateResult Texture2DGenMipmapCase::iterate (void)
        const deUint32                  wrapT                           = GL_CLAMP_TO_EDGE;
 
        const int                               numLevels                       = deLog2Floor32(de::max(m_width, m_height))+1;
-       const tcu::Sampler              sampler                         = glu::mapGLSampler(wrapS, wrapT, minFilter, magFilter);
 
        tcu::Texture2D                  resultTexture           (tcu::TextureFormat(tcu::TextureFormat::RGBA, tcu::TextureFormat::UNORM_INT8), m_texture->getRefTexture().getWidth(), m_texture->getRefTexture().getHeight());
 
@@ -917,7 +916,7 @@ TextureCubeGenMipmapCase::TextureCubeGenMipmapCase (tcu::TestContext& testCtx, g
        , m_hint                        (hint)
        , m_size                        (size)
        , m_texture                     (DE_NULL)
-       , m_renderer            (renderCtx, testCtx, glu::GLSL_VERSION_100_ES, glu::PRECISION_MEDIUMP)
+       , m_renderer            (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_100_ES, glu::PRECISION_MEDIUMP)
 {
 }
 
@@ -955,7 +954,6 @@ TextureCubeGenMipmapCase::IterateResult TextureCubeGenMipmapCase::iterate (void)
        tcu::TextureCube                resultTexture           (tcu::TextureFormat(tcu::TextureFormat::RGBA, tcu::TextureFormat::UNORM_INT8), m_size);
 
        const int                               numLevels                       = deLog2Floor32(m_size)+1;
-       tcu::Sampler                    sampler                         = glu::mapGLSampler(wrapS, wrapT, minFilter, magFilter);
        vector<float>                   texCoord;
 
        // Initialize texture level 0 with colored grid.
index 5fcd23f..7a88e71 100644 (file)
@@ -82,7 +82,7 @@ Texture2DSizeCase::Texture2DSizeCase (tcu::TestContext& testCtx, glu::RenderCont
        , m_height              (height)
        , m_useMipmaps  (mipmaps)
        , m_texture             (DE_NULL)
-       , m_renderer    (renderCtx, testCtx, glu::GLSL_VERSION_100_ES, glu::PRECISION_MEDIUMP)
+       , m_renderer    (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_100_ES, glu::PRECISION_MEDIUMP)
 {
 }
 
@@ -202,7 +202,7 @@ TextureCubeSizeCase::TextureCubeSizeCase (tcu::TestContext& testCtx, glu::Render
        , m_height              (height)
        , m_useMipmaps  (mipmaps)
        , m_texture             (DE_NULL)
-       , m_renderer    (renderCtx, testCtx, glu::GLSL_VERSION_100_ES, glu::PRECISION_MEDIUMP)
+       , m_renderer    (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_100_ES, glu::PRECISION_MEDIUMP)
        , m_curFace             (0)
        , m_isOk                (false)
 {
index 9e7d0dd..7a8705e 100644 (file)
@@ -155,7 +155,6 @@ public:
                        const float                     y               = coord.y();
                        const float                     f0              = (x + y) * 0.5f;
                        const float                     f1              = 0.5f + (x - y) * 0.5f;
-                       const tcu::Vec4         fv              = Vec4(f0, f1, 1.0f-f0, 1.0f-f1);
 
                        rr::writeFragmentOutput(context, packetNdx, fragNdx, 0, tcu::Vec4(f0, f1, 1.0f-f0, 1.0f-f1));
                }
index f1a3b80..40ad350 100644 (file)
@@ -99,7 +99,7 @@ TextureWrapCase::TextureWrapCase (tcu::TestContext& testCtx, glu::RenderContext&
        , m_width                       (width)
        , m_height                      (height)
        , m_texture                     (DE_NULL)
-       , m_renderer            (renderCtx, testCtx, glu::GLSL_VERSION_100_ES, glu::PRECISION_MEDIUMP)
+       , m_renderer            (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_100_ES, glu::PRECISION_MEDIUMP)
 {
 }
 
@@ -117,7 +117,7 @@ TextureWrapCase::TextureWrapCase (tcu::TestContext& testCtx, glu::RenderContext&
        , m_height                      (0)
        , m_filenames           (filenames)
        , m_texture                     (DE_NULL)
-       , m_renderer            (renderCtx, testCtx, glu::GLSL_VERSION_100_ES, glu::PRECISION_MEDIUMP)
+       , m_renderer            (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_100_ES, glu::PRECISION_MEDIUMP)
 {
 }
 
index 25fe515..b2a0e18 100644 (file)
@@ -90,7 +90,7 @@ Texture2DFilteringCase::Texture2DFilteringCase (tcu::TestContext& testCtx, glu::
        , m_internalFormat      (internalFormat)
        , m_width                       (width)
        , m_height                      (height)
-       , m_renderer            (renderCtx, testCtx, glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
+       , m_renderer            (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
 {
 }
 
@@ -106,7 +106,7 @@ Texture2DFilteringCase::Texture2DFilteringCase (tcu::TestContext& testCtx, glu::
        , m_width                       (0)
        , m_height                      (0)
        , m_filenames           (filenames)
-       , m_renderer            (renderCtx, testCtx, glu::GLSL_VERSION_100_ES, glu::PRECISION_HIGHP)
+       , m_renderer            (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_100_ES, glu::PRECISION_HIGHP)
 {
 }
 
@@ -346,7 +346,7 @@ TextureCubeFilteringCase::TextureCubeFilteringCase (tcu::TestContext& testCtx, g
        , m_internalFormat                      (internalFormat)
        , m_width                                       (width)
        , m_height                                      (height)
-       , m_renderer                            (renderCtx, testCtx, glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
+       , m_renderer                            (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
 {
 }
 
@@ -363,7 +363,7 @@ TextureCubeFilteringCase::TextureCubeFilteringCase (tcu::TestContext& testCtx, g
        , m_width                                       (0)
        , m_height                                      (0)
        , m_filenames                           (filenames)
-       , m_renderer                            (renderCtx, testCtx, glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
+       , m_renderer                            (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
 {
 }
 
index 67a700c..630a57a 100644 (file)
@@ -134,7 +134,7 @@ Texture2DMipmapCase::Texture2DMipmapCase (tcu::TestContext&                 testCtx,
        , m_width                       (width)
        , m_height                      (height)
        , m_texture                     (DE_NULL)
-       , m_renderer            (renderCtx, testCtx, glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
+       , m_renderer            (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
 {
 }
 
@@ -427,7 +427,7 @@ TextureCubeMipmapCase::TextureCubeMipmapCase (tcu::TestContext&                     testCtx,
        , m_dataType            (dataType)
        , m_size                        (size)
        , m_texture                     (DE_NULL)
-       , m_renderer            (renderCtx, testCtx, glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
+       , m_renderer            (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
 {
 }
 
index 1c7da06..c9fec57 100644 (file)
@@ -261,7 +261,6 @@ InterpolationCase::IterateResult InterpolationCase::iterate (void)
        // Frames.
        tcu::Surface    rendered                (viewportWidth, viewportHeight);
        tcu::Surface    reference               (viewportWidth, viewportHeight);
-       tcu::Surface    diffMask                (viewportWidth, viewportHeight);
 
        // Render with GL.
        glViewport(viewportX, viewportY, viewportWidth, viewportHeight);
index 2aa9001..9611fab 100644 (file)
@@ -1649,7 +1649,7 @@ ASTCRenderer2D::ASTCRenderer2D (Context&                  context,
                                                                CompressedTexFormat     format,
                                                                deUint32                        randomSeed)
        : m_context                     (context)
-       , m_renderer            (context.getRenderContext(), context.getTestContext(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
+       , m_renderer            (context.getRenderContext(), context.getTestContext().getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
        , m_format                      (format)
        , m_blockSize           (tcu::getBlockPixelSize(format).xy())
        , m_astcSupport         (ASTCSUPPORTLEVEL_NONE)
index bc73012..9d8de92 100644 (file)
@@ -124,7 +124,6 @@ void blitImageOnBlackSurface(const ConstPixelBufferAccess& src, const PixelBuffe
 {
        const int                       height  = src.getHeight();
        const int                       width   = src.getWidth();
-       const tcu::IVec4        black   = tcu::IVec4(0, 0, 0, 255);
 
        for (int y = 0; y < height; y++)
        for (int x = 0; x < width; x++)
index bdf22dd..efd8b48 100644 (file)
@@ -775,8 +775,6 @@ bool InstancedGridRenderTest::verifyImage (const tcu::Surface& image)
        // \note the green/yellow pattern is only for clarity. The test will only verify that all instances were drawn by looking for anything non-green/yellow.
        using tcu::TestLog;
 
-       const tcu::RGBA green           (0, 255, 0, 255);
-       const tcu::RGBA yellow          (255, 255, 0, 255);
        const int colorThreshold        = 20;
 
        tcu::Surface error                      (image.getWidth(), image.getHeight());
index 498e8dc..5f6eaa6 100644 (file)
@@ -127,7 +127,7 @@ Texture2DFilteringCase::Texture2DFilteringCase (tcu::TestContext& testCtx, glu::
        , m_internalFormat      (internalFormat)
        , m_width                       (width)
        , m_height                      (height)
-       , m_renderer            (renderCtx, testCtx, glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
+       , m_renderer            (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
        , m_caseNdx                     (0)
 {
 }
@@ -144,7 +144,7 @@ Texture2DFilteringCase::Texture2DFilteringCase (tcu::TestContext& testCtx, glu::
        , m_width                       (0)
        , m_height                      (0)
        , m_filenames           (filenames)
-       , m_renderer            (renderCtx, testCtx, glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
+       , m_renderer            (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
        , m_caseNdx                     (0)
 {
 }
@@ -405,7 +405,7 @@ TextureCubeFilteringCase::TextureCubeFilteringCase (tcu::TestContext& testCtx, g
        , m_internalFormat                      (internalFormat)
        , m_width                                       (width)
        , m_height                                      (height)
-       , m_renderer                            (renderCtx, testCtx, glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
+       , m_renderer                            (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
        , m_caseNdx                                     (0)
 {
 }
@@ -423,7 +423,7 @@ TextureCubeFilteringCase::TextureCubeFilteringCase (tcu::TestContext& testCtx, g
        , m_width                                       (0)
        , m_height                                      (0)
        , m_filenames                           (filenames)
-       , m_renderer                            (renderCtx, testCtx, glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
+       , m_renderer                            (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
        , m_caseNdx                                     (0)
 {
 }
@@ -718,7 +718,7 @@ Texture2DArrayFilteringCase::Texture2DArrayFilteringCase (Context& context, cons
        , m_numLayers           (numLayers)
        , m_gradientTex         (DE_NULL)
        , m_gridTex                     (DE_NULL)
-       , m_renderer            (m_context.getRenderContext(), context.getTestContext(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
+       , m_renderer            (context.getRenderContext(), context.getTestContext().getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
        , m_caseNdx                     (0)
 {
 }
@@ -983,7 +983,7 @@ Texture3DFilteringCase::Texture3DFilteringCase (Context& context, const char* na
        , m_depth                       (depth)
        , m_gradientTex         (DE_NULL)
        , m_gridTex                     (DE_NULL)
-       , m_renderer            (m_context.getRenderContext(), context.getTestContext(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
+       , m_renderer            (context.getRenderContext(), context.getTestContext().getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
        , m_caseNdx                     (0)
 {
 }
index 2ae60cc..629fe84 100644 (file)
@@ -96,7 +96,7 @@ Texture2DFormatCase::Texture2DFormatCase (tcu::TestContext& testCtx, glu::Render
        , m_width               (width)
        , m_height              (height)
        , m_texture             (DE_NULL)
-       , m_renderer    (renderCtx, testCtx, glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
+       , m_renderer    (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
 {
 }
 
@@ -108,7 +108,7 @@ Texture2DFormatCase::Texture2DFormatCase (tcu::TestContext& testCtx, glu::Render
        , m_width               (width)
        , m_height              (height)
        , m_texture             (DE_NULL)
-       , m_renderer    (renderCtx, testCtx, glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
+       , m_renderer    (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
 {
 }
 
@@ -257,7 +257,7 @@ TextureCubeFormatCase::TextureCubeFormatCase (tcu::TestContext& testCtx, glu::Re
        , m_width               (width)
        , m_height              (height)
        , m_texture             (DE_NULL)
-       , m_renderer    (renderCtx, testCtx, glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
+       , m_renderer    (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
        , m_curFace             (0)
        , m_isOk                (false)
 {
@@ -271,7 +271,7 @@ TextureCubeFormatCase::TextureCubeFormatCase (tcu::TestContext& testCtx, glu::Re
        , m_width               (width)
        , m_height              (height)
        , m_texture             (DE_NULL)
-       , m_renderer    (renderCtx, testCtx, glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
+       , m_renderer    (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
        , m_curFace             (0)
        , m_isOk                (false)
 {
@@ -453,7 +453,7 @@ Texture2DArrayFormatCase::Texture2DArrayFormatCase (tcu::TestContext& testCtx, g
        , m_height              (height)
        , m_numLayers   (numLayers)
        , m_texture             (DE_NULL)
-       , m_renderer    (renderCtx, testCtx, glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
+       , m_renderer    (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
        , m_curLayer    (0)
 {
 }
@@ -467,7 +467,7 @@ Texture2DArrayFormatCase::Texture2DArrayFormatCase (tcu::TestContext& testCtx, g
        , m_height              (height)
        , m_numLayers   (numLayers)
        , m_texture             (DE_NULL)
-       , m_renderer    (renderCtx, testCtx, glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
+       , m_renderer    (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
        , m_curLayer    (0)
 {
 }
@@ -605,7 +605,7 @@ Texture3DFormatCase::Texture3DFormatCase (tcu::TestContext& testCtx, glu::Render
        , m_height              (height)
        , m_depth               (depth)
        , m_texture             (DE_NULL)
-       , m_renderer    (renderCtx, testCtx, glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
+       , m_renderer    (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
        , m_curSlice    (0)
 {
 }
@@ -619,7 +619,7 @@ Texture3DFormatCase::Texture3DFormatCase (tcu::TestContext& testCtx, glu::Render
        , m_height              (height)
        , m_depth               (depth)
        , m_texture             (DE_NULL)
-       , m_renderer    (renderCtx, testCtx, glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
+       , m_renderer    (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
        , m_curSlice    (0)
 {
 }
@@ -770,7 +770,7 @@ Compressed2DFormatCase::Compressed2DFormatCase (tcu::TestContext&                   testCtx,
        , m_width                       (width)
        , m_height                      (height)
        , m_texture                     (DE_NULL)
-       , m_renderer            (renderCtx, testCtx, glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
+       , m_renderer            (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
 {
 }
 
@@ -911,7 +911,7 @@ CompressedCubeFormatCase::CompressedCubeFormatCase (tcu::TestContext&                       testCtx,
        , m_width                       (width)
        , m_height                      (height)
        , m_texture                     (DE_NULL)
-       , m_renderer            (renderCtx, testCtx, glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
+       , m_renderer            (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
        , m_curFace                     (0)
        , m_isOk                        (false)
 {
@@ -1048,7 +1048,7 @@ Texture2DFileCase::Texture2DFileCase (tcu::TestContext& testCtx, glu::RenderCont
        , m_renderCtxInfo       (renderCtxInfo)
        , m_filenames           (filenames)
        , m_texture                     (DE_NULL)
-       , m_renderer            (renderCtx, testCtx, glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
+       , m_renderer            (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
 {
 }
 
@@ -1153,7 +1153,7 @@ TextureCubeFileCase::TextureCubeFileCase (tcu::TestContext& testCtx, glu::Render
        , m_renderCtxInfo       (renderCtxInfo)
        , m_filenames           (filenames)
        , m_texture                     (DE_NULL)
-       , m_renderer            (renderCtx, testCtx, glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
+       , m_renderer            (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
        , m_curFace                     (0)
        , m_isOk                        (false)
 {
index dd78b96..5aebbe6 100644 (file)
@@ -187,7 +187,7 @@ Texture2DMipmapCase::Texture2DMipmapCase (tcu::TestContext&                 testCtx,
        , m_width                       (width)
        , m_height                      (height)
        , m_texture                     (DE_NULL)
-       , m_renderer            (renderCtx, testCtx, glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
+       , m_renderer            (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
 {
 }
 
@@ -532,7 +532,7 @@ TextureCubeMipmapCase::TextureCubeMipmapCase (tcu::TestContext&                     testCtx,
        , m_dataType            (dataType)
        , m_size                        (size)
        , m_texture                     (DE_NULL)
-       , m_renderer            (renderCtx, testCtx, glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
+       , m_renderer            (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
 {
 }
 
@@ -822,7 +822,7 @@ Texture2DGenMipmapCase::Texture2DGenMipmapCase (tcu::TestContext& testCtx, glu::
        , m_width                       (width)
        , m_height                      (height)
        , m_texture                     (DE_NULL)
-       , m_renderer            (renderCtx, testCtx, glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
+       , m_renderer            (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
 {
 }
 
@@ -855,7 +855,6 @@ Texture2DGenMipmapCase::IterateResult Texture2DGenMipmapCase::iterate (void)
        const deUint32                  wrapT                           = GL_CLAMP_TO_EDGE;
 
        const int                               numLevels                       = deLog2Floor32(de::max(m_width, m_height))+1;
-       const tcu::Sampler              sampler                         = glu::mapGLSampler(wrapS, wrapT, minFilter, magFilter);
 
        tcu::Texture2D                  resultTexture           (tcu::TextureFormat(tcu::TextureFormat::RGBA, tcu::TextureFormat::UNORM_INT8), m_texture->getRefTexture().getWidth(), m_texture->getRefTexture().getHeight());
 
@@ -955,7 +954,7 @@ TextureCubeGenMipmapCase::TextureCubeGenMipmapCase (tcu::TestContext& testCtx, g
        , m_hint                        (hint)
        , m_size                        (size)
        , m_texture                     (DE_NULL)
-       , m_renderer            (renderCtx, testCtx, glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
+       , m_renderer            (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
 {
 }
 
@@ -1129,7 +1128,7 @@ Texture3DMipmapCase::Texture3DMipmapCase (Context& context, const char* name, co
        , m_height                      (height)
        , m_depth                       (depth)
        , m_texture                     (DE_NULL)
-       , m_renderer            (context.getRenderContext(), m_context.getTestContext(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
+       , m_renderer            (context.getRenderContext(), context.getTestContext().getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
 {
 }
 
@@ -1452,7 +1451,7 @@ Texture2DLodControlCase::Texture2DLodControlCase (Context& context, const char*
        , m_texHeight   (64)
        , m_minFilter   (minFilter)
        , m_texture             (DE_NULL)
-       , m_renderer    (context.getRenderContext(), m_context.getTestContext(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
+       , m_renderer    (context.getRenderContext(), context.getTestContext().getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
 {
 }
 
@@ -1752,7 +1751,7 @@ TextureCubeLodControlCase::TextureCubeLodControlCase (Context& context, const ch
        , m_texSize                     (64)
        , m_minFilter           (minFilter)
        , m_texture                     (DE_NULL)
-       , m_renderer            (context.getRenderContext(), context.getTestContext(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
+       , m_renderer            (context.getRenderContext(), context.getTestContext().getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
 {
 }
 
@@ -2071,7 +2070,7 @@ Texture3DLodControlCase::Texture3DLodControlCase (Context& context, const char*
        , m_texDepth            (32)
        , m_minFilter           (minFilter)
        , m_texture                     (DE_NULL)
-       , m_renderer            (context.getRenderContext(), m_context.getTestContext(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
+       , m_renderer            (context.getRenderContext(), context.getTestContext().getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
 {
 }
 
index 3c4bc21..5feb04f 100644 (file)
@@ -212,7 +212,7 @@ Texture2DShadowCase::Texture2DShadowCase (Context& context, const char* name, co
        , m_width                       (width)
        , m_height                      (height)
        , m_compareFunc         (compareFunc)
-       , m_renderer            (context.getRenderContext(), context.getTestContext(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
+       , m_renderer            (context.getRenderContext(), context.getTestContext().getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
        , m_caseNdx                     (0)
 {
 }
@@ -465,7 +465,7 @@ TextureCubeShadowCase::TextureCubeShadowCase (Context& context, const char* name
        , m_compareFunc         (compareFunc)
        , m_gradientTex         (DE_NULL)
        , m_gridTex                     (DE_NULL)
-       , m_renderer            (context.getRenderContext(), m_context.getTestContext(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
+       , m_renderer            (context.getRenderContext(), context.getTestContext().getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
        , m_caseNdx                     (0)
 {
 }
@@ -760,7 +760,7 @@ Texture2DArrayShadowCase::Texture2DArrayShadowCase (Context& context, const char
        , m_compareFunc         (compareFunc)
        , m_gradientTex         (DE_NULL)
        , m_gridTex                     (DE_NULL)
-       , m_renderer            (context.getRenderContext(), context.getTestContext(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
+       , m_renderer            (context.getRenderContext(), context.getTestContext().getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
        , m_caseNdx                     (0)
 {
 }
index 13eac43..9fbbcc8 100644 (file)
@@ -82,7 +82,7 @@ Texture2DSizeCase::Texture2DSizeCase (tcu::TestContext& testCtx, glu::RenderCont
        , m_height              (height)
        , m_useMipmaps  (mipmaps)
        , m_texture             (DE_NULL)
-       , m_renderer    (renderCtx, testCtx, glu::GLSL_VERSION_300_ES, glu::PRECISION_MEDIUMP)
+       , m_renderer    (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_MEDIUMP)
 {
 }
 
@@ -202,7 +202,7 @@ TextureCubeSizeCase::TextureCubeSizeCase (tcu::TestContext& testCtx, glu::Render
        , m_height              (height)
        , m_useMipmaps  (mipmaps)
        , m_texture             (DE_NULL)
-       , m_renderer    (renderCtx, testCtx, glu::GLSL_VERSION_300_ES, glu::PRECISION_MEDIUMP)
+       , m_renderer    (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_MEDIUMP)
        , m_curFace             (0)
        , m_isOk                (false)
 {
index fb02ed9..9636619 100644 (file)
@@ -109,7 +109,7 @@ Texture2DSwizzleCase::Texture2DSwizzleCase (Context& context, const char* name,
        , m_swizzleB            (swizzleB)
        , m_swizzleA            (swizzleA)
        , m_texture                     (DE_NULL)
-       , m_renderer            (context.getRenderContext(), context.getTestContext(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
+       , m_renderer            (context.getRenderContext(), context.getTestContext().getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
 {
 }
 
index c20300d..06cd78f 100644 (file)
@@ -141,7 +141,7 @@ TextureWrapCase::TextureWrapCase (tcu::TestContext& testCtx, glu::RenderContext&
        , m_height                              (height)
        , m_caseNdx                             (0)
        , m_texture                             (DE_NULL)
-       , m_renderer                    (renderCtx, testCtx, glu::GLSL_VERSION_300_ES, glu::PRECISION_MEDIUMP)
+       , m_renderer                    (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_MEDIUMP)
 {
 }
 
@@ -161,7 +161,7 @@ TextureWrapCase::TextureWrapCase (tcu::TestContext& testCtx, glu::RenderContext&
        , m_filenames                   (filenames)
        , m_caseNdx                             (0)
        , m_texture                             (DE_NULL)
-       , m_renderer                    (renderCtx, testCtx, glu::GLSL_VERSION_300_ES, glu::PRECISION_MEDIUMP)
+       , m_renderer                    (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_MEDIUMP)
 {
 }
 
@@ -180,7 +180,7 @@ TextureWrapCase::TextureWrapCase (tcu::TestContext& testCtx, glu::RenderContext&
        , m_height                              (height)
        , m_caseNdx                             (0)
        , m_texture                             (DE_NULL)
-       , m_renderer                    (renderCtx, testCtx, glu::GLSL_VERSION_300_ES, glu::PRECISION_MEDIUMP)
+       , m_renderer                    (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_MEDIUMP)
 {
 }
 
@@ -296,7 +296,6 @@ TextureWrapCase::IterateResult TextureWrapCase::iterate (void)
        TestLog&                                                log                                                             = m_testCtx.getLog();
        const RandomViewport                    viewport                                                (m_renderCtx.getRenderTarget(), VIEWPORT_WIDTH, VIEWPORT_HEIGHT, deStringHash(getName()) + m_caseNdx);
        tcu::Surface                                    renderedFrame                                   (viewport.width, viewport.height);
-       tcu::Surface                                    referenceFrame                                  (viewport.width, viewport.height);
        ReferenceParams                                 refParams                                               (TEXTURETYPE_2D);
        const tcu::TextureFormat                texFormat                                               = m_texture->getRefTexture().getFormat();
        vector<float>                                   texCoord;
index 89c458d..2700ace 100644 (file)
@@ -170,60 +170,11 @@ const char* targetToName (deUint32 target)
        }
 }
 
-bool isCompressedFormat (deUint32 format)
-{
-       switch (format)
-       {
-               case GL_COMPRESSED_R11_EAC:
-               case GL_COMPRESSED_SIGNED_R11_EAC:
-               case GL_COMPRESSED_RG11_EAC:
-               case GL_COMPRESSED_SIGNED_RG11_EAC:
-               case GL_COMPRESSED_RGB8_ETC2:
-               case GL_COMPRESSED_SRGB8_ETC2:
-               case GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:
-               case GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:
-               case GL_COMPRESSED_RGBA8_ETC2_EAC:
-               case GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:
-               case GL_COMPRESSED_RGBA_ASTC_4x4_KHR:
-               case GL_COMPRESSED_RGBA_ASTC_5x4_KHR:
-               case GL_COMPRESSED_RGBA_ASTC_5x5_KHR:
-               case GL_COMPRESSED_RGBA_ASTC_6x5_KHR:
-               case GL_COMPRESSED_RGBA_ASTC_6x6_KHR:
-               case GL_COMPRESSED_RGBA_ASTC_8x5_KHR:
-               case GL_COMPRESSED_RGBA_ASTC_8x6_KHR:
-               case GL_COMPRESSED_RGBA_ASTC_8x8_KHR:
-               case GL_COMPRESSED_RGBA_ASTC_10x5_KHR:
-               case GL_COMPRESSED_RGBA_ASTC_10x6_KHR:
-               case GL_COMPRESSED_RGBA_ASTC_10x8_KHR:
-               case GL_COMPRESSED_RGBA_ASTC_10x10_KHR:
-               case GL_COMPRESSED_RGBA_ASTC_12x10_KHR:
-               case GL_COMPRESSED_RGBA_ASTC_12x12_KHR:
-               case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:
-               case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:
-               case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:
-               case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:
-               case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:
-               case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:
-               case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:
-               case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:
-               case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:
-               case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:
-               case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:
-               case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:
-               case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:
-               case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:
-                       return true;
-
-               default:
-                       return false;
-       }
-}
-
 string formatToName (deUint32 format)
 {
        string enumName;
 
-       if (isCompressedFormat(format))
+       if (glu::isCompressedFormat(format))
                enumName = glu::getCompressedTexFormatStr(format).toString().substr(14); // Strip GL_COMPRESSED_
        else
                enumName = glu::getPixelFormatStr(format).toString().substr(3); // Strip GL_
@@ -233,7 +184,7 @@ string formatToName (deUint32 format)
 
 bool isFloatFormat (deUint32 format)
 {
-       if (isCompressedFormat(format))
+       if (glu::isCompressedFormat(format))
                return false;
        else
                return tcu::getTextureChannelClass(glu::mapGLInternalFormat(format).type) == tcu::TEXTURECHANNELCLASS_FLOATING_POINT;
@@ -241,7 +192,7 @@ bool isFloatFormat (deUint32 format)
 
 bool isUintFormat (deUint32 format)
 {
-       if (isCompressedFormat(format))
+       if (glu::isCompressedFormat(format))
                return false;
        else
                return tcu::getTextureChannelClass(glu::mapGLInternalFormat(format).type) == tcu::TEXTURECHANNELCLASS_UNSIGNED_INTEGER;
@@ -249,7 +200,7 @@ bool isUintFormat (deUint32 format)
 
 bool isIntFormat (deUint32 format)
 {
-       if (isCompressedFormat(format))
+       if (glu::isCompressedFormat(format))
                return false;
        else
                return tcu::getTextureChannelClass(glu::mapGLInternalFormat(format).type) == tcu::TEXTURECHANNELCLASS_SIGNED_INTEGER;
@@ -305,7 +256,7 @@ ImageInfo::ImageInfo (deUint32 format, deUint32 target, const IVec3& size)
        , m_size                (size)
 {
        DE_ASSERT(m_target == GL_TEXTURE_2D_ARRAY || m_target == GL_TEXTURE_3D || m_size.z() == 1);
-       DE_ASSERT(isTextureTarget(m_target) || !isCompressedFormat(m_target));
+       DE_ASSERT(isTextureTarget(m_target) || !glu::isCompressedFormat(m_target));
 }
 
 
@@ -349,9 +300,9 @@ deUint32 getMoreRestrictiveFormat (deUint32 formatA, deUint32 formatB)
 {
        if (formatA == formatB)
                return formatA;
-       else if (isCompressedFormat(formatA) && isAstcFormat(glu::mapGLCompressedTexFormat(formatA)))
+       else if (glu::isCompressedFormat(formatA) && isAstcFormat(glu::mapGLCompressedTexFormat(formatA)))
                return formatA;
-       else if (isCompressedFormat(formatB) && isAstcFormat(glu::mapGLCompressedTexFormat(formatB)))
+       else if (glu::isCompressedFormat(formatB) && isAstcFormat(glu::mapGLCompressedTexFormat(formatB)))
                return formatB;
        else if (isFloatFormat(formatA))
        {
@@ -365,11 +316,11 @@ deUint32 getMoreRestrictiveFormat (deUint32 formatA, deUint32 formatB)
 
                return formatB;
        }
-       else if (isCompressedFormat(formatA))
+       else if (glu::isCompressedFormat(formatA))
        {
                return formatA;
        }
-       else if (isCompressedFormat(formatB))
+       else if (glu::isCompressedFormat(formatB))
        {
                return formatB;
        }
@@ -379,7 +330,7 @@ deUint32 getMoreRestrictiveFormat (deUint32 formatA, deUint32 formatB)
 
 int getTexelBlockSize (deUint32 format)
 {
-       if (isCompressedFormat(format))
+       if (glu::isCompressedFormat(format))
                return tcu::getBlockSize(glu::mapGLCompressedTexFormat(format));
        else
                return glu::mapGLInternalFormat(format).getPixelSize();
@@ -387,7 +338,7 @@ int getTexelBlockSize (deUint32 format)
 
 IVec3 getTexelBlockPixelSize (deUint32 format)
 {
-       if (isCompressedFormat(format))
+       if (glu::isCompressedFormat(format))
                return tcu::getBlockPixelSize(glu::mapGLCompressedTexFormat(format));
        else
                return IVec3(1, 1, 1);
@@ -477,7 +428,7 @@ void genTexel (de::Random& rng, deUint32 glFormat, int texelBlockSize, const int
                        access.setPixel(color, texelNdx, 0, 0);
                }
        }
-       else if (isCompressedFormat(glFormat))
+       else if (glu::isCompressedFormat(glFormat))
        {
                const tcu::CompressedTexFormat compressedFormat = glu::mapGLCompressedTexFormat(glFormat);
 
@@ -572,7 +523,7 @@ void genericTexImage (const glw::Functions& gl,
 
        DE_ASSERT(target == GL_TEXTURE_CUBE_MAP || faceNdx == 0);
 
-       if (isCompressedFormat(format))
+       if (glu::isCompressedFormat(format))
        {
                switch (getTargetTexDims(target))
                {
@@ -672,7 +623,7 @@ void genRenderbufferImage (const glw::Functions&                    gl,
        DE_ASSERT(info.getTarget() == GL_RENDERBUFFER);
        DE_ASSERT(info.getSize().z() == 1);
        DE_ASSERT(getLevelCount(info) == 1);
-       DE_ASSERT(!isCompressedFormat(info.getFormat()));
+       DE_ASSERT(!glu::isCompressedFormat(info.getFormat()));
 
        glu::Framebuffer framebuffer(gl);
 
@@ -1021,7 +972,7 @@ void verifyTexture2D (tcu::TestContext&                                            testContext,
                                          const vector<ArrayBuffer<deUint8> >&  data,
                                          const ImageInfo&                                              info)
 {
-       if (isCompressedFormat(info.getFormat()))
+       if (glu::isCompressedFormat(info.getFormat()))
        {
                vector<de::ArrayBuffer<deUint8> >       levelDatas;
                vector<tcu::PixelBufferAccess>          levelAccesses;
@@ -1122,7 +1073,7 @@ void verifyTexture3D (tcu::TestContext&                                           testContext,
                                          const vector<ArrayBuffer<deUint8> >&  data,
                                          const ImageInfo&                                              info)
 {
-       if (isCompressedFormat(info.getFormat()))
+       if (glu::isCompressedFormat(info.getFormat()))
        {
                vector<de::ArrayBuffer<deUint8> >       levelDatas;
                vector<tcu::PixelBufferAccess>          levelAccesses;
@@ -1226,7 +1177,7 @@ void verifyTextureCubemap (tcu::TestContext&                                      testContext,
                                                   const vector<ArrayBuffer<deUint8> >& data,
                                                   const ImageInfo&                                             info)
 {
-       if (isCompressedFormat(info.getFormat()))
+       if (glu::isCompressedFormat(info.getFormat()))
        {
                const tcu::CompressedTexFormat& compressedFormat        = glu::mapGLCompressedTexFormat(info.getFormat());
                const tcu::TextureFormat&               decompressedFormat      = tcu::getUncompressedFormat(compressedFormat);
@@ -1385,7 +1336,7 @@ void verifyTexture2DArray (tcu::TestContext&                                      testContext,
                                                   const vector<ArrayBuffer<deUint8> >& data,
                                                   const ImageInfo&                                             info)
 {
-       if (isCompressedFormat(info.getFormat()))
+       if (glu::isCompressedFormat(info.getFormat()))
        {
                vector<de::ArrayBuffer<deUint8> >       levelDatas;
                vector<tcu::PixelBufferAccess>          levelAccesses;
@@ -1603,13 +1554,13 @@ private:
        struct State
        {
                State (int                                      seed,
-                          tcu::TestContext&    testContext,
+                          tcu::TestLog&                log,
                           glu::RenderContext&  renderContext)
                        : rng                           (seed)
-                       , results                       (testContext.getLog())
+                       , results                       (log)
                        , srcImage                      (NULL)
                        , dstImage                      (NULL)
-                       , textureRenderer       (renderContext, testContext, glu::GLSL_VERSION_310_ES, glu::PRECISION_HIGHP)
+                       , textureRenderer       (renderContext, log, glu::GLSL_VERSION_310_ES, glu::PRECISION_HIGHP)
                {
                }
 
@@ -1657,7 +1608,7 @@ CopyImageTest::~CopyImageTest (void)
 
 void checkFormatSupport (glu::ContextInfo& info, deUint32 format)
 {
-       if (isCompressedFormat(format))
+       if (glu::isCompressedFormat(format))
        {
                if (isAstcFormat(glu::mapGLCompressedTexFormat(format)))
                {
@@ -1691,7 +1642,7 @@ void CopyImageTest::init (void)
                                << m_srcImageInfo
                                << m_dstImageInfo;
 
-               m_state = new State(builder.get(), m_testCtx, m_context.getRenderContext());
+               m_state = new State(builder.get(), m_testCtx.getLog(), m_context.getRenderContext());
        }
 }
 
@@ -2054,13 +2005,13 @@ void addCopyTests (TestCaseGroup* root, deUint32 srcFormat, deUint32 dstFormat)
                const IVec3             srcTexelBlockPixelSize  = getTexelBlockPixelSize(srcFormat);
                const bool              srcIs3D                                 = srcTarget == GL_TEXTURE_2D_ARRAY || srcTarget == GL_TEXTURE_3D;
 
-               if (isCompressedFormat(srcFormat) && srcTarget == GL_RENDERBUFFER)
+               if (glu::isCompressedFormat(srcFormat) && srcTarget == GL_RENDERBUFFER)
                        continue;
 
                if (srcTarget == GL_RENDERBUFFER && !isColorRenderable(srcFormat))
                        continue;
 
-               if (isCompressedFormat(srcFormat) && !tcu::isAstcFormat(glu::mapGLCompressedTexFormat(srcFormat)) && srcIs3D)
+               if (glu::isCompressedFormat(srcFormat) && !tcu::isAstcFormat(glu::mapGLCompressedTexFormat(srcFormat)) && srcIs3D)
                        continue;
 
                for (int dstTargetNdx = 0; dstTargetNdx < DE_LENGTH_OF_ARRAY(targets); dstTargetNdx++)
@@ -2069,13 +2020,13 @@ void addCopyTests (TestCaseGroup* root, deUint32 srcFormat, deUint32 dstFormat)
                        const IVec3             dstTexelBlockPixelSize  = getTexelBlockPixelSize(dstFormat);
                        const bool              dstIs3D                                 = dstTarget == GL_TEXTURE_2D_ARRAY || dstTarget == GL_TEXTURE_3D;
 
-                       if (isCompressedFormat(dstFormat) && dstTarget == GL_RENDERBUFFER)
+                       if (glu::isCompressedFormat(dstFormat) && dstTarget == GL_RENDERBUFFER)
                                continue;
 
                        if (dstTarget == GL_RENDERBUFFER && !isColorRenderable(dstFormat))
                                continue;
 
-                       if (isCompressedFormat(dstFormat) && !tcu::isAstcFormat(glu::mapGLCompressedTexFormat(dstFormat)) && dstIs3D)
+                       if (glu::isCompressedFormat(dstFormat) && !tcu::isAstcFormat(glu::mapGLCompressedTexFormat(dstFormat)) && dstIs3D)
                                continue;
 
                        const string    targetTestName  = string(targetToName(srcTarget)) + "_to_" + targetToName(dstTarget);
index 89d904a..0664137 100644 (file)
@@ -109,8 +109,6 @@ static bool verifyImageYellowGreen (const tcu::Surface& image, tcu::TestLog& log
 {
        using tcu::TestLog;
 
-       const tcu::RGBA green           (0, 255, 0, 255);
-       const tcu::RGBA yellow          (255, 255, 0, 255);
        const int colorThreshold        = 20;
 
        tcu::Surface error                      (image.getWidth(), image.getHeight());
index 6fdc859..e75eb28 100644 (file)
@@ -3482,7 +3482,6 @@ bool LayeredRenderCase::verifyEmptyImage (const tcu::Surface& layer, bool loggin
 
 bool LayeredRenderCase::verifyProvokingVertexLayers (const tcu::Surface& layer0, const tcu::Surface& layer1)
 {
-       const tcu::Vec4 white                   = tcu::Vec4(1.0f, 1.0f, 1.0f, 1.0f);
        const bool              layer0Empty             = verifyEmptyImage(layer0, false);
        const bool              layer1Empty             = verifyEmptyImage(layer1, false);
        bool                    error                   = false;
index f993654..47e2ea3 100644 (file)
@@ -2942,7 +2942,6 @@ EarlyFragmentTestsCase::IterateResult EarlyFragmentTestsCase::iterate (void)
        const int                                               viewportHeight          = RENDER_SIZE;
        const int                                               viewportX                       = (m_renderTarget == RENDERTARGET_DEFAULT) ? (rnd.getInt(0, renderCtx.getRenderTarget().getWidth() - viewportWidth))    : (0);
        const int                                               viewportY                       = (m_renderTarget == RENDERTARGET_DEFAULT) ? (rnd.getInt(0, renderCtx.getRenderTarget().getHeight() - viewportHeight))  : (0);
-       const IVec3                                             imageSize                       = defaultImageSize(TEXTURETYPE_2D);
        const glu::Texture                              texture                         (renderCtx);
        de::MovePtr<glu::Framebuffer>   fbo;
        de::MovePtr<glu::Renderbuffer>  colorAttachment;
index e373bda..3b3a413 100644 (file)
@@ -1068,7 +1068,6 @@ static void drawTessCoordVisualization (tcu::Surface& dst, TessPrimitiveType pri
 {
        const int               imageWidth              = 256;
        const int               imageHeight             = 256;
-       const Vec2              imageSizeFloat  ((float)imageWidth, (float)imageHeight);
        dst.setSize(imageWidth, imageHeight);
 
        tcu::clear(dst.getAccess(), tcu::Vec4(0.0f, 0.0f, 0.0f, 1.0f));
@@ -1716,8 +1715,6 @@ CommonEdgeCase::IterateResult CommonEdgeCase::iterate (void)
        gridIndices.reserve(numIndices);
 
        {
-               Random constantSeedRnd(42);
-
                for (int i = 0; i < gridHeight+1; i++)
                for (int j = 0; j < gridWidth+1; j++)
                {
index 67eadb1..e26b312 100644 (file)
@@ -184,7 +184,7 @@ TextureCubeArrayFilteringCase::TextureCubeArrayFilteringCase (Context& context,
        , m_onlySampleFaceInterior      (onlySampleFaceInterior)
        , m_gradientTex                         (DE_NULL)
        , m_gridTex                                     (DE_NULL)
-       , m_renderer                            (m_context.getRenderContext(), context.getTestContext(), glu::GLSL_VERSION_310_ES, glu::PRECISION_HIGHP)
+       , m_renderer                            (context.getRenderContext(), context.getTestContext().getLog(), glu::GLSL_VERSION_310_ES, glu::PRECISION_HIGHP)
        , m_caseNdx                                     (0)
 {
 }
index f6c9da8..ad35705 100644 (file)
@@ -108,7 +108,7 @@ TextureCubeArrayFormatCase::TextureCubeArrayFormatCase (tcu::TestContext& testCt
        , m_size                        (size)
        , m_depth                       (depth)
        , m_texture                     (DE_NULL)
-       , m_renderer            (renderCtx, testCtx, glu::GLSL_VERSION_310_ES, glu::PRECISION_HIGHP)
+       , m_renderer            (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_310_ES, glu::PRECISION_HIGHP)
        , m_curLayerFace        (0)
 {
 }
@@ -122,7 +122,7 @@ TextureCubeArrayFormatCase::TextureCubeArrayFormatCase (tcu::TestContext& testCt
        , m_size                        (size)
        , m_depth                       (depth)
        , m_texture                     (DE_NULL)
-       , m_renderer            (renderCtx, testCtx, glu::GLSL_VERSION_310_ES, glu::PRECISION_HIGHP)
+       , m_renderer            (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_310_ES, glu::PRECISION_HIGHP)
        , m_curLayerFace        (0)
 {
 }
@@ -269,7 +269,7 @@ TextureBufferFormatCase::TextureBufferFormatCase (tcu::TestContext& testCtx, glu
        , m_format              (internalFormat)
        , m_width               (width)
        , m_texture             (DE_NULL)
-       , m_renderer    (renderCtx, testCtx, glu::GLSL_VERSION_310_ES, glu::PRECISION_HIGHP)
+       , m_renderer    (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_310_ES, glu::PRECISION_HIGHP)
 {
 }
 
index dcdc1b2..42316ac 100644 (file)
@@ -1335,7 +1335,6 @@ TextureGatherCase::IterateResult TextureGatherCase::iterate (void)
        TestLog&                                                log                                                             = m_testCtx.getLog();
        const tcu::ScopedLogSection             iterationSection                                (log, "Iteration" + de::toString(m_currentIteration), "Iteration " + de::toString(m_currentIteration));
        const glu::RenderContext&               renderCtx                                               = m_context.getRenderContext();
-       const tcu::IVec2                                renderSize                                              = RENDER_SIZE;
        const glw::Functions&                   gl                                                              = renderCtx.getFunctions();
        const GatherArgs&                               gatherArgs                                              = getGatherArgs(m_currentIteration);
        const string                                    refZExpr                                                = "v_normalizedCoord.x";
index 292b342..3136137 100644 (file)
@@ -79,8 +79,6 @@ static bool verifyImageYellowGreen (const tcu::Surface& image, tcu::TestLog& log
 {
        using tcu::TestLog;
 
-       const tcu::RGBA green           (0, 255, 0, 255);
-       const tcu::RGBA yellow          (255, 255, 0, 255);
        const int colorThreshold        = 20;
 
        tcu::Surface error                      (image.getWidth(), image.getHeight());
index 87cf343..5622297 100644 (file)
@@ -73,8 +73,6 @@ static bool verifyImageYellowGreen (const tcu::Surface& image, tcu::TestLog& log
 {
        using tcu::TestLog;
 
-       const tcu::RGBA green           (0, 255, 0, 255);
-       const tcu::RGBA yellow          (255, 255, 0, 255);
        const int colorThreshold        = 20;
 
        tcu::Surface error                      (image.getWidth(), image.getHeight());
index fd83f2b..f479d5e 100644 (file)
@@ -1700,7 +1700,6 @@ CoverageType calculateTriangleCoverage (const tcu::Vec4& p0, const tcu::Vec4& p1
                        const int               nextEdgeNdx     = (edgeNdx+1) % 3;
                        const I64Vec2   startPos        ((startRounding&0x01)   ? (triangleSubPixelSpaceFloor[edgeNdx].x())             : (triangleSubPixelSpaceCeil[edgeNdx].x()),             (startRounding&0x02)    ? (triangleSubPixelSpaceFloor[edgeNdx].y())             : (triangleSubPixelSpaceCeil[edgeNdx].y()));
                        const I64Vec2   endPos          ((endRounding&0x01)             ? (triangleSubPixelSpaceFloor[nextEdgeNdx].x()) : (triangleSubPixelSpaceCeil[nextEdgeNdx].x()), (endRounding&0x02)              ? (triangleSubPixelSpaceFloor[nextEdgeNdx].y()) : (triangleSubPixelSpaceCeil[nextEdgeNdx].y()));
-                       const I64Vec2   edge            = endPos - startPos;
 
                        for (int pixelEdgeNdx = 0; pixelEdgeNdx < 4; ++pixelEdgeNdx)
                        {
index fe76eac..a5d6bb3 100644 (file)
@@ -266,8 +266,6 @@ public:
                {
                        rr::FragmentPacket&     packet          = packets[packetNdx];
 
-                       const tcu::IVec2        position        = packet.position;
-
                        const tcu::IVec2        position0       = packet.position + tcu::IVec2(0, 0);
                        const tcu::IVec2        position1       = packet.position + tcu::IVec2(1, 0);
                        const tcu::IVec2        position2       = packet.position + tcu::IVec2(0, 1);
index ae6a470..e0721e6 100644 (file)
@@ -937,7 +937,6 @@ void sampleTexture (const SurfaceAccess& dst, const tcu::TextureCubeArrayView& s
 void fetchTexture (const SurfaceAccess& dst, const tcu::ConstPixelBufferAccess& src, const float* texCoord, const tcu::Vec4& colorScale, const tcu::Vec4& colorBias)
 {
        const tcu::Vec4         sq                      = tcu::Vec4(texCoord[0], texCoord[1], texCoord[2], texCoord[3]);
-       const tcu::IVec2        dstSize         = tcu::IVec2(dst.getWidth(), dst.getHeight());
        const tcu::Vec3         triS[2]         = { sq.swizzle(0, 1, 2), sq.swizzle(3, 2, 1) };
 
        for (int y = 0; y < dst.getHeight(); y++)
@@ -1027,9 +1026,9 @@ RandomViewport::RandomViewport (const tcu::RenderTarget& renderTarget, int prefe
        y = rnd.getInt(0, renderTarget.getHeight()      - height);
 }
 
-ProgramLibrary::ProgramLibrary (const glu::RenderContext& context, tcu::TestContext& testCtx, glu::GLSLVersion glslVersion, glu::Precision texCoordPrecision)
+ProgramLibrary::ProgramLibrary (const glu::RenderContext& context, tcu::TestLog& log, glu::GLSLVersion glslVersion, glu::Precision texCoordPrecision)
        : m_context                             (context)
-       , m_testCtx                             (testCtx)
+       , m_log                                 (log)
        , m_glslVersion                 (glslVersion)
        , m_texCoordPrecision   (texCoordPrecision)
 {
@@ -1052,8 +1051,6 @@ void ProgramLibrary::clear (void)
 
 glu::ShaderProgram* ProgramLibrary::getProgram (Program program)
 {
-       TestLog& log = m_testCtx.getLog();
-
        if (m_programs.find(program) != m_programs.end())
                return m_programs[program]; // Return from cache.
 
@@ -1223,7 +1220,7 @@ glu::ShaderProgram* ProgramLibrary::getProgram (Program program)
        glu::ShaderProgram* progObj = new glu::ShaderProgram(m_context, glu::makeVtxFragSources(vertSrc, fragSrc));
        if (!progObj->isOk())
        {
-               log << *progObj;
+               m_log << *progObj;
                delete progObj;
                TCU_FAIL("Failed to compile shader program");
        }
@@ -1241,10 +1238,10 @@ glu::ShaderProgram* ProgramLibrary::getProgram (Program program)
        return progObj;
 }
 
-TextureRenderer::TextureRenderer (const glu::RenderContext& context, tcu::TestContext& testCtx, glu::GLSLVersion glslVersion, glu::Precision texCoordPrecision)
+TextureRenderer::TextureRenderer (const glu::RenderContext& context, tcu::TestLog& log, glu::GLSLVersion glslVersion, glu::Precision texCoordPrecision)
        : m_renderCtx           (context)
-       , m_testCtx                     (testCtx)
-       , m_programLibrary      (context, testCtx, glslVersion, texCoordPrecision)
+       , m_log                         (log)
+       , m_programLibrary      (context, log, glslVersion, texCoordPrecision)
 {
 }
 
@@ -1268,7 +1265,6 @@ void TextureRenderer::renderQuad (int texUnit, const float* texCoord, const Rend
        const glw::Functions&   gl                      = m_renderCtx.getFunctions();
        tcu::Vec4                               wCoord          = params.flags & RenderParams::PROJECTED ? params.w : tcu::Vec4(1.0f);
        bool                                    useBias         = !!(params.flags & RenderParams::USE_BIAS);
-       TestLog&                                log                     = m_testCtx.getLog();
        bool                                    logUniforms     = !!(params.flags & RenderParams::LOG_UNIFORMS);
 
        // Render quad with texture.
@@ -1398,7 +1394,7 @@ void TextureRenderer::renderQuad (int texUnit, const float* texCoord, const Rend
 
        // \todo [2012-09-26 pyry] Move to ProgramLibrary and log unique programs only(?)
        if (params.flags & RenderParams::LOG_PROGRAMS)
-               log << *program;
+               m_log << *program;
 
        GLU_EXPECT_NO_ERROR(gl.getError(), "Set vertex attributes");
 
@@ -1408,20 +1404,20 @@ void TextureRenderer::renderQuad (int texUnit, const float* texCoord, const Rend
 
        gl.uniform1i(gl.getUniformLocation(prog, "u_sampler"), texUnit);
        if (logUniforms)
-               log << TestLog::Message << "u_sampler = " << texUnit << TestLog::EndMessage;
+               m_log << TestLog::Message << "u_sampler = " << texUnit << TestLog::EndMessage;
 
        if (useBias)
        {
                gl.uniform1f(gl.getUniformLocation(prog, "u_bias"), params.bias);
                if (logUniforms)
-                       log << TestLog::Message << "u_bias = " << params.bias << TestLog::EndMessage;
+                       m_log << TestLog::Message << "u_bias = " << params.bias << TestLog::EndMessage;
        }
 
        if (params.samplerType == SAMPLERTYPE_SHADOW)
        {
                gl.uniform1f(gl.getUniformLocation(prog, "u_ref"), params.ref);
                if (logUniforms)
-                       log << TestLog::Message << "u_ref = " << params.ref << TestLog::EndMessage;
+                       m_log << TestLog::Message << "u_ref = " << params.ref << TestLog::EndMessage;
        }
 
        gl.uniform4fv(gl.getUniformLocation(prog, "u_colorScale"),      1, params.colorScale.getPtr());
@@ -1429,8 +1425,8 @@ void TextureRenderer::renderQuad (int texUnit, const float* texCoord, const Rend
 
        if (logUniforms)
        {
-               log << TestLog::Message << "u_colorScale = " << params.colorScale << TestLog::EndMessage;
-               log << TestLog::Message << "u_colorBias = " << params.colorBias << TestLog::EndMessage;
+               m_log << TestLog::Message << "u_colorScale = " << params.colorScale << TestLog::EndMessage;
+               m_log << TestLog::Message << "u_colorBias = " << params.colorBias << TestLog::EndMessage;
        }
 
        GLU_EXPECT_NO_ERROR(gl.getError(), "Set program state");
@@ -1858,8 +1854,6 @@ int computeTextureLookupDiff (const tcu::ConstPixelBufferAccess&  result,
                                        const float             nxo             = wxo/dstW;
                                        const float             nyo             = wyo/dstH;
 
-                                       const tcu::Vec2 coordO          (projectedTriInterpolate(triS[triNdx], triW[triNdx], nxo, nyo),
-                                                                                                projectedTriInterpolate(triT[triNdx], triW[triNdx], nxo, nyo));
                                        const tcu::Vec2 coordDxo        = tcu::Vec2(triDerivateX(triS[triNdx], triW[triNdx], wxo, dstW, nyo),
                                                                                                                        triDerivateX(triT[triNdx], triW[triNdx], wxo, dstW, nyo)) * srcSize.asFloat();
                                        const tcu::Vec2 coordDyo        = tcu::Vec2(triDerivateY(triS[triNdx], triW[triNdx], wyo, dstH, nxo),
@@ -2237,9 +2231,6 @@ int computeTextureLookupDiff (const tcu::ConstPixelBufferAccess&  result,
                                                const float             nxo             = wxo/dstW;
                                                const float             nyo             = wyo/dstH;
 
-                                               const tcu::Vec3 coordO          (projectedTriInterpolate(triS[triNdx], triW[triNdx], nxo, nyo),
-                                                                                                        projectedTriInterpolate(triT[triNdx], triW[triNdx], nxo, nyo),
-                                                                                                        projectedTriInterpolate(triR[triNdx], triW[triNdx], nxo, nyo));
                                                const tcu::Vec3 coordDxo        = tcu::Vec3(triDerivateX(triS[triNdx], triW[triNdx], wxo, dstW, nyo),
                                                                                                                                triDerivateX(triT[triNdx], triW[triNdx], wxo, dstW, nyo),
                                                                                                                                triDerivateX(triR[triNdx], triW[triNdx], wxo, dstW, nyo)) * srcSize.asFloat();
@@ -2390,8 +2381,6 @@ int computeTextureLookupDiff (const tcu::ConstPixelBufferAccess&  result,
                                        const float             nxo             = wxo/dstW;
                                        const float             nyo             = wyo/dstH;
 
-                                       const tcu::Vec2 coordO          (projectedTriInterpolate(triS[triNdx], triW[triNdx], nxo, nyo),
-                                                                                                projectedTriInterpolate(triT[triNdx], triW[triNdx], nxo, nyo));
                                        const float     coordDxo                = triDerivateX(triS[triNdx], triW[triNdx], wxo, dstW, nyo) * srcSize;
                                        const float     coordDyo                = triDerivateY(triS[triNdx], triW[triNdx], wyo, dstH, nxo) * srcSize;
                                        const tcu::Vec2 lodO            = tcu::computeLodBoundsFromDerivates(coordDxo, coordDyo, lodPrec);
@@ -2501,9 +2490,6 @@ int computeTextureLookupDiff (const tcu::ConstPixelBufferAccess&  result,
                                        const float             nxo             = wxo/dstW;
                                        const float             nyo             = wyo/dstH;
 
-                                       const tcu::Vec3 coordO          (projectedTriInterpolate(triS[triNdx], triW[triNdx], nxo, nyo),
-                                                                                                projectedTriInterpolate(triT[triNdx], triW[triNdx], nxo, nyo),
-                                                                                                projectedTriInterpolate(triR[triNdx], triW[triNdx], nxo, nyo));
                                        const tcu::Vec2 coordDxo        = tcu::Vec2(triDerivateX(triS[triNdx], triW[triNdx], wxo, dstW, nyo),
                                                                                                                        triDerivateX(triT[triNdx], triW[triNdx], wxo, dstW, nyo)) * srcSize;
                                        const tcu::Vec2 coordDyo        = tcu::Vec2(triDerivateY(triS[triNdx], triW[triNdx], wyo, dstH, nxo),
@@ -2872,8 +2858,6 @@ int computeTextureCompareDiff (const tcu::ConstPixelBufferAccess& result,
                                        const float             nxo             = wxo/dstW;
                                        const float             nyo             = wyo/dstH;
 
-                                       const tcu::Vec2 coordO          (projectedTriInterpolate(triS[triNdx], triW[triNdx], nxo, nyo),
-                                                                                                projectedTriInterpolate(triT[triNdx], triW[triNdx], nxo, nyo));
                                        const tcu::Vec2 coordDxo        = tcu::Vec2(triDerivateX(triS[triNdx], triW[triNdx], wxo, dstW, nyo),
                                                                                                                        triDerivateX(triT[triNdx], triW[triNdx], wxo, dstW, nyo)) * srcSize.asFloat();
                                        const tcu::Vec2 coordDyo        = tcu::Vec2(triDerivateY(triS[triNdx], triW[triNdx], wyo, dstH, nxo),
@@ -3103,8 +3087,6 @@ int computeTextureCompareDiff (const tcu::ConstPixelBufferAccess& result,
                                        const float             nxo             = wxo/dstW;
                                        const float             nyo             = wyo/dstH;
 
-                                       const tcu::Vec2 coordO          (projectedTriInterpolate(triS[triNdx], triW[triNdx], nxo, nyo),
-                                                                                                projectedTriInterpolate(triT[triNdx], triW[triNdx], nxo, nyo));
                                        const tcu::Vec2 coordDxo        = tcu::Vec2(triDerivateX(triS[triNdx], triW[triNdx], wxo, dstW, nyo),
                                                                                                                        triDerivateX(triT[triNdx], triW[triNdx], wxo, dstW, nyo)) * srcSize.asFloat();
                                        const tcu::Vec2 coordDyo        = tcu::Vec2(triDerivateY(triS[triNdx], triW[triNdx], wyo, dstH, nxo),
index e1b01bc..f918985 100644 (file)
@@ -189,7 +189,7 @@ enum Program
 class ProgramLibrary
 {
 public:
-                                                                                       ProgramLibrary                  (const glu::RenderContext& context, tcu::TestContext& testCtx, glu::GLSLVersion glslVersion, glu::Precision texCoordPrecision);
+                                                                                       ProgramLibrary                  (const glu::RenderContext& context, tcu::TestLog& log, glu::GLSLVersion glslVersion, glu::Precision texCoordPrecision);
                                                                                        ~ProgramLibrary                 (void);
 
        glu::ShaderProgram*                                             getProgram                              (Program program);
@@ -200,7 +200,7 @@ private:
        ProgramLibrary&                                                 operator=                               (const ProgramLibrary& other);
 
        const glu::RenderContext&                               m_context;
-       tcu::TestContext&                                               m_testCtx;
+       tcu::TestLog&                                                   m_log;
        glu::GLSLVersion                                                m_glslVersion;
        glu::Precision                                                  m_texCoordPrecision;
        std::map<Program, glu::ShaderProgram*>  m_programs;
@@ -209,7 +209,7 @@ private:
 class TextureRenderer
 {
 public:
-                                                               TextureRenderer                 (const glu::RenderContext& context, tcu::TestContext& testCtx, glu::GLSLVersion glslVersion, glu::Precision texCoordPrecision);
+                                                               TextureRenderer                 (const glu::RenderContext& context, tcu::TestLog& log, glu::GLSLVersion glslVersion, glu::Precision texCoordPrecision);
                                                                ~TextureRenderer                (void);
 
        void                                            clear                                   (void); //!< Frees allocated resources. Destructor will call clear() as well.
@@ -222,7 +222,7 @@ private:
        TextureRenderer&                        operator=                               (const TextureRenderer& other);
 
        const glu::RenderContext&       m_renderCtx;
-       tcu::TestContext&                       m_testCtx;
+       tcu::TestLog&                           m_log;
        ProgramLibrary                          m_programLibrary;
 };
 
diff --git a/scripts/check_redundant_include_guards.py b/scripts/check_redundant_include_guards.py
deleted file mode 100644 (file)
index fb29487..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-# -*- coding: utf-8 -*-
-
-#-------------------------------------------------------------------------
-# drawElements Quality Program utilities
-# --------------------------------------
-#
-# Copyright 2015 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#-------------------------------------------------------------------------
-
-import os
-import sys
-from fnmatch import fnmatch
-from optparse import OptionParser
-
-HEADER_PATTERNS                                = ["*.hpp", "*.h"]
-INDENTED_INCLUDE_PREFIX                = "#\tinclude "
-IFNDEF_PREFIX                          = "#ifndef "
-
-def getIncludeGuardName (headerFile):
-       return '_' + os.path.basename(headerFile).upper().replace('.', '_')
-
-def getRedundantIncludeGuardErrors (fileName):
-       f               = open(fileName, 'rb')
-       errors  = []
-
-       lineNumber = 1
-       prevLine = None
-       for line in f:
-               if line.startswith(INDENTED_INCLUDE_PREFIX):
-                       if prevLine is not None and prevLine.startswith(IFNDEF_PREFIX):
-                               ifndefName              = prevLine[len(IFNDEF_PREFIX):-1]                       # \note -1 to take out the newline.
-                               includeName             = line[len(INDENTED_INCLUDE_PREFIX)+1:-2]       # \note +1 to take out the beginning quote, -2 to take out the newline and the ending quote.
-                               if getIncludeGuardName(includeName) != ifndefName:
-                                       errors.append("Invalid redundant include guard around line %d:" % lineNumber)
-                                       errors.append("guard is %s but included file is %s" % (ifndefName, includeName))
-
-               prevLine = line
-               lineNumber += 1
-
-       f.close()
-       return errors
-
-def isHeader (filename):
-       for pattern in HEADER_PATTERNS:
-               if fnmatch(filename, pattern):
-                       return True
-       return False
-
-def getFileList (path):
-       allFiles = []
-       if os.path.isfile(path):
-               if isHeader(path):
-                       allFiles.append(path)
-       else:
-               for root, dirs, files in os.walk(path):
-                       for file in files:
-                               if isHeader(file):
-                                       allFiles.append(os.path.join(root, file))
-       return allFiles
-
-if __name__ == "__main__":
-       parser = OptionParser()
-       parser.add_option("-q", "--quiet", action="store_true", dest="quiet", default=False, help="only print files with errors")
-
-       (options, args) = parser.parse_args()
-       quiet                   = options.quiet
-       files                   = []
-       invalidFiles    = []
-
-       for dir in args:
-               files += getFileList(os.path.normpath(dir))
-
-       print "Checking..."
-       for file in files:
-               if not quiet:
-                       print "  %s" % file
-
-               errors = getRedundantIncludeGuardErrors(file)
-               if errors:
-                       if quiet:
-                               print "  %s" % file
-                       for err in errors:
-                               print "    %s" % err
-                       invalidFiles.append(file)
-
-       print ""
-       if len(invalidFiles) > 0:
-               print "Found %d files with invalid redundant include guards:" % len(invalidFiles)
-
-               for file in invalidFiles:
-                       print "  %s" % file
-
-               sys.exit(-1)
-       else:
-               print "All files have valid redundant include guards."
diff --git a/scripts/src_util/check_all.py b/scripts/src_util/check_all.py
new file mode 100644 (file)
index 0000000..f666a78
--- /dev/null
@@ -0,0 +1,51 @@
+# -*- coding: utf-8 -*-
+
+#-------------------------------------------------------------------------
+# drawElements Quality Program utilities
+# --------------------------------------
+#
+# Copyright 2015 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+#-------------------------------------------------------------------------
+
+import sys
+from argparse import ArgumentParser
+from common import getChangedFiles, getAllProjectFiles
+from check_include_guards import checkIncludeGuards
+from check_whitespace import checkWhitespace
+
+if __name__ == "__main__":
+    parser = ArgumentParser()
+    parser.add_argument("-e", "--only-errors",  action="store_true", dest="onlyErrors",   default=False, help="Print only on error")
+    parser.add_argument("-i", "--only-changed", action="store_true", dest="useGitIndex",  default=False, help="Check only modified files. Uses git.")
+
+    args = parser.parse_args()
+
+    if args.useGitIndex:
+        files = getChangedFiles()
+    else:
+        files = getAllProjectFiles()
+
+    error = not all([
+        checkWhitespace(files),
+        checkIncludeGuards(files),
+        #todo checkRedundantIncludeGuards(files),
+        ])
+
+    if error:
+        print "One or more checks failed"
+        sys.exit(1)
+    if not args.onlyErrors:
+        print "All checks passed"
similarity index 92%
rename from scripts/check_include_guards.py
rename to scripts/src_util/check_include_guards.py
index 085ba0c..fa792e1 100644 (file)
@@ -97,6 +97,15 @@ def getHeaderFileList (path):
                                        headers.append(os.path.join(root, file))
        return headers
 
+def checkIncludeGuards (files):
+    error = False
+    for file in files:
+        if isHeader(file):
+            if not hasValidIncludeGuard(file):
+                error = True
+                print "File %s contains invalid include guards" % file
+    return not error
+
 if __name__ == "__main__":
        parser = OptionParser()
        parser.add_option("-x", "--fix", action="store_true", dest="fix", default=False, help="attempt to fix include guards (use with caution)")
diff --git a/scripts/src_util/check_whitespace.py b/scripts/src_util/check_whitespace.py
new file mode 100644 (file)
index 0000000..7d079bf
--- /dev/null
@@ -0,0 +1,68 @@
+# -*- coding: utf-8 -*-
+
+#-------------------------------------------------------------------------
+# drawElements Quality Program utilities
+# --------------------------------------
+#
+# Copyright 2015 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+#-------------------------------------------------------------------------
+
+import sys
+from argparse import ArgumentParser
+from common import getChangedFiles, getAllProjectFiles, isTextFile
+
+def checkFileWhitespace (file):
+    f = open(file, 'rb')
+    error = False
+    for lineNum, line in enumerate(f):
+        if line.endswith(" \n") or line.endswith("\t\n"):
+            error = True
+            print "%s:%i trailing whitespace" % (file, lineNum+1)
+        if " \t" in line:
+            error = True
+            print "%s:%i merged <space><tab>" % (file, lineNum+1)
+    f.close()
+
+    return not error
+
+def checkWhitespace (files):
+    error = False
+    for file in files:
+        if isTextFile(file):
+            if not checkFileWhitespace(file):
+                error = True
+
+    return not error
+
+if __name__ == "__main__":
+    parser = ArgumentParser()
+    parser.add_argument("-e", "--only-errors",  action="store_true", dest="onlyErrors",   default=False, help="Print only on error")
+    parser.add_argument("-i", "--only-changed", action="store_true", dest="useGitIndex",  default=False, help="Check only modified files. Uses git.")
+
+    args = parser.parse_args()
+
+    if args.useGitIndex:
+        files = getChangedFiles()
+    else:
+        files = getAllProjectFiles()
+
+    error = not checkWhitespace(files)
+
+    if error:
+        print "One or more checks failed"
+        sys.exit(1)
+    if not args.onlyErrors:
+        print "All checks passed"
diff --git a/scripts/src_util/common.py b/scripts/src_util/common.py
new file mode 100644 (file)
index 0000000..536573b
--- /dev/null
@@ -0,0 +1,109 @@
+# -*- coding: utf-8 -*-
+
+#-------------------------------------------------------------------------
+# drawElements Quality Program utilities
+# --------------------------------------
+#
+# Copyright 2015 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+#-------------------------------------------------------------------------
+
+import os
+import subprocess
+
+TEXT_FILE_EXTENSION = [
+    ".bat",
+    ".c",
+    ".cfg",
+    ".cmake",
+    ".cpp",
+    ".css",
+    ".h",
+    ".hh",
+    ".hpp",
+    ".html",
+    ".inl",
+    ".java",
+    ".js",
+    ".m",
+    ".mk",
+    ".mm",
+    ".py",
+    ".rule",
+    ".sh",
+    ".test",
+    ".txt",
+    ".xml",
+    ".xsl",
+    ]
+
+BINARY_FILE_EXTENSION = [
+    ".png",
+    ".pkm",
+    ".xcf",
+    ]
+
+def isTextFile (filePath):
+    ext = os.path.splitext(filePath)[1]
+    if ext in TEXT_FILE_EXTENSION:
+        return True
+    if ext in BINARY_FILE_EXTENSION:
+        return False
+
+    # Analyze file contents, zero byte is the marker for a binary file
+    f = open(filePath, "rb")
+
+    TEST_LIMIT = 1024
+    nullFound = False
+    numBytesTested = 0
+
+    byte = f.read(1)
+    while byte and numBytesTested < TEST_LIMIT:
+        if byte == "\0":
+            nullFound = True
+            break
+
+        byte = f.read(1)
+        numBytesTested += 1
+
+    f.close()
+    return not nullFound
+
+def getProjectPath ():
+    # File system hierarchy is fixed
+    scriptDir = os.path.dirname(os.path.abspath(__file__))
+    projectDir = os.path.normpath(os.path.join(scriptDir, "../.."))
+    return projectDir
+
+def git (*args):
+    process = subprocess.Popen(['git'] + list(args), cwd=getProjectPath(), stdout=subprocess.PIPE)
+    output = process.communicate()[0]
+    if process.returncode != 0:
+        raise Exception("Failed to execute '%s', got %d" % (str(args), process.returncode))
+    return output
+
+def getAbsolutePathPathFromProjectRelativePath (projectRelativePath):
+    return os.path.normpath(os.path.join(getProjectPath(), projectRelativePath))
+
+def getChangedFiles ():
+    # Added, Copied, Moved, Renamed
+    output = git('diff', '--cached', '--name-only', '-z', '--diff-filter=ACMR')
+    relativePaths = output.split('\0')[:-1] # remove trailing ''
+    return [getAbsolutePathPathFromProjectRelativePath(path) for path in relativePaths]
+
+def getAllProjectFiles ():
+    output = git('ls-files', '--cached', '-z')
+    relativePaths = output.split('\0')[:-1] # remove trailing ''
+    return [getAbsolutePathPathFromProjectRelativePath(path) for path in relativePaths]