From: Courtney Goeltzenleuchter Date: Tue, 30 Jul 2019 16:20:29 +0000 (-0600) Subject: Fix invalid parameter for GLES 2.0 X-Git-Tag: upstream/1.3.5~1910 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0c9f0c072d530bf378bc50265284fbc95c450e69;p=platform%2Fupstream%2FVK-GL-CTS.git Fix invalid parameter for GLES 2.0 Test was creating a texture with format of GL_DEPTH_STENCIL and internalformat of GL_DEPTH24_STENCIL8_OES. In ES 2.0 the format and internalformat must match. Added an extra case when running 3.0 or better that does allow different values for format and internalformat. Affects: KHR-GLES2.core.internalformat.texture2d.depth_stencil_unsigned_int_24_8_depth24_stencil Components: OpenGL VK-GL-CTS issue: 1903 Change-Id: I710975a0ea7c1d551f412590f887d9412be6f897 --- diff --git a/external/openglcts/modules/common/glcInternalformatTests.cpp b/external/openglcts/modules/common/glcInternalformatTests.cpp index 493e5c6..6442929 100644 --- a/external/openglcts/modules/common/glcInternalformatTests.cpp +++ b/external/openglcts/modules/common/glcInternalformatTests.cpp @@ -707,7 +707,12 @@ tcu::TestNode::IterateResult Texture2DCase::iterate(void) formatMap[GL_LUMINANCE] = TextureFormat(GL_LUMINANCE, GL_UNSIGNED_BYTE, GL_LUMINANCE); formatMap[GL_LUMINANCE_ALPHA] = TextureFormat(GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, GL_LUMINANCE_ALPHA); formatMap[GL_DEPTH_COMPONENT] = TextureFormat(GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, GL_DEPTH_COMPONENT); - formatMap[GL_DEPTH_STENCIL] = TextureFormat(GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, GL_DEPTH24_STENCIL8); + formatMap[GL_DEPTH_STENCIL] = TextureFormat(GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, GL_DEPTH_STENCIL); + + if (glu::contextSupports(m_context.getRenderContext().getType(), glu::ApiType::es(3, 0))) + { + formatMap[GL_DEPTH_STENCIL] = TextureFormat(GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, GL_DEPTH24_STENCIL8_OES); + } } ReferenceFormatMap::iterator formatIterator = formatMap.find(m_testFormat.format);