From: Michael Chock Date: Mon, 14 Aug 2017 18:55:14 +0000 (-0700) Subject: Do not use degenerate frames in EGL tests X-Git-Tag: upstream/0.1.0~149^2~2^2^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b566828d843622f6117b32c6447f5e249fcad384;p=platform%2Fupstream%2FVK-GL-CTS.git 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. 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 @@ void ReferenceRenderer::render (tcu::Surface* target, const Frame& frame) const 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 @@ void ReferenceRenderer::render (tcu::Surface* target, const Frame& frame) const 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);