From 0949de26f594f378cd503ded59ff99e41e6f56ad Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Fri, 8 Sep 2017 16:18:49 -0700 Subject: [PATCH] Delete incorrect invalid map CTS tests. 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 (cherry picked from commit 6a50dd2a2cd0a3f867fe6bdabbf8dc9fb678fb99) --- .../gl/khronos_mustpass/4.6.0.x/gl40-master.txt | 1 - .../gl/khronos_mustpass/4.6.0.x/gl41-master.txt | 1 - .../gl/khronos_mustpass/4.6.0.x/gl42-master.txt | 1 - .../gl/khronos_mustpass/4.6.0.x/gl43-master.txt | 1 - .../gl/khronos_mustpass/4.6.0.x/gl44-master.txt | 1 - .../gl/khronos_mustpass/4.6.0.x/gl45-master.txt | 1 - .../gl/khronos_mustpass/4.6.0.x/gl46-master.txt | 1 - .../esextcDrawElementsBaseVertexTests.cpp | 128 --------------------- 8 files changed, 135 deletions(-) diff --git a/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl40-master.txt b/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl40-master.txt index 120cf8d..9529973 100644 --- a/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl40-master.txt +++ b/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl40-master.txt @@ -2616,7 +2616,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 diff --git a/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl41-master.txt b/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl41-master.txt index eed3795..a4c0c2e 100644 --- a/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl41-master.txt +++ b/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl41-master.txt @@ -2616,7 +2616,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 diff --git a/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl42-master.txt b/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl42-master.txt index 8a6fb30..6414552 100644 --- a/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl42-master.txt +++ b/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl42-master.txt @@ -2616,7 +2616,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 diff --git a/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl43-master.txt b/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl43-master.txt index d7f7a32..c65e4dd 100644 --- a/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl43-master.txt +++ b/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl43-master.txt @@ -2616,7 +2616,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 diff --git a/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl44-master.txt b/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl44-master.txt index 3d12dd2..8fdea02 100644 --- a/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl44-master.txt +++ b/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl44-master.txt @@ -2616,7 +2616,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 diff --git a/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl45-master.txt b/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl45-master.txt index d82ac27..6445b09 100644 --- a/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl45-master.txt +++ b/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl45-master.txt @@ -2616,7 +2616,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 diff --git a/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl46-master.txt b/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl46-master.txt index 9d1bcc1..fca5403 100644 --- a/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl46-master.txt +++ b/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl46-master.txt @@ -2616,7 +2616,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 diff --git a/external/openglcts/modules/glesext/draw_elements_base_vertex/esextcDrawElementsBaseVertexTests.cpp b/external/openglcts/modules/glesext/draw_elements_base_vertex/esextcDrawElementsBaseVertexTests.cpp index 8e568c6..0947ac3 100644 --- a/external/openglcts/modules/glesext/draw_elements_base_vertex/esextcDrawElementsBaseVertexTests.cpp +++ b/external/openglcts/modules/glesext/draw_elements_base_vertex/esextcDrawElementsBaseVertexTests.cpp @@ -3288,133 +3288,6 @@ tcu::TestNode::IterateResult DrawElementsBaseVertexNegativeInvalidTypeArgumentTe /** 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. */ DrawElementsBaseVertexTests::DrawElementsBaseVertexTests(glcts::Context& context, const ExtParameters& extParams) @@ -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 */ -- 2.7.4