1Conformance Test 2 3 CTS_ARB_sparse_texture 4 5Contributors 6 7 Adam Czupryna, Mobica 8 9Contacts 10 11 Adam Czupryna, Mobica (adam.czupryna 'at' mobica.com) 12 13Status 14 15 In review 16 17Version 18 19 August 4, 2016 (version 1) 20 21Dependencies 22 23 OpenGL 1.1 is required. 24 25 ARB_sparse_texture extension is required. 26 27 GL_EXT_direct_state_access extension is required. 28 29 This specification is written against: 30 - ARB_sparse_texture specification, 31 - OpenGL 4.3 (core) specification. 32 33Overview 34 35 This test verifies the separation of the graphics processor's address 36 space (reservation) from the requirement that all textures must be 37 physically backed (commitment). 38 39New Tests 40 41 New State Queries Test 42 43 * Test TexParameter{if}{v}, TexParameterI{u}v, GetTexParameter{if}v 44 and GetTexParameterIi{u}v queries for <pname>: 45 46 - TEXTURE_SPARSE_ARB, 47 - VIRTUAL_PAGE_SIZE_INDEX_ARB 48 49 Check default values and set manually. 50 51 Errors verification: 52 53 INVALID_VALUE 54 55 - Use TexParameter* function to set TEXTURE_SPARSE_ARB parameter 56 to TRUE on a texture binded to target not supporting 57 TEXTURE_SPARSE_ARB 58 59 * Test GetTexParameter{if}v and GetTexParameterIi{u}v queries for <pname>: 60 61 - NUM_SPARSE_LEVELS_ARB 62 63 Check default values. 64 65 * Test GetInternalformativ query for formats from Table 8.12 and <pname>: 66 67 - NUM_VIRTUAL_PAGE_SIZES_ARB, 68 - VIRTUAL_PAGE_SIZE_X_ARB, 69 - VIRTUAL_PAGE_SIZE_Y_ARB, 70 - VIRTUAL_PAGE_SIZE_Z_ARB 71 72 Check default values. 73 74 * Test GetIntegerv, GetFloatv, GetDoublev, GetInteger64v, 75 and GetBooleanv queries for <pname>: 76 77 - MAX_SPARSE_TEXTURE_SIZE_ARB, 78 - MAX_SPARSE_3D_TEXTURE_SIZE_ARB, 79 - MAX_SPARSE_ARRAY_TEXTURE_LAYERS_ARB, 80 - SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB 81 82 Check default values. 83 84 Sparse Allocation Test 85 86 Use TexStorage* for all targets and sized internal formats 87 88 Errors verification: 89 90 INVALID_OPERATION 91 92 - Use TexParameter* function to set TEXTURE_SPARSE_ARB parameter 93 to TRUE on a texture for which TEXTURE_IMMUTABLE_FORMAT 94 parameter is set to TRUE. 95 96 - Use TexParameter* function to set VIRTUAL_PAGE_SIZE_INDEX_ARB 97 parameter to TRUE on a texture for which TEXTURE_IMMUTABLE_FORMAT 98 parameter is set to TRUE. 99 100 - Use TexStorage* on a texture for which TEXTURE_SPARSE_ARB parameter 101 is TRUE and VIRTUAL_PAGE_SIZE_INDEX_ARB parameter is greater 102 than NUM_VIRTUAL_PAGE_SIZES_ARB. 103 104 - Use TexStorage* on a texture for which 105 SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB parameter is FALSE and: 106 * TEXTURE_SPARSE_ARB parameter is TRUE 107 * <target> is one of TEXTURE_1D_ARRAY, TEXTURE_2D_ARRAY, 108 TEXTURE_CUBE_MAP, or TEXTURE_CUBE_MAP_ARRAY, 109 * For the virtual page size corresponding to the 110 VIRTUAL_PAGE_SIZE_INDEX_ARB parameter, either of the following 111 is true: 112 - <width> is not a multiple of VIRTUAL_PAGE_SIZE_X_ARB * 113 2^(<levels>-1), 114 - <height> is not a multiple of VIRTUAL_PAGE_SIZE_Y_ARB * 115 2^(<levels>-1). 116 117 INVALID_VALUE 118 119 - Use TexStorage* on a texture for which TEXTURE_SPARSE_ARB parameter 120 is TRUE and: 121 * <target> is TEXTURE_3D, and <width>, <height>, or 122 <depth> is greater than MAX_SPARSE_3D_TEXTURE_SIZE_ARB. 123 * <target> is not TEXTURE_3D, and <width> or <height> is 124 greater than MAX_SPARSE_TEXTURE_SIZE_ARB. 125 * <target> is TEXTURE_2D_ARRAY or TEXTURE_CUBE_MAP_ARRAY 126 and <depth> is greater than MAX_SPARSE_TEXTURE_ARRAY_LAYERS_ARB. 127 * <width> or <height> is greater than the value of 128 MAX_SPARSE_3D_TEXTURE_SIZE_ARB when <target> is TEXTURE_3D, or 129 if <height> or <depth> is greater than the value of 130 MAX_SPARSE_ARRAY_TEXTURE_LAYERS_ARB if <target> is a 1D or 2D 131 array texture target, respectively. 132 * <width>, <height> or <depth> is not an integer 133 multiple of the page size in the corresponding dimension. 134 135 Sparse Texture Commitment Test 136 137 Iterate through all targets and supported sized internal formats. 138 Sparse allocate TexStorage*. 139 Write data to texture storage using TexSubImage*. 140 Verify if no error is generated. 141 Commit texture pages region with TexPageCommitmentARB. 142 Write data to texture storage using TexSubImage*. 143 Verify if data stored is as expected. 144 145 Errors verification: 146 147 INVALID_OPERATION 148 149 - Use TexPageCommitmentARB with <xoffset> + <width> or 150 <yoffset> + <height> greater than the width or height, respectively, 151 of level <level> for the texture bound to <target>. 152 153 - Use TexPageCommitmentARB with <zoffset> + <depth> greater than: 154 * the depth of level <level> for the texture bound to <target>, if 155 <target> is TEXTURE_3D, 156 * the number of layers of level <level> for the texture bound to 157 <target>, if <target> is TEXTURE_2D_ARRAY, 158 * six times the number of layers of level <level> for the texture 159 bound to <target>, if <target> is TEXTURE_CUBE_MAP_ARRAY, 160 * one, for all other targets. 161 162 - Use TexPageCommitmentARB with <width> that is not an integer 163 multiple of VIRTUAL_PAGE_SIZE_X_ARB and <width> plus <xoffset> not 164 equal to the width of level <level> for the texture bound to <target>. 165 166 - Use TexPageCommitmentARB with <height> that is not an integer 167 multiple of VIRTUAL_PAGE_SIZE_Y_ARB and <height> plus <yoffset> not 168 equal to the height of level <level> for the texture bound to <target>. 169 170 - Use TexPageCommitmentARB with <depth> that is not an integer 171 multiple of VIRTUAL_PAGE_SIZE_Z_ARB and <depth> plus <zoffset> not 172 equal to: 173 * the depth of level <level> for the texture bound to <target>, if 174 <target> is TEXTURE_3D, 175 * the number of layers of level <level> for the texture bound to 176 <target>, if <target> is TEXTURE_2D_ARRAY, 177 * six times the number of layers of level <level> for the texture 178 bound to <target>, if <target> is TEXTURE_CUBE_MAP_ARRAY, 179 * one, for all other targets. 180 181 - Use TexPageCommitmentARB on a texture for which the value of 182 TEXTURE_IMMUTABLE_FORMAT or TEXTURE_SPARSE_ARB is FALSE. 183 184 INVALID_VALUE 185 186 - Use TexPageCommitmentARB with <xoffset>, <yoffset>, or 187 <zoffset> that is not a multiple of VIRTUAL_PAGE_SIZE_X_ARB, 188 VIRTUAL_PAGE_SIZE_Y_ARB, or VIRTUAL_PAGE_SIZE_Z_ARB, respectively, for 189 the texture bound to <target>. 190 191 Direct State Access Commitment Test 192 193 Iterate through all targets and supported sized internal formats. 194 Sparse allocate TesStorage*. 195 Write data to texture storage using TexSubImage*. 196 Verify if no error is generated. 197 Commit texture pages region with TexturePageCommitmentEXT. 198 Write data to texture storage using TexSubImage*. 199 Verify if data stored is as expected. 200 201 Errors verification: 202 203 INVALID_OPERATION 204 - Use TexturePageCommitmentEXT with <texture> that is not the name of 205 an existing texture. 206 207 All other errors listed for TexPageCommitmentARB also apply to 208 TexturePageCommitmentEXT, except that references to "the texture bound 209 to <target>" should be replaced with "the texture <texture>", and all 210 other references to "<target>" should be replaced with "the target of 211 texture <texture>". 212 213Revision History 214 215 Revision 1, 4 August, 2016 (Adam Czupryna) 216 - Intial version; 217