From: Mika Isojärvi Date: Thu, 10 Mar 2016 21:36:52 +0000 (-0800) Subject: Check that glReadnPixels() is supported in negative tests X-Git-Tag: upstream/0.1.0~438^2~372^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=33b9b63106a43ad6bba497c8f31fc35b0051da78;p=platform%2Fupstream%2FVK-GL-CTS.git Check that glReadnPixels() is supported in negative tests Bug: 27536300 Change-Id: Id7b52bbaa0c635b9b4f0a8060a17fc304fdc453f --- diff --git a/modules/gles31/functional/es31fNegativeBufferApiTests.cpp b/modules/gles31/functional/es31fNegativeBufferApiTests.cpp index 3d9871e..509d48c 100644 --- a/modules/gles31/functional/es31fNegativeBufferApiTests.cpp +++ b/modules/gles31/functional/es31fNegativeBufferApiTests.cpp @@ -199,6 +199,13 @@ void readn_pixels (NegativeTestContext& ctx) std::vector ubyteData (4); GLuint fbo = 0x1234; + if (!contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2)) + && !ctx.isExtensionSupported("GL_KHR_robustness") + && !ctx.isExtensionSupported("GL_EXT_robustness")) + { + TCU_THROW(NotSupportedError, "GLES 3.2 or robustness extension not supported"); + } + ctx.beginSection("GL_INVALID_OPERATION is generated if the combination of format and type is unsupported."); ctx.glReadnPixels(0, 0, 1, 1, GL_LUMINANCE_ALPHA, GL_UNSIGNED_SHORT_4_4_4_4, (int) ubyteData.size(), &ubyteData[0]); ctx.expectError(GL_INVALID_OPERATION);