Do not use degenerate frames in EGL tests

The dEQP-EGL.functional.buffer_age.* and
dEQP-EGL.functional.partial_update.* tests use randomly-generated frames
for rendering. The test allows the generation of frames with a width or
height of 0, but the tcu::PixelBufferAccess interface does not permit
0-sized subregions (see assertions inside getSubregion overloads in
tcuTextureUtil.cpp).

Skip the rendering of degenerate frames in the reference renderer, as
they are unsupported but would not affect the rendering if they were.

Bug: 65317274
Test: Ran tests on couple of Google devices
Change-Id: I3977c3c293715db633dde74132e56b5d9303ab28
diff --git a/modules/egl/teglBufferAgeTests.cpp b/modules/egl/teglBufferAgeTests.cpp
index 7aac350..e1a3dc2 100644
--- a/modules/egl/teglBufferAgeTests.cpp
+++ b/modules/egl/teglBufferAgeTests.cpp
@@ -345,6 +345,10 @@
 		const ColoredRect& coloredRect = frame.draws[drawNdx].rect;
 		if (frame.draws[drawNdx].drawType == BufferAgeTest::DRAWTYPE_GLES2_RENDER || frame.draws[drawNdx].drawType == BufferAgeTest::DRAWTYPE_GLES2_CLEAR)
 		{
+			// tcu does not support degenerate subregions. Since they correspond to no-op rendering, just skip them.
+			if (coloredRect.bottomLeft.x() == coloredRect.topRight.x() || coloredRect.bottomLeft.y() == coloredRect.topRight.y())
+				continue;
+
 			const tcu::UVec4 color(coloredRect.color.x(), coloredRect.color.y(), coloredRect.color.z(), 255);
 			tcu::clear(tcu::getSubregion(target->getAccess(), coloredRect.bottomLeft.x(), coloredRect.bottomLeft.y(),
 										 coloredRect.topRight.x()-coloredRect.bottomLeft.x(), coloredRect.topRight.y()-coloredRect.bottomLeft.y()), color);
diff --git a/modules/egl/teglPartialUpdateTests.cpp b/modules/egl/teglPartialUpdateTests.cpp
index 097701a..a70374a 100644
--- a/modules/egl/teglPartialUpdateTests.cpp
+++ b/modules/egl/teglPartialUpdateTests.cpp
@@ -334,6 +334,10 @@
 		const ColoredRect& coloredRect = frame.draws[drawNdx].rect;
 		if (frame.draws[drawNdx].drawType == PartialUpdateTest::DRAWTYPE_GLES2_RENDER || frame.draws[drawNdx].drawType == PartialUpdateTest::DRAWTYPE_GLES2_CLEAR)
 		{
+			// tcu does not support degenerate subregions. Since they correspond to no-op rendering, just skip them.
+			if (coloredRect.bottomLeft.x() == coloredRect.topRight.x() || coloredRect.bottomLeft.y() == coloredRect.topRight.y())
+				continue;
+
 			const tcu::UVec4 color(coloredRect.color.x(), coloredRect.color.y(), coloredRect.color.z(), 255);
 			tcu::clear(tcu::getSubregion(target->getAccess(), coloredRect.bottomLeft.x(), coloredRect.bottomLeft.y(),
 										 coloredRect.topRight.x()-coloredRect.bottomLeft.x(), coloredRect.topRight.y()-coloredRect.bottomLeft.y()), color);