Fix the copy-ops part of the ARB_sparse_buffer tests
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 27 Mar 2017 20:16:04 +0000 (22:16 +0200)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Fri, 31 Mar 2017 15:50:30 +0000 (11:50 -0400)
commit0fb87bc5fdfb83cb21d36ed190babdeef6a81391
treeef9d15cbe737b0830ebec5b7f60300be5652cf91
parentb483f3110ce964ee05267f9a19cdcdee53d3bd47
Fix the copy-ops part of the ARB_sparse_buffer tests

1. The generic BufferStorageTest framework will allocate a new sparse
   buffer object for each test case, so m_sparse_bos must be updated
   for each iteration.

   For the same reason, the m_sparse_bos array is not yet initialized
   when initTestCases is called. So instead of storing a BO ID in the
   test case description, we store an index into the m_sparse_bos array
   (and the index is only used when the dst/src bo is supposed to be
   sparse).

2. When the same sparse buffer object is used as both source and
   destination, both source and destination commit ranges must
   actually be committed.

Affects:
GL45-CTS.sparse_buffer_tests.BufferStorageTest

Components: OpenGL
VK-GL-CTS issue: 332

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