From b6f1116e0be4af1657a382fcce1fcea0d21cf416 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mika=20Isoj=C3=A4rvi?= Date: Thu, 10 Mar 2016 14:25:40 -0800 Subject: [PATCH] Check cube map array support in opaque indexing tests Bug: 27570992 Change-Id: I5d6e2a5e3e0da8e4e7ca248bc9f8710bb836626f --- .../functional/es31fOpaqueTypeIndexingTests.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/modules/gles31/functional/es31fOpaqueTypeIndexingTests.cpp b/modules/gles31/functional/es31fOpaqueTypeIndexingTests.cpp index 9440d47..46670ca 100644 --- a/modules/gles31/functional/es31fOpaqueTypeIndexingTests.cpp +++ b/modules/gles31/functional/es31fOpaqueTypeIndexingTests.cpp @@ -379,6 +379,16 @@ void SamplerIndexingCase::init (void) TCU_CHECK_AND_THROW(NotSupportedError, m_context.getContextInfo().isExtensionSupported("GL_EXT_gpu_shader5"), "GL_EXT_gpu_shader5 extension is required for dynamic indexing of sampler arrays."); + + if (m_samplerType == TYPE_SAMPLER_CUBE_ARRAY + && m_samplerType == TYPE_SAMPLER_CUBE_ARRAY_SHADOW + && m_samplerType == TYPE_INT_SAMPLER_CUBE_ARRAY + && m_samplerType == TYPE_UINT_SAMPLER_CUBE_ARRAY) + { + TCU_CHECK_AND_THROW(NotSupportedError, + m_context.getContextInfo().isExtensionSupported("GL_EXT_texture_cube_map_array"), + "GL_EXT_texture_cube_map_array extension is required for cube map arrays."); + } } } @@ -399,6 +409,15 @@ void SamplerIndexingCase::getShaderSpec (ShaderSpec* spec, int numSamplers, int if (!isES32 && m_indexExprType != INDEX_EXPR_TYPE_CONST_LITERAL && m_indexExprType != INDEX_EXPR_TYPE_CONST_EXPRESSION) global << "#extension GL_EXT_gpu_shader5 : require\n"; + if (!isES32 + && m_samplerType == TYPE_SAMPLER_CUBE_ARRAY + && m_samplerType == TYPE_SAMPLER_CUBE_ARRAY_SHADOW + && m_samplerType == TYPE_INT_SAMPLER_CUBE_ARRAY + && m_samplerType == TYPE_UINT_SAMPLER_CUBE_ARRAY) + { + global << "#extension GL_EXT_texture_cube_map_array: require\n"; + } + if (m_indexExprType == INDEX_EXPR_TYPE_CONST_EXPRESSION) global << "const highp int indexBase = 1;\n"; -- 2.7.4