Fix various ARB_sparse_buffer test issues
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 27 Mar 2017 20:12:58 +0000 (22:12 +0200)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Fri, 31 Mar 2017 15:48:41 +0000 (11:48 -0400)
commitb483f3110ce964ee05267f9a19cdcdee53d3bd47
tree6cf77bed264d73c568abe81c6dd82a27ae95a520
parent3869403485cc1c79bf3de711cfbb43981e80368d
Fix various ARB_sparse_buffer test issues

AtomicCounterBufferStorageTestCase: The non-sparse helper buffer was
too small because unlike the sparse storage buffer, its size was not
rounded up.

BufferTextureStorageTestCase: The buffer bindings must be established
during execution (or init of the individual test) instead of during
initTestCaseGlobal (otherwise, other tests will interfere).

PixelPackBufferStorageTestCase: The pixel pack buffer binding must be
cleared at the end of the test, or subsequent tests get broken.

PixelUnpackBufferStorageTestCase: As for PixelPackBufferStorageTestCase;
additionally, the pixel unpack buffer must be un-bound while
uploading data from client memory.

QueryBufferStorageTestCase: The helper buffer that is used to read
back the query result must be 8 bytes in size (to hold a 64-bit
number). It must be cleared *before* the query result is copied for
the 32-bit case.

TransformFeedbackBufferStorageTestCase: Map the entire helper buffer
where transform feedback data was written; this is important for the
separate-attribute sub-test, where results are spread across the
buffer. Also, perform the check whether a result lies within the
committed region *before* updating the pointers.

UniformBufferStorageTestCase: ARB_sparse_buffer is like the basic
ARB_sparse_texture in that reads from uncommitted memory regions
are *not* guaranteed to return 0. Furthermore, the transform
feedback buffer bindings must be established during execution instead
of during initTestCaseGlobal (otherwise, other tests will interfere).

Affects:
GL45-CTS.sparse_buffer_tests.BufferStorageTest

Components: OpenGL
VK-GL-CTS issue: 332

Change-Id: If11c617bf8a5a5a6cf402eb33d287a5b4b390485
external/openglcts/modules/gl/gl4cSparseBufferTests.cpp