From: Jarkko Pöyry Date: Mon, 4 May 2015 20:06:16 +0000 (-0700) Subject: Check OES_texture_npot in ES2 texture completeness tests. X-Git-Tag: upstream/0.1.0~1309^2~144^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a2d05647ff9b7c7888d92d03084eb0b765ba1f60;p=platform%2Fupstream%2FVK-GL-CTS.git Check OES_texture_npot in ES2 texture completeness tests. - Check GL_OES_texture_npot extension in addition to NV extension. - Remove unused cstdlib include. Bug: 20808878 Change-Id: I9d6e586cbc0151a7b6900eb30d786c7035b75bd8 --- diff --git a/modules/gles2/functional/es2fTextureCompletenessTests.cpp b/modules/gles2/functional/es2fTextureCompletenessTests.cpp index bc37fa8..3f06fd5 100644 --- a/modules/gles2/functional/es2fTextureCompletenessTests.cpp +++ b/modules/gles2/functional/es2fTextureCompletenessTests.cpp @@ -43,8 +43,6 @@ #include "glw.h" -#include - namespace deqp { namespace gles2 @@ -262,6 +260,12 @@ Incomplete2DSizeCase::Incomplete2DSizeCase (tcu::TestContext& testCtx, glu::Rend void Incomplete2DSizeCase::createTexture (void) { + static const char* const s_relaxingExtensions[] = + { + "GL_OES_texture_npot", + "GL_NV_texture_npot_2D_mipmap", + }; + tcu::TextureFormat fmt = glu::mapGLTransferFormat(GL_RGBA, GL_UNSIGNED_BYTE); tcu::TextureLevel levelData (fmt); TestLog& log = m_testCtx.getLog(); @@ -291,11 +295,18 @@ void Incomplete2DSizeCase::createTexture (void) GLU_CHECK_MSG("Set texturing state"); - const char* extension = "GL_NV_texture_npot_2D_mipmap"; - if (isExtensionSupported(m_ctxInfo, extension) && !deIsPowerOfTwo32(m_size.x()) && !deIsPowerOfTwo32(m_size.y())) + // If size not allowed in core, search for relaxing extensions + if (!deIsPowerOfTwo32(m_size.x()) && !deIsPowerOfTwo32(m_size.y())) { - log << TestLog::Message << extension << " supported, assuming completeness test to pass." << TestLog::EndMessage; - m_compareColor = RGBA(0,0,255,255); + for (int ndx = 0; ndx < DE_LENGTH_OF_ARRAY(s_relaxingExtensions); ++ndx) + { + if (isExtensionSupported(m_ctxInfo, s_relaxingExtensions[ndx])) + { + log << TestLog::Message << s_relaxingExtensions[ndx] << " supported, assuming completeness test to pass." << TestLog::EndMessage; + m_compareColor = RGBA(0,0,255,255); + break; + } + } } }