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