Merge vk-gl-cts/opengl-es-cts-3.2.7 into vk-gl-cts/opengl-es-cts-3.2.8

Change-Id: Ie06650ccb16867acefd03d8c053b2e4996f7bc53
diff --git a/modules/gles31/functional/es31fShaderFramebufferFetchTests.cpp b/modules/gles31/functional/es31fShaderFramebufferFetchTests.cpp
index 8a35db6..166b524 100644
--- a/modules/gles31/functional/es31fShaderFramebufferFetchTests.cpp
+++ b/modules/gles31/functional/es31fShaderFramebufferFetchTests.cpp
@@ -613,7 +613,13 @@
 	}
 	else if (textureChannelClass == tcu::TEXTURECHANNELCLASS_SIGNED_INTEGER)
 	{
-		tcu::clear(reference.getAccess(), tcu::clamp(fbColor.asInt() + uniformColor.asInt(), formatMinValue.asInt(), formatMaxValue.asInt()));
+		tcu::IVec4 clearColor;
+
+		// Calculate using 64 bits to avoid signed integer overflow.
+		for (int i = 0; i < 4; i++)
+			clearColor[i] = static_cast<int>((static_cast<deInt64>(fbColor.asInt()[i]) + static_cast<deInt64>(uniformColor.asInt()[i])) & 0xffffffff);
+
+		tcu::clear(reference.getAccess(), clearColor);
 	}
 	else
 	{