Conformance Test CTS_ARB_sparse_texture Contributors Adam Czupryna, Mobica Contacts Adam Czupryna, Mobica (adam.czupryna 'at' mobica.com) Status In review Version August 4, 2016 (version 1) Dependencies OpenGL 1.1 is required. ARB_sparse_texture extension is required. GL_EXT_direct_state_access extension is required. This specification is written against: - ARB_sparse_texture specification, - OpenGL 4.3 (core) specification. Overview This test verifies the separation of the graphics processor's address space (reservation) from the requirement that all textures must be physically backed (commitment). New Tests New State Queries Test * Test TexParameter{if}{v}, TexParameterI{u}v, GetTexParameter{if}v and GetTexParameterIi{u}v queries for : - TEXTURE_SPARSE_ARB, - VIRTUAL_PAGE_SIZE_INDEX_ARB Check default values and set manually. Errors verification: INVALID_VALUE - Use TexParameter* function to set TEXTURE_SPARSE_ARB parameter to TRUE on a texture binded to target not supporting TEXTURE_SPARSE_ARB * Test GetTexParameter{if}v and GetTexParameterIi{u}v queries for : - NUM_SPARSE_LEVELS_ARB Check default values. * Test GetInternalformativ query for formats from Table 8.12 and : - NUM_VIRTUAL_PAGE_SIZES_ARB, - VIRTUAL_PAGE_SIZE_X_ARB, - VIRTUAL_PAGE_SIZE_Y_ARB, - VIRTUAL_PAGE_SIZE_Z_ARB Check default values. * Test GetIntegerv, GetFloatv, GetDoublev, GetInteger64v, and GetBooleanv queries for : - MAX_SPARSE_TEXTURE_SIZE_ARB, - MAX_SPARSE_3D_TEXTURE_SIZE_ARB, - MAX_SPARSE_ARRAY_TEXTURE_LAYERS_ARB, - SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB Check default values. Sparse Allocation Test Use TexStorage* for all targets and sized internal formats Errors verification: INVALID_OPERATION - Use TexParameter* function to set TEXTURE_SPARSE_ARB parameter to TRUE on a texture for which TEXTURE_IMMUTABLE_FORMAT parameter is set to TRUE. - Use TexParameter* function to set VIRTUAL_PAGE_SIZE_INDEX_ARB parameter to TRUE on a texture for which TEXTURE_IMMUTABLE_FORMAT parameter is set to TRUE. - Use TexStorage* on a texture for which TEXTURE_SPARSE_ARB parameter is TRUE and VIRTUAL_PAGE_SIZE_INDEX_ARB parameter is greater than NUM_VIRTUAL_PAGE_SIZES_ARB. - Use TexStorage* on a texture for which SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB parameter is FALSE and: * TEXTURE_SPARSE_ARB parameter is TRUE * is one of TEXTURE_1D_ARRAY, TEXTURE_2D_ARRAY, TEXTURE_CUBE_MAP, or TEXTURE_CUBE_MAP_ARRAY, * For the virtual page size corresponding to the VIRTUAL_PAGE_SIZE_INDEX_ARB parameter, either of the following is true: - is not a multiple of VIRTUAL_PAGE_SIZE_X_ARB * 2^(-1), - is not a multiple of VIRTUAL_PAGE_SIZE_Y_ARB * 2^(-1). INVALID_VALUE - Use TexStorage* on a texture for which TEXTURE_SPARSE_ARB parameter is TRUE and: * is TEXTURE_3D, and , , or is greater than MAX_SPARSE_3D_TEXTURE_SIZE_ARB. * is not TEXTURE_3D, and or is greater than MAX_SPARSE_TEXTURE_SIZE_ARB. * is TEXTURE_2D_ARRAY or TEXTURE_CUBE_MAP_ARRAY and is greater than MAX_SPARSE_TEXTURE_ARRAY_LAYERS_ARB. * or is greater than the value of MAX_SPARSE_3D_TEXTURE_SIZE_ARB when is TEXTURE_3D, or if or is greater than the value of MAX_SPARSE_ARRAY_TEXTURE_LAYERS_ARB if is a 1D or 2D array texture target, respectively. * , or is not an integer multiple of the page size in the corresponding dimension. Sparse Texture Commitment Test Iterate through all targets and supported sized internal formats. Sparse allocate TexStorage*. Write data to texture storage using TexSubImage*. Verify if no error is generated. Commit texture pages region with TexPageCommitmentARB. Write data to texture storage using TexSubImage*. Verify if data stored is as expected. Errors verification: INVALID_OPERATION - Use TexPageCommitmentARB with + or + greater than the width or height, respectively, of level for the texture bound to . - Use TexPageCommitmentARB with + greater than: * the depth of level for the texture bound to , if is TEXTURE_3D, * the number of layers of level for the texture bound to , if is TEXTURE_2D_ARRAY, * six times the number of layers of level for the texture bound to , if is TEXTURE_CUBE_MAP_ARRAY, * one, for all other targets. - Use TexPageCommitmentARB with that is not an integer multiple of VIRTUAL_PAGE_SIZE_X_ARB and plus not equal to the width of level for the texture bound to . - Use TexPageCommitmentARB with that is not an integer multiple of VIRTUAL_PAGE_SIZE_Y_ARB and plus not equal to the height of level for the texture bound to . - Use TexPageCommitmentARB with that is not an integer multiple of VIRTUAL_PAGE_SIZE_Z_ARB and plus not equal to: * the depth of level for the texture bound to , if is TEXTURE_3D, * the number of layers of level for the texture bound to , if is TEXTURE_2D_ARRAY, * six times the number of layers of level for the texture bound to , if is TEXTURE_CUBE_MAP_ARRAY, * one, for all other targets. - Use TexPageCommitmentARB on a texture for which the value of TEXTURE_IMMUTABLE_FORMAT or TEXTURE_SPARSE_ARB is FALSE. INVALID_VALUE - Use TexPageCommitmentARB with , , or that is not a multiple of VIRTUAL_PAGE_SIZE_X_ARB, VIRTUAL_PAGE_SIZE_Y_ARB, or VIRTUAL_PAGE_SIZE_Z_ARB, respectively, for the texture bound to . Direct State Access Commitment Test Iterate through all targets and supported sized internal formats. Sparse allocate TesStorage*. Write data to texture storage using TexSubImage*. Verify if no error is generated. Commit texture pages region with TexturePageCommitmentEXT. Write data to texture storage using TexSubImage*. Verify if data stored is as expected. Errors verification: INVALID_OPERATION - Use TexturePageCommitmentEXT with that is not the name of an existing texture. All other errors listed for TexPageCommitmentARB also apply to TexturePageCommitmentEXT, except that references to "the texture bound to " should be replaced with "the texture ", and all other references to "" should be replaced with "the target of texture ". Revision History Revision 1, 4 August, 2016 (Adam Czupryna) - Intial version;