blob: c303e45191b2bb6e8d3c4f3b0dd031f13978a3d2 [file] [log] [blame]
Conformance Test
CTS_ARB_sparse_texture2
Contributors
Adam Czupryna, Mobica
Contacts
Adam Czupryna, Mobica (adam.czupryna 'at' mobica.com)
Status
In review
Version
October 4, 2016 (version 1)
Dependencies
OpenGL 4.5 is required.
ARB_sparse_texture extension is required.
ARB_sparse_texture2 extension is required.
This specification is written against:
- ARB_sparse_texture2 specification,
- OpenGL 4.5 (core) specification.
Overview
This tests verifies if functionality provided by ARB_sparse_texture2
works as expected:
* Checks if new built-in GLSL texture lookup and image load functions
return information on whether the texels accessed for the texture
lookup accessed uncommitted texture memory.
* Checks if reads of uncommitted texture memory will act as though such
memory were filled with zeroes; previously, the values returned by
reads were undefined.
* Standard implementation-independent virtual page sizes for internal
formats required to be supported with sparse textures. Checks if these
standard sizes can be requested by leaving VIRTUAL_PAGE_SIZE_INDEX_ARB
at its initial value (0).
* Checks if support for creating sparse multisample and multisample array
textures is added and the virtual page sizes for such textures remain
fully implementation-dependent.
CTS_ARB_sparse_texture Changes
Sparse Allocation Test
* No more INVALID_VALUE error is generated by TexStorage* function if
TEXTURE_SPARSE_ARB parameter is TRUE and <width>, <height> or
<depth> is not an integer multiple of the page size in the
corresponding dimension.
New Tests
Sparse Allocation Test
* Extend CTS_ARB_sparse_texture SparseAllocationTestCase with targets
TEXTURE_2D_MULTISAMPLE and TEXTURE_2D_MULTISAMPLE_ARRAY.
* Test if SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB parameter is always
TRUE for targets: TEXTURE_1D_ARRAY, TEXTURE_2D_ARRAY, TEXTURE_CUBE_MAP,
TEXTURE_CUBE_MAP_ARRAY or TEXTURE_2D_MULTISAMPLE_ARRAY.
Sparse Texture Commitment Test
* Extend CTS_ARB_sparse_texture SparseTextureCommitmentTestCase with targets
TEXTURE_2D_MULTISAMPLE and TEXTURE_2D_MULTISAMPLE_ARRAY.
* Test if for levels of a sparse texture where each dimension is greater than or
equal to of the virtual page size, the residency of individual page-size
regions may be controlled by TexPageCommitmentARB and such levels may be
partially populated.
Standard Virtual Page Sizes Test
* Test GetInternalformativ query for formats from Table 8.X, Standard
Virtual Page Sizes for Sparse Textures and <pname>:
- VIRTUAL_PAGE_SIZE_X_ARB,
- VIRTUAL_PAGE_SIZE_Y_ARB,
- VIRTUAL_PAGE_SIZE_Z_ARB
Check if values returned by query matches Standard Virtual Page Sizes.
Uncommitted Regions Access Test
* Verify if reads from such regions produce zeros for all components
present in the texture format. This includes samples required for the
implementation of texture filtering, image loads, mipmap generation,
and so on.
Test it for different texture formats and different read functions.
* Verify if atomic operations on such regions will not generate
exceptions but will always return zero and the result of the atomic
operation, which is normally written to memory, will instead be
discarded.
Test it for different atomic operations.
* Verify if performing the stencil test (section 17.3.5), depth buffer test
(section 17.3.6), or depth bounds test (if supported) on pixels in
uncommitted regions, the results of the test will be consistent with
reading a value of zero from the framebuffer. No value is written to the
depth buffer.
Shader Extension Test
* Create shader that require ARB_sparse_texture2 extension
and check if ARB_sparse_texture2 is defined and equal 1.
Check if shader compiles with no error.
Shader Sparse Texture Lookup Tests
* Iterate through all sparse supported targets.
Allocate sparse texture for current <target> with committed and
uncommitted regions.
Create multiple shaders that enables ARB_sparse_texture2 extension
and each use one of the function from list below
(if supported by <target>):
- sparseTextureARB
- sparseTextureLodARB
- sparseTextureOffsetARB
- sparseTexelFetchARB
- sparseTexelFetchOffsetARB
- sparseTextureLodOffsetARB
- sparseTextureGradARB
- sparseTextureGradOffsetARB
- sparseTextureGatherARB
- sparseTextureGatherOffsetARB
- sparseTextureGatherOffsetsARB
- sparseImageLoadARB
Shaders should check texture access residency information using
sparseTexelsResidentARB function and pass vec4(1, 1, 1, 1) to the output
if access committed region and vec4(0, 0, 0, 1) otherwise.
Iterate through shaders, create and use program for current iteration
and draw a prepared texture.
Verify if shader pass test by reading pixels from framebuffer and
checking if their values are as expected.
Revision History
Revision 1, 4 October, 2016 (Adam Czupryna)
- Intial version;