Merge "Fail call log code generation if method had zero matching outputs."
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4df4f6a..9760d72 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -30,6 +30,9 @@
 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_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}")
diff --git a/android/cts/es30-lmp-mr1.txt b/android/cts/es30-lmp-mr1.txt
index 69decbe..f4ba082 100644
--- a/android/cts/es30-lmp-mr1.txt
+++ b/android/cts/es30-lmp-mr1.txt
@@ -33499,11 +33499,9 @@
 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
diff --git a/framework/common/tcuEither.cpp b/framework/common/tcuEither.cpp
index 64b9737..c640ded 100644
--- a/framework/common/tcuEither.cpp
+++ b/framework/common/tcuEither.cpp
@@ -280,8 +280,7 @@
 		Either<int, TestClassWithConstructor>		either		(intValue);
 		const Either<int, TestClassWithConstructor>	otherEither	(testObject);
 
-
-		either = testObject;
+		either = otherEither;
 
 		TCU_CHECK(!either.isFirst());
 		TCU_CHECK(either.isSecond());
diff --git a/framework/common/tcuVectorUtil.hpp b/framework/common/tcuVectorUtil.hpp
index 00ca7ec..de17642 100644
--- a/framework/common/tcuVectorUtil.hpp
+++ b/framework/common/tcuVectorUtil.hpp
@@ -194,7 +194,6 @@
 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
index 86ddccc..0000000
--- a/framework/delibs/scripts/git-check.py
+++ /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)
diff --git a/framework/opengl/gluTextureUtil.cpp b/framework/opengl/gluTextureUtil.cpp
index 7a0ef98..777f7b3 100644
--- a/framework/opengl/gluTextureUtil.cpp
+++ b/framework/opengl/gluTextureUtil.cpp
@@ -333,6 +333,56 @@
 	}
 }
 
+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::FilterMode mapGLFilterMode (deUint32 filterMode)
+static inline tcu::Sampler::FilterMode mapGLMinFilterMode (deUint32 filterMode)
 {
 	switch (filterMode)
 	{
@@ -574,7 +624,18 @@
 		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 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 */,
diff --git a/framework/opengl/gluTextureUtil.hpp b/framework/opengl/gluTextureUtil.hpp
index c1cc6c8..9ce102e 100644
--- a/framework/opengl/gluTextureUtil.hpp
+++ b/framework/opengl/gluTextureUtil.hpp
@@ -84,6 +84,7 @@
 DataType						getSamplerCubeArrayType				(tcu::TextureFormat format);
 
 bool							isSizedFormatColorRenderable		(const RenderContext& renderCtx, const ContextInfo& contextInfo, deUint32 sizedFormat);
+bool							isCompressedFormat					(deUint32 internalFormat);
 
 } // glu
 
diff --git a/framework/referencerenderer/rrFragmentOperations.cpp b/framework/referencerenderer/rrFragmentOperations.cpp
index 8113fbc..b8451e6 100644
--- a/framework/referencerenderer/rrFragmentOperations.cpp
+++ b/framework/referencerenderer/rrFragmentOperations.cpp
@@ -672,7 +672,6 @@
 		{
 			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());
diff --git a/framework/referencerenderer/rrRasterizer.cpp b/framework/referencerenderer/rrRasterizer.cpp
index db222f6..53d3ecc 100644
--- a/framework/referencerenderer/rrRasterizer.cpp
+++ b/framework/referencerenderer/rrRasterizer.cpp
@@ -876,7 +876,6 @@
 	// 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();
diff --git a/modules/egl/teglImageTests.cpp b/modules/egl/teglImageTests.cpp
index 4cabdd3..b6ef160 100644
--- a/modules/egl/teglImageTests.cpp
+++ b/modules/egl/teglImageTests.cpp
@@ -373,7 +373,6 @@
 
 private:
 	UniquePtr<ImageSource>	m_source;
-	EGLint					m_target;
 };
 
 class ImageTargetGLES2 : public ImageTestCase
diff --git a/modules/egl/teglQuerySurfaceTests.cpp b/modules/egl/teglQuerySurfaceTests.cpp
index a31ca05..3db27f5 100644
--- a/modules/egl/teglQuerySurfaceTests.cpp
+++ b/modules/egl/teglQuerySurfaceTests.cpp
@@ -40,7 +40,6 @@
 #include "tcuCommandLine.hpp"
 
 #include "deUniquePtr.hpp"
-#include "deRandom.hpp"
 
 #include <string>
 #include <vector>
@@ -476,7 +475,6 @@
 	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)
 	{
diff --git a/modules/egl/teglResizeTests.cpp b/modules/egl/teglResizeTests.cpp
index 81ba71b..4e829a6 100644
--- a/modules/egl/teglResizeTests.cpp
+++ b/modules/egl/teglResizeTests.cpp
@@ -349,8 +349,6 @@
 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 @@
 
 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 @@
 	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));
diff --git a/modules/egl/teglTestPackage.cpp b/modules/egl/teglTestPackage.cpp
index 90fbe08..461c137 100644
--- a/modules/egl/teglTestPackage.cpp
+++ b/modules/egl/teglTestPackage.cpp
@@ -128,8 +128,7 @@
 };
 
 TestCaseWrapper::TestCaseWrapper (EglTestContext& eglTestCtx)
-	: tcu::TestCaseWrapper	(eglTestCtx.getTestContext())
-	, m_eglTestCtx			(eglTestCtx)
+	: tcu::TestCaseWrapper(eglTestCtx.getTestContext())
 {
 }
 
diff --git a/modules/egl/teglTestPackage.hpp b/modules/egl/teglTestPackage.hpp
index 8f0fd63..a6b1073 100644
--- a/modules/egl/teglTestPackage.hpp
+++ b/modules/egl/teglTestPackage.hpp
@@ -43,9 +43,6 @@
 	bool							deinitTestCase			(tcu::TestCase* testCase);
 
 	tcu::TestNode::IterateResult	iterateTestCase			(tcu::TestCase* testCase);
-
-private:
-	EglTestContext&					m_eglTestCtx;
 };
 
 class PackageContext
diff --git a/modules/gles2/accuracy/es2aTextureFilteringTests.cpp b/modules/gles2/accuracy/es2aTextureFilteringTests.cpp
index 2321491..03d7689 100644
--- a/modules/gles2/accuracy/es2aTextureFilteringTests.cpp
+++ b/modules/gles2/accuracy/es2aTextureFilteringTests.cpp
@@ -97,7 +97,7 @@
 	, 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 @@
 	, 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 @@
 	, 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 @@
 	, 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)
 {
 }
 
diff --git a/modules/gles2/accuracy/es2aTextureMipmapTests.cpp b/modules/gles2/accuracy/es2aTextureMipmapTests.cpp
index 6e47861..5387749 100644
--- a/modules/gles2/accuracy/es2aTextureMipmapTests.cpp
+++ b/modules/gles2/accuracy/es2aTextureMipmapTests.cpp
@@ -137,7 +137,7 @@
 	, 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 @@
 	, 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)
 {
diff --git a/modules/gles2/accuracy/es2aVaryingInterpolationTests.cpp b/modules/gles2/accuracy/es2aVaryingInterpolationTests.cpp
index 6c808ea..6b0b40c 100644
--- a/modules/gles2/accuracy/es2aVaryingInterpolationTests.cpp
+++ b/modules/gles2/accuracy/es2aVaryingInterpolationTests.cpp
@@ -254,7 +254,6 @@
 	// Frames.
 	tcu::Surface	rendered		(viewportWidth, viewportHeight);
 	tcu::Surface	reference		(viewportWidth, viewportHeight);
-	tcu::Surface	diffMask		(viewportWidth, viewportHeight);
 
 	// Render with GL.
 	glViewport(viewportX, viewportY, viewportWidth, viewportHeight);
diff --git a/modules/gles2/functional/es2fClippingTests.cpp b/modules/gles2/functional/es2fClippingTests.cpp
index 74afc01..7037d7a 100644
--- a/modules/gles2/functional/es2fClippingTests.cpp
+++ b/modules/gles2/functional/es2fClippingTests.cpp
@@ -121,7 +121,6 @@
 {
 	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++)
diff --git a/modules/gles2/functional/es2fTextureCompletenessTests.cpp b/modules/gles2/functional/es2fTextureCompletenessTests.cpp
index a4c92db..bc37fa8 100644
--- a/modules/gles2/functional/es2fTextureCompletenessTests.cpp
+++ b/modules/gles2/functional/es2fTextureCompletenessTests.cpp
@@ -151,7 +151,7 @@
 	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 @@
 	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 @@
 
 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 @@
 
 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);
diff --git a/modules/gles2/functional/es2fTextureFilteringTests.cpp b/modules/gles2/functional/es2fTextureFilteringTests.cpp
index 784faae..1e9d5c4 100644
--- a/modules/gles2/functional/es2fTextureFilteringTests.cpp
+++ b/modules/gles2/functional/es2fTextureFilteringTests.cpp
@@ -126,7 +126,7 @@
 	, 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 @@
 	, 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 @@
 	, 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 @@
 	, 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)
 {
 }
diff --git a/modules/gles2/functional/es2fTextureFormatTests.cpp b/modules/gles2/functional/es2fTextureFormatTests.cpp
index a3e422d..9b8f4b2 100644
--- a/modules/gles2/functional/es2fTextureFormatTests.cpp
+++ b/modules/gles2/functional/es2fTextureFormatTests.cpp
@@ -96,7 +96,7 @@
 	, 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 @@
 	, 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 @@
 	, 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 @@
 	, 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)
 {
diff --git a/modules/gles2/functional/es2fTextureMipmapTests.cpp b/modules/gles2/functional/es2fTextureMipmapTests.cpp
index e22ca8f..01c9d61 100644
--- a/modules/gles2/functional/es2fTextureMipmapTests.cpp
+++ b/modules/gles2/functional/es2fTextureMipmapTests.cpp
@@ -138,7 +138,7 @@
 	, 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 @@
 	, 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 @@
 	, 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 @@
 	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 @@
 	, 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 @@
 	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.
diff --git a/modules/gles2/functional/es2fTextureSizeTests.cpp b/modules/gles2/functional/es2fTextureSizeTests.cpp
index 5fcd23f..7a88e71 100644
--- a/modules/gles2/functional/es2fTextureSizeTests.cpp
+++ b/modules/gles2/functional/es2fTextureSizeTests.cpp
@@ -82,7 +82,7 @@
 	, 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 @@
 	, 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)
 {
diff --git a/modules/gles2/functional/es2fTextureSpecificationTests.cpp b/modules/gles2/functional/es2fTextureSpecificationTests.cpp
index 9e7d0dd..7a8705e 100644
--- a/modules/gles2/functional/es2fTextureSpecificationTests.cpp
+++ b/modules/gles2/functional/es2fTextureSpecificationTests.cpp
@@ -155,7 +155,6 @@
 			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));
 		}
diff --git a/modules/gles2/functional/es2fTextureWrapTests.cpp b/modules/gles2/functional/es2fTextureWrapTests.cpp
index f1a3b80..40ad350 100644
--- a/modules/gles2/functional/es2fTextureWrapTests.cpp
+++ b/modules/gles2/functional/es2fTextureWrapTests.cpp
@@ -99,7 +99,7 @@
 	, 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 @@
 	, 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)
 {
 }
 
diff --git a/modules/gles3/accuracy/es3aTextureFilteringTests.cpp b/modules/gles3/accuracy/es3aTextureFilteringTests.cpp
index 25fe515..b2a0e18 100644
--- a/modules/gles3/accuracy/es3aTextureFilteringTests.cpp
+++ b/modules/gles3/accuracy/es3aTextureFilteringTests.cpp
@@ -90,7 +90,7 @@
 	, 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 @@
 	, 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 @@
 	, 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 @@
 	, 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)
 {
 }
 
diff --git a/modules/gles3/accuracy/es3aTextureMipmapTests.cpp b/modules/gles3/accuracy/es3aTextureMipmapTests.cpp
index 67a700c..630a57a 100644
--- a/modules/gles3/accuracy/es3aTextureMipmapTests.cpp
+++ b/modules/gles3/accuracy/es3aTextureMipmapTests.cpp
@@ -134,7 +134,7 @@
 	, 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 @@
 	, 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)
 {
 }
 
diff --git a/modules/gles3/accuracy/es3aVaryingInterpolationTests.cpp b/modules/gles3/accuracy/es3aVaryingInterpolationTests.cpp
index 1c7da06..c9fec57 100644
--- a/modules/gles3/accuracy/es3aVaryingInterpolationTests.cpp
+++ b/modules/gles3/accuracy/es3aVaryingInterpolationTests.cpp
@@ -261,7 +261,6 @@
 	// Frames.
 	tcu::Surface	rendered		(viewportWidth, viewportHeight);
 	tcu::Surface	reference		(viewportWidth, viewportHeight);
-	tcu::Surface	diffMask		(viewportWidth, viewportHeight);
 
 	// Render with GL.
 	glViewport(viewportX, viewportY, viewportWidth, viewportHeight);
diff --git a/modules/gles3/functional/es3fASTCDecompressionCases.cpp b/modules/gles3/functional/es3fASTCDecompressionCases.cpp
index 2aa9001..9611fab 100644
--- a/modules/gles3/functional/es3fASTCDecompressionCases.cpp
+++ b/modules/gles3/functional/es3fASTCDecompressionCases.cpp
@@ -1649,7 +1649,7 @@
 								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)
diff --git a/modules/gles3/functional/es3fClippingTests.cpp b/modules/gles3/functional/es3fClippingTests.cpp
index bc73012..9d8de92 100644
--- a/modules/gles3/functional/es3fClippingTests.cpp
+++ b/modules/gles3/functional/es3fClippingTests.cpp
@@ -124,7 +124,6 @@
 {
 	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++)
diff --git a/modules/gles3/functional/es3fDrawTests.cpp b/modules/gles3/functional/es3fDrawTests.cpp
index bdf22dd..efd8b48 100644
--- a/modules/gles3/functional/es3fDrawTests.cpp
+++ b/modules/gles3/functional/es3fDrawTests.cpp
@@ -775,8 +775,6 @@
 	// \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());
diff --git a/modules/gles3/functional/es3fTextureFilteringTests.cpp b/modules/gles3/functional/es3fTextureFilteringTests.cpp
index 498e8dc..5f6eaa6 100644
--- a/modules/gles3/functional/es3fTextureFilteringTests.cpp
+++ b/modules/gles3/functional/es3fTextureFilteringTests.cpp
@@ -127,7 +127,7 @@
 	, 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 @@
 	, 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 @@
 	, 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 @@
 	, 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 @@
 	, 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 @@
 	, 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)
 {
 }
diff --git a/modules/gles3/functional/es3fTextureFormatTests.cpp b/modules/gles3/functional/es3fTextureFormatTests.cpp
index 2ae60cc..629fe84 100644
--- a/modules/gles3/functional/es3fTextureFormatTests.cpp
+++ b/modules/gles3/functional/es3fTextureFormatTests.cpp
@@ -96,7 +96,7 @@
 	, 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 @@
 	, 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 @@
 	, 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 @@
 	, 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 @@
 	, 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 @@
 	, 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 @@
 	, 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 @@
 	, 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 @@
 	, 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 @@
 	, 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 @@
 	, 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 @@
 	, 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)
 {
diff --git a/modules/gles3/functional/es3fTextureMipmapTests.cpp b/modules/gles3/functional/es3fTextureMipmapTests.cpp
index dd78b96..5aebbe6 100644
--- a/modules/gles3/functional/es3fTextureMipmapTests.cpp
+++ b/modules/gles3/functional/es3fTextureMipmapTests.cpp
@@ -187,7 +187,7 @@
 	, 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 @@
 	, 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 @@
 	, 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 @@
 	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 @@
 	, 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 @@
 	, 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 @@
 	, 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 @@
 	, 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 @@
 	, 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)
 {
 }
 
diff --git a/modules/gles3/functional/es3fTextureShadowTests.cpp b/modules/gles3/functional/es3fTextureShadowTests.cpp
index 3c4bc21..5feb04f 100644
--- a/modules/gles3/functional/es3fTextureShadowTests.cpp
+++ b/modules/gles3/functional/es3fTextureShadowTests.cpp
@@ -212,7 +212,7 @@
 	, 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 @@
 	, 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 @@
 	, 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)
 {
 }
diff --git a/modules/gles3/functional/es3fTextureSizeTests.cpp b/modules/gles3/functional/es3fTextureSizeTests.cpp
index 13eac43..9fbbcc8 100644
--- a/modules/gles3/functional/es3fTextureSizeTests.cpp
+++ b/modules/gles3/functional/es3fTextureSizeTests.cpp
@@ -82,7 +82,7 @@
 	, 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 @@
 	, 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)
 {
diff --git a/modules/gles3/functional/es3fTextureSwizzleTests.cpp b/modules/gles3/functional/es3fTextureSwizzleTests.cpp
index fb02ed9..9636619 100644
--- a/modules/gles3/functional/es3fTextureSwizzleTests.cpp
+++ b/modules/gles3/functional/es3fTextureSwizzleTests.cpp
@@ -109,7 +109,7 @@
 	, 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)
 {
 }
 
diff --git a/modules/gles3/functional/es3fTextureWrapTests.cpp b/modules/gles3/functional/es3fTextureWrapTests.cpp
index c20300d..06cd78f 100644
--- a/modules/gles3/functional/es3fTextureWrapTests.cpp
+++ b/modules/gles3/functional/es3fTextureWrapTests.cpp
@@ -141,7 +141,7 @@
 	, 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 @@
 	, 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 @@
 	, 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 @@
 	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;
diff --git a/modules/gles31/functional/es31fCopyImageTests.cpp b/modules/gles31/functional/es31fCopyImageTests.cpp
index 89c458d..2700ace 100644
--- a/modules/gles31/functional/es31fCopyImageTests.cpp
+++ b/modules/gles31/functional/es31fCopyImageTests.cpp
@@ -170,60 +170,11 @@
 	}
 }
 
-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 @@
 
 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 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 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 @@
 	, 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 @@
 {
 	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 @@
 
 		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 @@
 
 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 @@
 
 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 @@
 			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 @@
 
 	DE_ASSERT(target == GL_TEXTURE_CUBE_MAP || faceNdx == 0);
 
-	if (isCompressedFormat(format))
+	if (glu::isCompressedFormat(format))
 	{
 		switch (getTargetTexDims(target))
 		{
@@ -672,7 +623,7 @@
 	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 @@
 					  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 @@
 					  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 @@
 						   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 @@
 						   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 @@
 	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 @@
 
 void checkFormatSupport (glu::ContextInfo& info, deUint32 format)
 {
-	if (isCompressedFormat(format))
+	if (glu::isCompressedFormat(format))
 	{
 		if (isAstcFormat(glu::mapGLCompressedTexFormat(format)))
 		{
@@ -1691,7 +1642,7 @@
 				<< 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 @@
 		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 @@
 			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);
diff --git a/modules/gles31/functional/es31fDrawTests.cpp b/modules/gles31/functional/es31fDrawTests.cpp
index 89d904a..0664137 100644
--- a/modules/gles31/functional/es31fDrawTests.cpp
+++ b/modules/gles31/functional/es31fDrawTests.cpp
@@ -109,8 +109,6 @@
 {
 	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());
diff --git a/modules/gles31/functional/es31fGeometryShaderTests.cpp b/modules/gles31/functional/es31fGeometryShaderTests.cpp
index 6fdc859..e75eb28 100644
--- a/modules/gles31/functional/es31fGeometryShaderTests.cpp
+++ b/modules/gles31/functional/es31fGeometryShaderTests.cpp
@@ -3482,7 +3482,6 @@
 
 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;
diff --git a/modules/gles31/functional/es31fShaderImageLoadStoreTests.cpp b/modules/gles31/functional/es31fShaderImageLoadStoreTests.cpp
index f993654..47e2ea3 100644
--- a/modules/gles31/functional/es31fShaderImageLoadStoreTests.cpp
+++ b/modules/gles31/functional/es31fShaderImageLoadStoreTests.cpp
@@ -2942,7 +2942,6 @@
 	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;
diff --git a/modules/gles31/functional/es31fTessellationTests.cpp b/modules/gles31/functional/es31fTessellationTests.cpp
index e373bda..3b3a413 100644
--- a/modules/gles31/functional/es31fTessellationTests.cpp
+++ b/modules/gles31/functional/es31fTessellationTests.cpp
@@ -1068,7 +1068,6 @@
 {
 	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 @@
 	gridIndices.reserve(numIndices);
 
 	{
-		Random constantSeedRnd(42);
-
 		for (int i = 0; i < gridHeight+1; i++)
 		for (int j = 0; j < gridWidth+1; j++)
 		{
diff --git a/modules/gles31/functional/es31fTextureFilteringTests.cpp b/modules/gles31/functional/es31fTextureFilteringTests.cpp
index 67eadb1..e26b312 100644
--- a/modules/gles31/functional/es31fTextureFilteringTests.cpp
+++ b/modules/gles31/functional/es31fTextureFilteringTests.cpp
@@ -184,7 +184,7 @@
 	, 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)
 {
 }
diff --git a/modules/gles31/functional/es31fTextureFormatTests.cpp b/modules/gles31/functional/es31fTextureFormatTests.cpp
index f6c9da8..ad35705 100644
--- a/modules/gles31/functional/es31fTextureFormatTests.cpp
+++ b/modules/gles31/functional/es31fTextureFormatTests.cpp
@@ -108,7 +108,7 @@
 	, 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 @@
 	, 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 @@
 	, 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)
 {
 }
 
diff --git a/modules/gles31/functional/es31fTextureGatherTests.cpp b/modules/gles31/functional/es31fTextureGatherTests.cpp
index dcdc1b2..42316ac 100644
--- a/modules/gles31/functional/es31fTextureGatherTests.cpp
+++ b/modules/gles31/functional/es31fTextureGatherTests.cpp
@@ -1335,7 +1335,6 @@
 	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";
diff --git a/modules/gles31/functional/es31fVertexAttributeBindingTests.cpp b/modules/gles31/functional/es31fVertexAttributeBindingTests.cpp
index 292b342..3136137 100644
--- a/modules/gles31/functional/es31fVertexAttributeBindingTests.cpp
+++ b/modules/gles31/functional/es31fVertexAttributeBindingTests.cpp
@@ -79,8 +79,6 @@
 {
 	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());
diff --git a/modules/gles31/stress/es31sVertexAttributeBindingTests.cpp b/modules/gles31/stress/es31sVertexAttributeBindingTests.cpp
index 87cf343..5622297 100644
--- a/modules/gles31/stress/es31sVertexAttributeBindingTests.cpp
+++ b/modules/gles31/stress/es31sVertexAttributeBindingTests.cpp
@@ -73,8 +73,6 @@
 {
 	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());
diff --git a/modules/glshared/glsRasterizationTestUtil.cpp b/modules/glshared/glsRasterizationTestUtil.cpp
index fd83f2b..f479d5e 100644
--- a/modules/glshared/glsRasterizationTestUtil.cpp
+++ b/modules/glshared/glsRasterizationTestUtil.cpp
@@ -1700,7 +1700,6 @@
 			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)
 			{
diff --git a/modules/glshared/glsTextureBufferCase.cpp b/modules/glshared/glsTextureBufferCase.cpp
index fe76eac..a5d6bb3 100644
--- a/modules/glshared/glsTextureBufferCase.cpp
+++ b/modules/glshared/glsTextureBufferCase.cpp
@@ -266,8 +266,6 @@
 		{
 			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);
diff --git a/modules/glshared/glsTextureTestUtil.cpp b/modules/glshared/glsTextureTestUtil.cpp
index ae6a470..e0721e6 100644
--- a/modules/glshared/glsTextureTestUtil.cpp
+++ b/modules/glshared/glsTextureTestUtil.cpp
@@ -937,7 +937,6 @@
 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 @@
 	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 @@
 
 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* 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 @@
 	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 @@
 	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 @@
 
 	// \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 @@
 
 	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 @@
 
 	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 @@
 					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 @@
 						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 @@
 					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 @@
 					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 @@
 					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 @@
 					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),
diff --git a/modules/glshared/glsTextureTestUtil.hpp b/modules/glshared/glsTextureTestUtil.hpp
index e1b01bc..f918985 100644
--- a/modules/glshared/glsTextureTestUtil.hpp
+++ b/modules/glshared/glsTextureTestUtil.hpp
@@ -189,7 +189,7 @@
 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 @@
 	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 @@
 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 @@
 	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
index fb29487..0000000
--- a/scripts/check_redundant_include_guards.py
+++ /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
index 0000000..f666a78
--- /dev/null
+++ b/scripts/src_util/check_all.py
@@ -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"
diff --git a/scripts/check_include_guards.py b/scripts/src_util/check_include_guards.py
similarity index 92%
rename from scripts/check_include_guards.py
rename to scripts/src_util/check_include_guards.py
index 085ba0c..fa792e1 100644
--- a/scripts/check_include_guards.py
+++ b/scripts/src_util/check_include_guards.py
@@ -97,6 +97,15 @@
 					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
index 0000000..7d079bf
--- /dev/null
+++ b/scripts/src_util/check_whitespace.py
@@ -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
index 0000000..536573b
--- /dev/null
+++ b/scripts/src_util/common.py
@@ -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]
diff --git a/framework/delibs/scripts/pre_commit.py b/scripts/src_util/pre_commit.py
similarity index 100%
rename from framework/delibs/scripts/pre_commit.py
rename to scripts/src_util/pre_commit.py
diff --git a/framework/delibs/scripts/update-copyright-year.py b/scripts/update-copyright-year.py
similarity index 100%
rename from framework/delibs/scripts/update-copyright-year.py
rename to scripts/update-copyright-year.py