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.
Change-Id: I3977c3c293715db633dde74132e56b5d9303ab28
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);
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);