Delete incorrect invalid map CTS tests.
authorKenneth Graunke <kenneth.w.graunke@intel.com>
Fri, 8 Sep 2017 23:18:49 +0000 (16:18 -0700)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Fri, 15 Sep 2017 10:03:51 +0000 (06:03 -0400)
The citation given in these tests comes from the OpenGL man pages, which
are not authoritative.  The ES 3.2 and GL 4.x specifications say:

   "Effects of Mapping Buffers on Other GL Commands

    Any GL command which attempts to read from, write to, or change the
    state of a buffer object may generate an INVALID_OPERATION error if
    all or part of the buffer object is mapped. However, only commands
    which explicitly describe this error are required to do so. If an
    error is not generated, using such commands to perform invalid
    reads, writes, or state changes will have undefined results and may
    result in GL interruption or termination."

Importantly, it says "_may_ generate an INVALID_OPERATION error".  Some
drivers choose not to implement this to avoid the CPU overhead required
to enforce this optional restriction.

Affects:
- KHR-*.draw_elements_base_vertex_tests.invalid_mapped_bos

VK-GL-CTS issue: 682

Components: OpenGL

Change-Id: I4c0f7785ca7a747145591d071dda6e5231c787d4

external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl40-master.txt
external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl41-master.txt
external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl42-master.txt
external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl43-master.txt
external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl44-master.txt
external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl45-master.txt
external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl46-master.txt
external/openglcts/modules/glesext/draw_elements_base_vertex/esextcDrawElementsBaseVertexTests.cpp

index 46962fbccf17a85b3f3c8e4d5c8c64169899be48..cbc61ff1b465fb2a70acbe05c0932b068459fb77 100644 (file)
@@ -2778,7 +2778,6 @@ KHR-GL40.draw_elements_base_vertex_tests.invalid_mode_argument
 KHR-GL40.draw_elements_base_vertex_tests.invalid_primcount_argument
 KHR-GL40.draw_elements_base_vertex_tests.invalid_start_end_arguments
 KHR-GL40.draw_elements_base_vertex_tests.invalid_type_argument
-KHR-GL40.draw_elements_base_vertex_tests.invalid_mapped_bos
 KHR-GL40.gpu_shader_fp64.fp64.errors
 KHR-GL40.gpu_shader_fp64.fp64.max_uniform_components
 KHR-GL40.gpu_shader_fp64.fp64.named_uniform_blocks
index 3e6350ca948e09f75ddf1a19d2a2eba9774f4679..9e499b6baf2b601fcd5741a65b65ddd1200667a7 100644 (file)
@@ -2778,7 +2778,6 @@ KHR-GL41.draw_elements_base_vertex_tests.invalid_mode_argument
 KHR-GL41.draw_elements_base_vertex_tests.invalid_primcount_argument
 KHR-GL41.draw_elements_base_vertex_tests.invalid_start_end_arguments
 KHR-GL41.draw_elements_base_vertex_tests.invalid_type_argument
-KHR-GL41.draw_elements_base_vertex_tests.invalid_mapped_bos
 KHR-GL41.gpu_shader_fp64.fp64.errors
 KHR-GL41.gpu_shader_fp64.fp64.max_uniform_components
 KHR-GL41.gpu_shader_fp64.fp64.named_uniform_blocks
index cc99b82836c1e12314d0cd589070eada1dec8fce..5ebf814b2703522677014824aca2ef03c81224be 100644 (file)
@@ -2778,7 +2778,6 @@ KHR-GL42.draw_elements_base_vertex_tests.invalid_mode_argument
 KHR-GL42.draw_elements_base_vertex_tests.invalid_primcount_argument
 KHR-GL42.draw_elements_base_vertex_tests.invalid_start_end_arguments
 KHR-GL42.draw_elements_base_vertex_tests.invalid_type_argument
-KHR-GL42.draw_elements_base_vertex_tests.invalid_mapped_bos
 KHR-GL42.gpu_shader_fp64.fp64.errors
 KHR-GL42.gpu_shader_fp64.fp64.max_uniform_components
 KHR-GL42.gpu_shader_fp64.fp64.named_uniform_blocks
index b7a16f87cffd0c042c674619852db1454b05ca27..2e916eeb50d3b0337d738655240d26e3e546fe30 100644 (file)
@@ -2778,7 +2778,6 @@ KHR-GL43.draw_elements_base_vertex_tests.invalid_mode_argument
 KHR-GL43.draw_elements_base_vertex_tests.invalid_primcount_argument
 KHR-GL43.draw_elements_base_vertex_tests.invalid_start_end_arguments
 KHR-GL43.draw_elements_base_vertex_tests.invalid_type_argument
-KHR-GL43.draw_elements_base_vertex_tests.invalid_mapped_bos
 KHR-GL43.gpu_shader_fp64.fp64.errors
 KHR-GL43.gpu_shader_fp64.fp64.max_uniform_components
 KHR-GL43.gpu_shader_fp64.fp64.named_uniform_blocks
index a96fdebeaa2a81ed2b568d631224f86390402e99..036e39801732dbbf9d40a28b1a5652fdbfe45507 100644 (file)
@@ -2778,7 +2778,6 @@ KHR-GL44.draw_elements_base_vertex_tests.invalid_mode_argument
 KHR-GL44.draw_elements_base_vertex_tests.invalid_primcount_argument
 KHR-GL44.draw_elements_base_vertex_tests.invalid_start_end_arguments
 KHR-GL44.draw_elements_base_vertex_tests.invalid_type_argument
-KHR-GL44.draw_elements_base_vertex_tests.invalid_mapped_bos
 KHR-GL44.gpu_shader_fp64.fp64.errors
 KHR-GL44.gpu_shader_fp64.fp64.max_uniform_components
 KHR-GL44.gpu_shader_fp64.fp64.named_uniform_blocks
index 74c13cedbb4ebfc0760c0896136f742494316b97..2bd3b706273d6623f6666b9a3ca8090320bc0d2d 100644 (file)
@@ -2778,7 +2778,6 @@ KHR-GL45.draw_elements_base_vertex_tests.invalid_mode_argument
 KHR-GL45.draw_elements_base_vertex_tests.invalid_primcount_argument
 KHR-GL45.draw_elements_base_vertex_tests.invalid_start_end_arguments
 KHR-GL45.draw_elements_base_vertex_tests.invalid_type_argument
-KHR-GL45.draw_elements_base_vertex_tests.invalid_mapped_bos
 KHR-GL45.gpu_shader_fp64.fp64.errors
 KHR-GL45.gpu_shader_fp64.fp64.max_uniform_components
 KHR-GL45.gpu_shader_fp64.fp64.named_uniform_blocks
index 76c446e6fafa7befb1b93b89e78537a5c181a5c6..93eda3d6919dfe2c493c304ef56476f5592a1e7c 100644 (file)
@@ -2778,7 +2778,6 @@ KHR-GL46.draw_elements_base_vertex_tests.invalid_mode_argument
 KHR-GL46.draw_elements_base_vertex_tests.invalid_primcount_argument
 KHR-GL46.draw_elements_base_vertex_tests.invalid_start_end_arguments
 KHR-GL46.draw_elements_base_vertex_tests.invalid_type_argument
-KHR-GL46.draw_elements_base_vertex_tests.invalid_mapped_bos
 KHR-GL46.gpu_shader_fp64.fp64.errors
 KHR-GL46.gpu_shader_fp64.fp64.max_uniform_components
 KHR-GL46.gpu_shader_fp64.fp64.named_uniform_blocks
index 8e568c6e39f6260c8eb9bab4889a6a8cd4b2c98a..0947ac3e73d78b51337d265c7683a03980401e23 100644 (file)
@@ -3286,133 +3286,6 @@ tcu::TestNode::IterateResult DrawElementsBaseVertexNegativeInvalidTypeArgumentTe
        return STOP;
 }
 
-/** Constructor.
- *
- *  @param context Rendering context handle.
- **/
-DrawElementsBaseVertexNegativeMappedBufferObjectsTest::DrawElementsBaseVertexNegativeMappedBufferObjectsTest(
-       Context& context, const ExtParameters& extParams)
-       : DrawElementsBaseVertexTestBase(
-                 context, extParams, "invalid_mapped_bos",
-                 "Tries to use mapped VBO and Index Buffer Object for the \"base vertex\" draw calls")
-{
-       /* Left blank on purpose */
-}
-
-/** Executes test iteration.
- *
- *  @return Returns STOP when test has finished executing, CONTINUE if more iterations are needed.
- */
-tcu::TestNode::IterateResult DrawElementsBaseVertexNegativeMappedBufferObjectsTest::iterate()
-{
-       const glw::Functions& gl = m_context.getRenderContext().getFunctions();
-
-       /* The test needs to be run in four iterations, where for each iteration we configure the VAO
-        * in a slightly different manner.
-        */
-       for (int iteration = 0; iteration < 4; ++iteration)
-       {
-               bool use_clientside_index_data  = ((iteration & (1 << 0)) != 0);
-               bool use_clientside_vertex_data = ((iteration & (1 << 1)) != 0);
-
-               /* OpenGL does not support client-side data. */
-               if (!glu::isContextTypeES(m_context.getRenderContext().getType()))
-               {
-                       if (use_clientside_index_data || use_clientside_vertex_data)
-                       {
-                               continue;
-                       }
-               }
-
-               /* Skip the iteration where no array buffer is used */
-               if (use_clientside_vertex_data)
-               {
-                       continue;
-               }
-
-               /* Set up the work environment */
-               setUpNegativeTestObjects(use_clientside_vertex_data, use_clientside_index_data);
-
-               /* Map the buffer object into process space */
-               const glw::GLvoid* bo_ptr = gl.mapBufferRange(GL_ARRAY_BUFFER, 0, /* offset */
-                                                                                                         m_bo_negative_data_vertex_size, GL_MAP_READ_BIT);
-               (void)bo_ptr;
-               GLU_EXPECT_NO_ERROR(gl.getError(), "glMapBufferRange() call failed.");
-
-               /* Perform draw calls that would otherwise have been valid, if it
-                * were not for the mapped VBO
-                */
-               glw::GLenum error_code = GL_NONE;
-
-               gl.drawElementsBaseVertex(GL_TRIANGLES, 3,                                                               /* count */
-                                                                 GL_UNSIGNED_INT, m_draw_call_index_offset, 0); /* basevertex */
-
-               error_code = gl.getError();
-               if (error_code != GL_INVALID_OPERATION)
-               {
-                       std::stringstream error_sstream;
-
-                       error_sstream << "Invalid error code generated by "
-                                                 << getFunctionName(FUNCTION_GL_DRAW_ELEMENTS_BASE_VERTEX);
-
-                       m_testCtx.getLog() << tcu::TestLog::Message << getFunctionName(FUNCTION_GL_DRAW_ELEMENTS_BASE_VERTEX)
-                                                          << " returned error code [" << error_code << "] instead of GL_INVALID_OPERATION."
-                                                          << tcu::TestLog::EndMessage;
-
-                       TCU_FAIL(error_sstream.str().c_str());
-               } /* if (error_code != GL_INVALID_OPERATION) */
-
-               gl.drawElementsInstancedBaseVertex(GL_TRIANGLES, 3,                                                              /* count */
-                                                                                  GL_UNSIGNED_INT, m_draw_call_index_offset, 1, /* instancecount */
-                                                                                  0);                                                                                   /* basevertex */
-
-               error_code = gl.getError();
-               if (error_code != GL_INVALID_OPERATION)
-               {
-                       std::stringstream error_sstream;
-
-                       error_sstream << "Invalid error code generated by "
-                                                 << getFunctionName(FUNCTION_GL_DRAW_ELEMENTS_INSTANCED_BASE_VERTEX);
-
-                       m_testCtx.getLog() << tcu::TestLog::Message
-                                                          << getFunctionName(FUNCTION_GL_DRAW_ELEMENTS_INSTANCED_BASE_VERTEX)
-                                                          << " returned error code [" << error_code << "] instead of GL_INVALID_OPERATION."
-                                                          << tcu::TestLog::EndMessage;
-
-                       TCU_FAIL(error_sstream.str().c_str());
-               }
-
-               gl.drawRangeElementsBaseVertex(GL_TRIANGLES, 0, 2,                                                        /* end */
-                                                                          3,                                                                                     /* count */
-                                                                          GL_UNSIGNED_INT, m_draw_call_index_offset, 0); /* basevertex */
-
-               error_code = gl.getError();
-               if (error_code != GL_INVALID_OPERATION)
-               {
-                       std::stringstream error_sstream;
-
-                       error_sstream << "Invalid error code generated by "
-                                                 << getFunctionName(FUNCTION_GL_DRAW_RANGE_ELEMENTS_BASE_VERTEX);
-
-                       m_testCtx.getLog() << tcu::TestLog::Message << getFunctionName(FUNCTION_GL_DRAW_RANGE_ELEMENTS_BASE_VERTEX)
-                                                          << " returned error code [" << error_code << "] instead of GL_INVALID_OPERATION."
-                                                          << tcu::TestLog::EndMessage;
-
-                       TCU_FAIL(error_sstream.str().c_str());
-               }
-
-               /* Unmap the BO before we proceed */
-               gl.unmapBuffer(GL_ARRAY_BUFFER);
-               GLU_EXPECT_NO_ERROR(gl.getError(), "glUnmapBuffer() call failed");
-
-       } /* for (all test iterations) */
-
-       /* Test case passed */
-       m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass");
-
-       return STOP;
-}
-
 /** Constructor.
  *
  *  @param context Rendering context.
@@ -3440,7 +3313,6 @@ void DrawElementsBaseVertexTests::init()
        addChild(new DrawElementsBaseVertexNegativeInvalidPrimcountArgumentTest(m_context, m_extParams));
        addChild(new DrawElementsBaseVertexNegativeInvalidStartEndArgumentsTest(m_context, m_extParams));
        addChild(new DrawElementsBaseVertexNegativeInvalidTypeArgumentTest(m_context, m_extParams));
-       addChild(new DrawElementsBaseVertexNegativeMappedBufferObjectsTest(m_context, m_extParams));
 }
 
 } /* glcts namespace */