Add some missing GL_TEXTURE_SPARSE state setting
authorPiers Daniell <pdaniell@nvidia.com>
Wed, 20 Dec 2017 22:27:34 +0000 (15:27 -0700)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Tue, 23 Jan 2018 08:13:24 +0000 (03:13 -0500)
commit98a25eff33de9b1105538b2980fa1c9b3d09c079
treec284ca156c96395c7f453b942d9f7308c821b959
parent63bffb555487763551c062877269a3f41d324673
Add some missing GL_TEXTURE_SPARSE state setting

Some parts of the SparseTextureAllocation test were not setting the
GL_TEXTURE_SPARSE_ARB state on the texture object before
negative-testing sparse texture behavior. This meant that these parts of
the test ran as non-sparse texture. In many cases this issue was masked,
except for the case where the implementation didn't support
GL_ARB_sparse_texture2. In this case it expected a glTexStorage call
with width/height/depth not a multiple of the page size to fail. It
wouldn't fail because the texture was actually non-sparse.

Another problematic part of the test was with the
GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB negative testing.
The test implemented did not fully the test spec or the OpenGL
spec. The correct negative testing of
GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB requires all the
conditions of GL_TEXTURE_SPARSE_ARB set, the correct target
*and* a width/depth that doesn't follow the requirement. The
test tried to test *or* of those conditions and was just wrong.
In addition it tried to use verifyTexStorageInvalidValueErrors()
to verify invalid texture targets, which would never pass.

Affects:
KHR-GL45.sparse_texture_tests.SparseTextureAllocation
KHR-GL46.sparse_texture_tests.SparseTextureAllocation

Components: OpenGL

VK-GL-CTS issue: 917

Change-Id: If25edd0aae382b7305b87ac0a810259e9ee67523
external/openglcts/modules/gl/gl4cSparseTextureTests.cpp