From 24e7f19b97a01736fae0dd9d941193a651341c6a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mika=20Isoj=C3=A4rvi?= Date: Wed, 3 Feb 2016 15:33:44 -0800 Subject: [PATCH] Don't require gpu_shader5 in const expression indexing tests. GL_EXT_gpu_shader5 should not be required to be able to index opaque types with constant expressions. Bug: 22949820 Change-Id: Ifa60eb95e23a55b615a31c1cffb941aea0d8a1b7 --- modules/gles31/functional/es31fOpaqueTypeIndexingTests.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/modules/gles31/functional/es31fOpaqueTypeIndexingTests.cpp b/modules/gles31/functional/es31fOpaqueTypeIndexingTests.cpp index 88c4c3b..f1b06b9 100644 --- a/modules/gles31/functional/es31fOpaqueTypeIndexingTests.cpp +++ b/modules/gles31/functional/es31fOpaqueTypeIndexingTests.cpp @@ -346,8 +346,9 @@ void SamplerIndexingCase::init (void) const char* extName = "GL_EXT_gpu_shader5"; if (m_indexExprType != INDEX_EXPR_TYPE_CONST_LITERAL && + m_indexExprType != INDEX_EXPR_TYPE_CONST_EXPRESSION && !m_context.getContextInfo().isExtensionSupported(extName)) - throw tcu::NotSupportedError(string(extName) + " extension is required for dynamic indexing of sampler arrays"); + throw tcu::NotSupportedError(string(extName) + " extension is required for dynamic indexing of interface blocks"); } void SamplerIndexingCase::getShaderSpec (ShaderSpec* spec, int numSamplers, int numLookups, const int* lookupIndices) const @@ -684,6 +685,7 @@ void BlockArrayIndexingCase::init (void) const char* extName = "GL_EXT_gpu_shader5"; if (m_indexExprType != INDEX_EXPR_TYPE_CONST_LITERAL && + m_indexExprType != INDEX_EXPR_TYPE_CONST_EXPRESSION && !m_context.getContextInfo().isExtensionSupported(extName)) throw tcu::NotSupportedError(string(extName) + " extension is required for dynamic indexing of interface blocks"); @@ -721,7 +723,8 @@ void BlockArrayIndexingCase::getShaderSpec (ShaderSpec* spec, int numInstances, const char* layout = m_blockType == BLOCKTYPE_UNIFORM ? "std140" : "std430"; std::ostringstream global, code; - if (m_indexExprType != INDEX_EXPR_TYPE_CONST_LITERAL) + if (m_indexExprType != INDEX_EXPR_TYPE_CONST_LITERAL + && m_indexExprType != INDEX_EXPR_TYPE_CONST_EXPRESSION) global << "#extension GL_EXT_gpu_shader5 : require\n"; if (m_indexExprType == INDEX_EXPR_TYPE_CONST_EXPRESSION) @@ -897,8 +900,9 @@ void AtomicCounterIndexingCase::init (void) const char* extName = "GL_EXT_gpu_shader5"; if (m_indexExprType != INDEX_EXPR_TYPE_CONST_LITERAL && + m_indexExprType != INDEX_EXPR_TYPE_CONST_EXPRESSION && !m_context.getContextInfo().isExtensionSupported(extName)) - throw tcu::NotSupportedError(string(extName) + " extension is required for dynamic indexing of atomic counters"); + throw tcu::NotSupportedError(string(extName) + " extension is required for dynamic indexing of interface blocks"); if (m_shaderType == glu::SHADERTYPE_VERTEX || m_shaderType == glu::SHADERTYPE_FRAGMENT) { @@ -918,7 +922,8 @@ void AtomicCounterIndexingCase::getShaderSpec (ShaderSpec* spec, int numCounters const char* resultPrefix = "result"; std::ostringstream global, code; - if (m_indexExprType != INDEX_EXPR_TYPE_CONST_LITERAL) + if (m_indexExprType != INDEX_EXPR_TYPE_CONST_LITERAL + && m_indexExprType != INDEX_EXPR_TYPE_CONST_EXPRESSION) global << "#extension GL_EXT_gpu_shader5 : require\n"; if (m_indexExprType == INDEX_EXPR_TYPE_CONST_EXPRESSION) -- 2.7.4