Merge "Check texture buffer support in texture format tests."
authorMika Isojarvi <misojarvi@google.com>
Thu, 28 Jan 2016 22:20:22 +0000 (22:20 +0000)
committerAndroid (Google) Code Review <android-gerrit@google.com>
Thu, 28 Jan 2016 22:20:22 +0000 (22:20 +0000)
modules/gles31/functional/es31fTextureFormatTests.cpp

index a964047..93c9bab 100644 (file)
@@ -288,7 +288,14 @@ void TextureBufferFormatCase::init (void)
        tcu::Vec4                               colorA  (spec.valueMin.x(), spec.valueMax.y(), spec.valueMin.z(), spec.valueMax.w());
        tcu::Vec4                               colorB  (spec.valueMax.x(), spec.valueMin.y(), spec.valueMax.z(), spec.valueMin.w());
 
+       if (!m_context.getContextInfo().isExtensionSupported("GL_OES_texture_buffer")
+               && !m_context.getContextInfo().isExtensionSupported("GL_EXT_texture_buffer"))
+       {
+               TCU_THROW(NotSupportedError, "Texture buffers not supported");
+       }
+
        m_maxTextureBufferSize = m_context.getContextInfo().getInt(GL_MAX_TEXTURE_BUFFER_SIZE);
+
        if (m_maxTextureBufferSize <= 0)
                TCU_THROW(NotSupportedError, "GL_MAX_TEXTURE_BUFFER_SIZE > 0 required");