Merge vk-gl-cts/opengl-es-cts-3.2.4 into vk-gl-cts/master
authorAlexander Galazin <alexander.galazin@arm.com>
Fri, 25 Aug 2017 07:07:15 +0000 (09:07 +0200)
committerAlexander Galazin <alexander.galazin@arm.com>
Fri, 25 Aug 2017 07:07:15 +0000 (09:07 +0200)
Change-Id: Ibe051866b7182c79e129ddc920f17e91890756b4

external/openglcts/modules/gl/gl4cDirectStateAccessTexturesTests.cpp
external/openglcts/modules/gl/gl4cGetTextureSubImageTests.cpp
external/openglcts/modules/gl/gl4cShaderViewportLayerArrayTests.cpp
external/openglcts/modules/gl/gl4cShaderViewportLayerArrayTests.hpp
external/openglcts/modules/gl/gl4cSparseBufferTests.cpp

index 81fa878..d577144 100644 (file)
@@ -12661,12 +12661,12 @@ tcu::TestNode::IterateResult ImageQueryErrorsTest::iterate()
 
                /* Tests. */
 
-               /* Check that INVALID_ENUM is generated by GetTextureImage functions if
+               /* Check that INVALID_OPERATION is generated by GetTextureImage functions if
                 resulting texture target is not an accepted value TEXTURE_1D,
                 TEXTURE_2D, TEXTURE_3D, TEXTURE_1D_ARRAY, TEXTURE_2D_ARRAY,
                 TEXTURE_CUBE_MAP_ARRAY, TEXTURE_RECTANGLE, and TEXTURE_CUBE_MAP. */
                gl.getTextureImage(texture_2D_ms, 0, s_reference_format, s_reference_type, s_reference_size, store);
-               is_ok &= CheckErrorAndLog(m_context, GL_INVALID_ENUM, "glGetTextureImage",
+               is_ok &= CheckErrorAndLog(m_context, GL_INVALID_OPERATION, "glGetTextureImage",
                                                                  "resulting texture target is not an accepted value TEXTURE_1D, TEXTURE_2D, "
                                                                  "TEXTURE_3D, TEXTURE_1D_ARRAY, TEXTURE_2D_ARRAY, TEXTURE_CUBE_MAP_ARRAY, "
                                                                  "TEXTURE_RECTANGLE, and TEXTURE_CUBE_MAP.");
index f111cab..47a9fc6 100644 (file)
@@ -862,45 +862,45 @@ void gl4cts::GetTextureSubImage::Functional::prepare(glw::GLenum target, bool is
                switch (target)
                {
                case GL_TEXTURE_2D:
-                       gl.compressedTexImage2D(target, 0, GL_COMPRESSED_RGB8_ETC2, s_texture_data_width, s_texture_data_height, 0,
+                       gl.compressedTexImage2D(target, 0, GL_COMPRESSED_RGBA_BPTC_UNORM, s_texture_data_width, s_texture_data_height, 0,
                                                                        s_texture_data_compressed_size / s_texture_data_depth, s_texture_data_compressed);
                        GLU_EXPECT_NO_ERROR(gl.getError(), "glCompressedTexImage2D call failed.");
                        break;
                case GL_TEXTURE_CUBE_MAP:
                        gl.compressedTexImage2D(
-                               GL_TEXTURE_CUBE_MAP_POSITIVE_X, 0, GL_COMPRESSED_RGB8_ETC2, s_texture_data_width, s_texture_data_height,
+                               GL_TEXTURE_CUBE_MAP_POSITIVE_X, 0, GL_COMPRESSED_RGBA_BPTC_UNORM, s_texture_data_width, s_texture_data_height,
                                0, s_texture_data_compressed_size / s_texture_data_depth,
                                &s_texture_data_compressed[0 * s_texture_data_compressed_size / s_texture_data_depth]);
                        gl.compressedTexImage2D(
-                               GL_TEXTURE_CUBE_MAP_NEGATIVE_X, 0, GL_COMPRESSED_RGB8_ETC2, s_texture_data_width, s_texture_data_height,
+                               GL_TEXTURE_CUBE_MAP_NEGATIVE_X, 0, GL_COMPRESSED_RGBA_BPTC_UNORM, s_texture_data_width, s_texture_data_height,
                                0, s_texture_data_compressed_size / s_texture_data_depth,
                                &s_texture_data_compressed[1 * s_texture_data_compressed_size / s_texture_data_depth]);
                        gl.compressedTexImage2D(
-                               GL_TEXTURE_CUBE_MAP_POSITIVE_Y, 0, GL_COMPRESSED_RGB8_ETC2, s_texture_data_width, s_texture_data_height,
+                               GL_TEXTURE_CUBE_MAP_POSITIVE_Y, 0, GL_COMPRESSED_RGBA_BPTC_UNORM, s_texture_data_width, s_texture_data_height,
                                0, s_texture_data_compressed_size / s_texture_data_depth,
                                &s_texture_data_compressed[2 * s_texture_data_compressed_size / s_texture_data_depth]);
                        gl.compressedTexImage2D(
-                               GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, 0, GL_COMPRESSED_RGB8_ETC2, s_texture_data_width, s_texture_data_height,
+                               GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, 0, GL_COMPRESSED_RGBA_BPTC_UNORM, s_texture_data_width, s_texture_data_height,
                                0, s_texture_data_compressed_size / s_texture_data_depth,
                                &s_texture_data_compressed[3 * s_texture_data_compressed_size / s_texture_data_depth]);
                        gl.compressedTexImage2D(
-                               GL_TEXTURE_CUBE_MAP_POSITIVE_Z, 0, GL_COMPRESSED_RGB8_ETC2, s_texture_data_width, s_texture_data_height,
+                               GL_TEXTURE_CUBE_MAP_POSITIVE_Z, 0, GL_COMPRESSED_RGBA_BPTC_UNORM, s_texture_data_width, s_texture_data_height,
                                0, s_texture_data_compressed_size / s_texture_data_depth,
                                &s_texture_data_compressed[4 * s_texture_data_compressed_size / s_texture_data_depth]);
                        gl.compressedTexImage2D(
-                               GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, 0, GL_COMPRESSED_RGB8_ETC2, s_texture_data_width, s_texture_data_height,
+                               GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, 0, GL_COMPRESSED_RGBA_BPTC_UNORM, s_texture_data_width, s_texture_data_height,
                                0, s_texture_data_compressed_size / s_texture_data_depth,
                                &s_texture_data_compressed[5 * s_texture_data_compressed_size / s_texture_data_depth]);
                        GLU_EXPECT_NO_ERROR(gl.getError(), "glCompressedTexImage2D call failed.");
                        break;
                case GL_TEXTURE_CUBE_MAP_ARRAY:
-                       gl.compressedTexImage3D(target, 0, GL_COMPRESSED_RGB8_ETC2, s_texture_data_width, s_texture_data_height, 6,
+                       gl.compressedTexImage3D(target, 0, GL_COMPRESSED_RGBA_BPTC_UNORM, s_texture_data_width, s_texture_data_height, 6,
                                                                        0, s_texture_data_compressed_size / s_texture_data_depth * 6,
                                                                        s_texture_data_compressed);
                        GLU_EXPECT_NO_ERROR(gl.getError(), "glCompressedTexImage3D call failed.");
                        break;
                case GL_TEXTURE_2D_ARRAY:
-                       gl.compressedTexImage3D(target, 0, GL_COMPRESSED_RGB8_ETC2, s_texture_data_width, s_texture_data_height,
+                       gl.compressedTexImage3D(target, 0, GL_COMPRESSED_RGBA_BPTC_UNORM, s_texture_data_width, s_texture_data_height,
                                                                        s_texture_data_depth, 0, s_texture_data_compressed_size, s_texture_data_compressed);
                        GLU_EXPECT_NO_ERROR(gl.getError(), "glCompressedTexImage3D call failed.");
                        break;
@@ -1010,7 +1010,7 @@ bool gl4cts::GetTextureSubImage::Functional::check(glw::GLenum target, bool is_c
 
        if (is_compressed)
        {
-               number_of_components = 8; /* 64 bit block of 4x4 compressed pixels. */
+               number_of_components = 16; /* 128 bit block of 4x4 compressed pixels. */
        }
        else
        {
@@ -1344,36 +1344,52 @@ const glw::GLsizei gl4cts::GetTextureSubImage::Functional::s_texture_data_depth
 /** ETC2 8x8x8(layers) pixels in size source texture for testing GetCompressedTextureSubImage. */
 const glw::GLubyte gl4cts::GetTextureSubImage::Functional::s_texture_data_compressed[] = {
        /* Layer 0 */
-       0x80, 0x80, 0x4, 0x2, 0x1, 0x0, 0x10, 0x0, 0x80, 0x81, 0x4, 0x2, 0x1, 0xf8, 0x10, 0x20, 0x81, 0x80, 0x4, 0x2, 0x81,
-       0x0, 0x1f, 0xc0, 0x81, 0x81, 0x4, 0x2, 0x81, 0xf8, 0x1f, 0xe0,
+       0x80, 0x80, 0x4, 0x2, 0x1, 0x0, 0x10, 0x0, 0x80, 0x81, 0x4, 0x2, 0x1, 0xf8, 0x10, 0x20,
+       0x81, 0x80, 0x4, 0x2, 0x81,     0x0, 0x1f, 0xc0, 0x81, 0x81, 0x4, 0x2, 0x81, 0xf8, 0x1f, 0xe0,
+       0x80, 0x80, 0x5, 0x2, 0x1, 0x0, 0x10, 0x0, 0x80, 0x81, 0x5, 0x2, 0x1, 0xf8, 0x10, 0x20,
+       0x81, 0x80, 0x5, 0x2, 0x81,     0x0, 0x1f, 0xc0, 0x81, 0x81, 0x5, 0x2, 0x81, 0xf8, 0x1f, 0xe0,
 
        /* Layer 1 */
-       0x90, 0x80, 0x4, 0x12, 0x1, 0x1, 0x10, 0x0, 0x90, 0x81, 0x4, 0x12, 0x1, 0xf9, 0x10, 0x20, 0x91, 0x80, 0x4, 0x12,
-       0x81, 0x1, 0x1f, 0xc0, 0x91, 0x81, 0x4, 0x12, 0x81, 0xf9, 0x1f, 0xe0,
+       0x90, 0x80, 0x4, 0x12, 0x1, 0x1, 0x10, 0x0, 0x90, 0x81, 0x4, 0x12, 0x1, 0xf9, 0x10, 0x20,
+       0x91, 0x80, 0x4, 0x12, 0x81, 0x1, 0x1f, 0xc0, 0x91, 0x81, 0x4, 0x12, 0x81, 0xf9, 0x1f, 0xe0,
+       0x90, 0x80, 0x5, 0x12, 0x1, 0x1, 0x10, 0x0, 0x90, 0x81, 0x5, 0x12, 0x1, 0xf9, 0x10, 0x20,
+       0x91, 0x80, 0x5, 0x12, 0x81, 0x1, 0x1f, 0xc0, 0x91, 0x81, 0x5, 0x12, 0x81, 0xf9, 0x1f, 0xe0,
 
        /* Layer 2 */
-       0xa0, 0x80, 0x4, 0x22, 0x1, 0x2, 0x10, 0x0, 0xa0, 0x81, 0x4, 0x22, 0x1, 0xfa, 0x10, 0x20, 0xa1, 0x80, 0x4, 0x22,
-       0x81, 0x2, 0x1f, 0xc0, 0xa1, 0x81, 0x4, 0x22, 0x81, 0xfa, 0x1f, 0xe0,
+       0xa0, 0x80, 0x4, 0x22, 0x1, 0x2, 0x10, 0x0, 0xa0, 0x81, 0x4, 0x22, 0x1, 0xfa, 0x10, 0x20,
+       0xa1, 0x80, 0x4, 0x22, 0x81, 0x2, 0x1f, 0xc0, 0xa1, 0x81, 0x4, 0x22, 0x81, 0xfa, 0x1f, 0xe0,
+       0xa0, 0x80, 0x5, 0x22, 0x1, 0x2, 0x10, 0x0, 0xa0, 0x81, 0x5, 0x22, 0x1, 0xfa, 0x10, 0x20,
+       0xa1, 0x80, 0x5, 0x22, 0x81, 0x2, 0x1f, 0xc0, 0xa1, 0x81, 0x5, 0x22, 0x81, 0xfa, 0x1f, 0xe0,
 
        /* Layer 3 */
-       0xb0, 0x80, 0x4, 0x32, 0x1, 0x3, 0x10, 0x0, 0xb0, 0x81, 0x4, 0x32, 0x1, 0xfb, 0x10, 0x20, 0xb1, 0x80, 0x4, 0x32,
-       0x81, 0x3, 0x1f, 0xc0, 0xb1, 0x81, 0x4, 0x32, 0x81, 0xfb, 0x1f, 0xe0,
+       0xb0, 0x80, 0x4, 0x32, 0x1, 0x3, 0x10, 0x0, 0xb0, 0x81, 0x4, 0x32, 0x1, 0xfb, 0x10, 0x20,
+       0xb1, 0x80, 0x4, 0x32, 0x81, 0x3, 0x1f, 0xc0, 0xb1, 0x81, 0x4, 0x32, 0x81, 0xfb, 0x1f, 0xe0,
+       0xb0, 0x80, 0x5, 0x32, 0x1, 0x3, 0x10, 0x0, 0xb0, 0x81, 0x5, 0x32, 0x1, 0xfb, 0x10, 0x20,
+       0xb1, 0x80, 0x5, 0x32, 0x81, 0x3, 0x1f, 0xc0, 0xb1, 0x81, 0x5, 0x32, 0x81, 0xfb, 0x1f, 0xe0,
 
        /* Layer 4 */
-       0x40, 0x80, 0x4, 0x42, 0x1, 0x4, 0x10, 0x0, 0x40, 0x81, 0x4, 0x42, 0x1, 0xfc, 0x10, 0x20, 0x41, 0x80, 0x4, 0x42,
-       0x81, 0x4, 0x1f, 0xc0, 0x41, 0x81, 0x4, 0x42, 0x81, 0xfc, 0x1f, 0xe0,
+       0x40, 0x80, 0x4, 0x42, 0x1, 0x4, 0x10, 0x0, 0x40, 0x81, 0x4, 0x42, 0x1, 0xfc, 0x10, 0x20,
+       0x41, 0x80, 0x4, 0x42, 0x81, 0x4, 0x1f, 0xc0, 0x41, 0x81, 0x4, 0x42, 0x81, 0xfc, 0x1f, 0xe0,
+       0x40, 0x80, 0x5, 0x42, 0x1, 0x4, 0x10, 0x0, 0x40, 0x81, 0x5, 0x42, 0x1, 0xfc, 0x10, 0x20,
+       0x41, 0x80, 0x5, 0x42, 0x81, 0x4, 0x1f, 0xc0, 0x41, 0x81, 0x5, 0x42, 0x81, 0xfc, 0x1f, 0xe0,
 
        /* Layer 5 */
-       0x50, 0x80, 0x4, 0x52, 0x1, 0x5, 0x10, 0x0, 0x50, 0x81, 0x4, 0x52, 0x1, 0xfd, 0x10, 0x20, 0x51, 0x80, 0x4, 0x52,
-       0x81, 0x5, 0x1f, 0xc0, 0x51, 0x81, 0x4, 0x52, 0x81, 0xfd, 0x1f, 0xe0,
+       0x50, 0x80, 0x4, 0x52, 0x1, 0x5, 0x10, 0x0, 0x50, 0x81, 0x4, 0x52, 0x1, 0xfd, 0x10, 0x20,
+       0x51, 0x80, 0x4, 0x52, 0x81, 0x5, 0x1f, 0xc0, 0x51, 0x81, 0x4, 0x52, 0x81, 0xfd, 0x1f, 0xe0,
+       0x50, 0x80, 0x5, 0x52, 0x1, 0x5, 0x10, 0x0, 0x50, 0x81, 0x5, 0x52, 0x1, 0xfd, 0x10, 0x20,
+       0x51, 0x80, 0x5, 0x52, 0x81, 0x5, 0x1f, 0xc0, 0x51, 0x81, 0x5, 0x52, 0x81, 0xfd, 0x1f, 0xe0,
 
        /* Layer 6 */
-       0x5e, 0x80, 0x4, 0x5f, 0x1, 0x5, 0xf0, 0x0, 0x5e, 0x81, 0x4, 0x5f, 0x1, 0xfd, 0xf0, 0x20, 0x5f, 0x80, 0x4, 0x5f,
-       0x81, 0x5, 0xff, 0xc0, 0x5f, 0x81, 0x4, 0x5f, 0x81, 0xfd, 0xff, 0xe0,
+       0x5e, 0x80, 0x4, 0x5f, 0x1, 0x5, 0xf0, 0x0, 0x5e, 0x81, 0x4, 0x5f, 0x1, 0xfd, 0xf0, 0x20,
+       0x5f, 0x80, 0x4, 0x5f, 0x81, 0x5, 0xff, 0xc0, 0x5f, 0x81, 0x4, 0x5f, 0x81, 0xfd, 0xff, 0xe0,
+       0x5e, 0x80, 0x5, 0x5f, 0x1, 0x5, 0xf0, 0x0, 0x5e, 0x81, 0x5, 0x5f, 0x1, 0xfd, 0xf0, 0x20,
+       0x5f, 0x80, 0x5, 0x5f, 0x81, 0x5, 0xff, 0xc0, 0x5f, 0x81, 0x5, 0x5f, 0x81, 0xfd, 0xff, 0xe0,
 
        /* Layer 7 */
-       0x6e, 0x80, 0x4, 0x6f, 0x1, 0x6, 0xf0, 0x0, 0x6e, 0x81, 0x4, 0x6f, 0x1, 0xfe, 0xf0, 0x20, 0x6f, 0x80, 0x4, 0x6f,
-       0x81, 0x6, 0xff, 0xc0, 0x6f, 0x81, 0x4, 0x6f, 0x81, 0xfe, 0xff, 0xe0
+       0x6e, 0x80, 0x4, 0x6f, 0x1, 0x6, 0xf0, 0x0, 0x6e, 0x81, 0x4, 0x6f, 0x1, 0xfe, 0xf0, 0x20,
+       0x6f, 0x80, 0x4, 0x6f, 0x81, 0x6, 0xff, 0xc0, 0x6f, 0x81, 0x4, 0x6f, 0x81, 0xfe, 0xff, 0xe0,
+       0x6e, 0x80, 0x5, 0x6f, 0x1, 0x6, 0xf0, 0x0, 0x6e, 0x81, 0x5, 0x6f, 0x1, 0xfe, 0xf0, 0x20,
+       0x6f, 0x80, 0x5, 0x6f, 0x81, 0x6, 0xff, 0xc0, 0x6f, 0x81, 0x5, 0x6f, 0x81, 0xfe, 0xff, 0xe0
 };
 
 const glw::GLsizei gl4cts::GetTextureSubImage::Functional::s_texture_data_compressed_size =
index 77c710d..7efa211 100644 (file)
@@ -446,6 +446,8 @@ void ShaderLayerFramebufferTestCaseBase::init()
        if (!m_isExtensionSupported)
                return;
 
+       const glw::Functions&    gl                     = m_context.getRenderContext().getFunctions();
+
        this->createFBO();
 
        m_shaderPipelines.push_back(ShaderViewportLayerArrayUtils::ShaderPipeline(false, false, m_layersNum, "Layer"));
@@ -456,8 +458,20 @@ void ShaderLayerFramebufferTestCaseBase::init()
        {
                iter->create(m_context.getRenderContext());
        }
+
+       gl.viewport(0, 0, m_fboSize, m_fboSize);
 }
 
+void ShaderLayerFramebufferTestCaseBase::deinit()
+{
+       const Functions&                gl                       = m_context.getRenderContext().getFunctions();
+       const tcu::RenderTarget renderTarget = m_context.getRenderContext().getRenderTarget();
+
+       gl.viewport(0, 0, renderTarget.getWidth(), renderTarget.getHeight());
+       GLU_EXPECT_NO_ERROR(gl.getError(), "Viewport");
+}
+
+
 tcu::TestNode::IterateResult ShaderLayerFramebufferTestCaseBase::iterate()
 {
        if (!m_isExtensionSupported)
@@ -484,6 +498,8 @@ tcu::TestNode::IterateResult ShaderLayerFramebufferTestCaseBase::iterate()
                gl.clear(GL_COLOR_BUFFER_BIT);
                GLU_EXPECT_NO_ERROR(gl.getError(), "Clear");
                ShaderViewportLayerArrayUtils::renderQuad(renderContext, *pipelineIter, m_currentLayer, renderColor);
+               gl.flush();
+               GLU_EXPECT_NO_ERROR(gl.getError(), "Flush");
 
                // calculate layer offset (same value as gl_Layer in shader)
                int currentLayerWithOffset = (m_currentLayer + pipelineIter->getViewportLayerOffset()) % m_layersNum;
@@ -498,6 +514,7 @@ tcu::TestNode::IterateResult ShaderLayerFramebufferTestCaseBase::iterate()
                GLU_EXPECT_NO_ERROR(gl.getError(), "ReadPixels");
                bool validationResult =
                        ShaderViewportLayerArrayUtils::validateColor(tcu::Vec4(rgba[0], rgba[1], rgba[2], rgba[3]), renderColor);
+
                TCU_CHECK_MSG(validationResult, "Expected pixel color did not match rendered one.");
        }
 
index cac1741..dff73e2 100644 (file)
@@ -156,6 +156,7 @@ public:
        ShaderLayerFramebufferTestCaseBase(deqp::Context& context, const char* name, const char* description, bool layered);
 
        void init();
+       void deinit();
 
        tcu::TestNode::IterateResult iterate();
 };
index c18cb48..ab56c3d 100644 (file)
@@ -945,7 +945,7 @@ bool AtomicCounterBufferStorageTestCase::execute(glw::GLuint sparse_bo_storage_f
                else
                {
                        m_gl.bindBufferRange(GL_ATOMIC_COUNTER_BUFFER, 0, /* index */
-                                                                m_sparse_bo, m_sparse_bo_data_start_offset, m_sparse_bo_data_size);
+                                                                m_sparse_bo, m_sparse_bo_data_start_offset, m_helper_bo_size);
 
                        GLU_EXPECT_NO_ERROR(m_gl.getError(), "glBindBufferRange() call failed.");
                }