Remove read value check against uncommitted pages
authorPiers Daniell <pdaniell@nvidia.com>
Thu, 21 Dec 2017 19:49:09 +0000 (12:49 -0700)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Thu, 25 Jan 2018 01:56:01 +0000 (20:56 -0500)
Reading from uncommitted pages produces undefined results so checks that
the result is zero in invalid. Only data read from committed pages has
undefined results. The PixelUnpackBufferStorageTestCase subtest was the
only subtest that was checking reads from uncommitted pages. All the
other subtest already did not do this.

Affects:
KHR-GL46.sparse_buffer_tests.BufferStorageTest

Components: OpenGL

VK-GL-CTS Issue: 921

Change-Id: Ie7e61553cbad2454af03f39b7cdbd1ae8ab66d93

external/openglcts/modules/gl/gl4cSparseBufferTests.cpp

index 547ad61..e67f508 100644 (file)
@@ -3565,8 +3565,7 @@ bool PixelUnpackBufferStorageTestCase::execute(glw::GLuint sparse_bo_storage_fla
                                                expected_value = *texture_data_traveller_ptr;
                                        }
 
-                                       if ((is_from_committed_page && de::abs(expected_value - *read_data_traveller_ptr) >= 1) ||
-                                               (!is_from_committed_page && *read_data_traveller_ptr != expected_value))
+                                       if (is_from_committed_page && de::abs(expected_value - *read_data_traveller_ptr) >= 1)
                                        {
                                                m_testCtx.getLog() << tcu::TestLog::Message << "Invalid texel data (channel:" << n_component
                                                                                   << ")"
@@ -3577,7 +3576,7 @@ bool PixelUnpackBufferStorageTestCase::execute(glw::GLuint sparse_bo_storage_fla
                                                                                                   " Expected value:"
                                                                                   << expected_value << ","
                                                                                                                                " found value:"
-                                                                                  << *texture_data_traveller_ptr << tcu::TestLog::EndMessage;
+                                                                                  << *read_data_traveller_ptr << tcu::TestLog::EndMessage;
 
                                                result_local = false;
                                        }
@@ -3674,10 +3673,6 @@ bool PixelUnpackBufferStorageTestCase::initTestCaseIteration(glw::GLuint sparse_
 
        m_sparse_bo = sparse_bo;
 
-       /* Set up the sparse buffer. */
-       m_gl.bindBuffer(GL_QUERY_BUFFER, m_sparse_bo);
-       GLU_EXPECT_NO_ERROR(m_gl.getError(), "glBindBuffer() call failed.");
-
        return result;
 }