1Conformance Test 2 3 CTS_ARB_sparse_texture2 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 October 4, 2016 (version 1) 20 21Dependencies 22 23 OpenGL 4.5 is required. 24 25 ARB_sparse_texture extension is required. 26 27 ARB_sparse_texture2 extension is required. 28 29 This specification is written against: 30 - ARB_sparse_texture2 specification, 31 - OpenGL 4.5 (core) specification. 32 33Overview 34 35 This tests verifies if functionality provided by ARB_sparse_texture2 36 works as expected: 37 38 * Checks if new built-in GLSL texture lookup and image load functions 39 return information on whether the texels accessed for the texture 40 lookup accessed uncommitted texture memory. 41 42 * Checks if reads of uncommitted texture memory will act as though such 43 memory were filled with zeroes; previously, the values returned by 44 reads were undefined. 45 46 * Standard implementation-independent virtual page sizes for internal 47 formats required to be supported with sparse textures. Checks if these 48 standard sizes can be requested by leaving VIRTUAL_PAGE_SIZE_INDEX_ARB 49 at its initial value (0). 50 51 * Checks if support for creating sparse multisample and multisample array 52 textures is added and the virtual page sizes for such textures remain 53 fully implementation-dependent. 54 55CTS_ARB_sparse_texture Changes 56 57 Sparse Allocation Test 58 59 * No more INVALID_VALUE error is generated by TexStorage* function if 60 TEXTURE_SPARSE_ARB parameter is TRUE and <width>, <height> or 61 <depth> is not an integer multiple of the page size in the 62 corresponding dimension. 63 64New Tests 65 66 Sparse Allocation Test 67 68 * Extend CTS_ARB_sparse_texture SparseAllocationTestCase with targets 69 TEXTURE_2D_MULTISAMPLE and TEXTURE_2D_MULTISAMPLE_ARRAY. 70 71 * Test if SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB parameter is always 72 TRUE for targets: TEXTURE_1D_ARRAY, TEXTURE_2D_ARRAY, TEXTURE_CUBE_MAP, 73 TEXTURE_CUBE_MAP_ARRAY or TEXTURE_2D_MULTISAMPLE_ARRAY. 74 75 Sparse Texture Commitment Test 76 77 * Extend CTS_ARB_sparse_texture SparseTextureCommitmentTestCase with targets 78 TEXTURE_2D_MULTISAMPLE and TEXTURE_2D_MULTISAMPLE_ARRAY. 79 80 * Test if for levels of a sparse texture where each dimension is greater than or 81 equal to of the virtual page size, the residency of individual page-size 82 regions may be controlled by TexPageCommitmentARB and such levels may be 83 partially populated. 84 85 Standard Virtual Page Sizes Test 86 87 * Test GetInternalformativ query for formats from Table 8.X, Standard 88 Virtual Page Sizes for Sparse Textures and <pname>: 89 90 - VIRTUAL_PAGE_SIZE_X_ARB, 91 - VIRTUAL_PAGE_SIZE_Y_ARB, 92 - VIRTUAL_PAGE_SIZE_Z_ARB 93 94 Check if values returned by query matches Standard Virtual Page Sizes. 95 Uncommitted Regions Access Test 96 97 * Verify if reads from such regions produce zeros for all components 98 present in the texture format. This includes samples required for the 99 implementation of texture filtering, image loads, mipmap generation, 100 and so on. 101 102 Test it for different texture formats and different read functions. 103 104 * Verify if atomic operations on such regions will not generate 105 exceptions but will always return zero and the result of the atomic 106 operation, which is normally written to memory, will instead be 107 discarded. 108 109 Test it for different atomic operations. 110 111 * Verify if performing the stencil test (section 17.3.5), depth buffer test 112 (section 17.3.6), or depth bounds test (if supported) on pixels in 113 uncommitted regions, the results of the test will be consistent with 114 reading a value of zero from the framebuffer. No value is written to the 115 depth buffer. 116 117 Shader Extension Test 118 119 * Create shader that require ARB_sparse_texture2 extension 120 and check if ARB_sparse_texture2 is defined and equal 1. 121 Check if shader compiles with no error. 122 123 Shader Sparse Texture Lookup Tests 124 125 * Iterate through all sparse supported targets. 126 Allocate sparse texture for current <target> with committed and 127 uncommitted regions. 128 Create multiple shaders that enables ARB_sparse_texture2 extension 129 and each use one of the function from list below 130 (if supported by <target>): 131 132 - sparseTextureARB 133 - sparseTextureLodARB 134 - sparseTextureOffsetARB 135 - sparseTexelFetchARB 136 - sparseTexelFetchOffsetARB 137 - sparseTextureLodOffsetARB 138 - sparseTextureGradARB 139 - sparseTextureGradOffsetARB 140 - sparseTextureGatherARB 141 - sparseTextureGatherOffsetARB 142 - sparseTextureGatherOffsetsARB 143 - sparseImageLoadARB 144 145 Shaders should check texture access residency information using 146 sparseTexelsResidentARB function and pass vec4(1, 1, 1, 1) to the output 147 if access committed region and vec4(0, 0, 0, 1) otherwise. 148 Iterate through shaders, create and use program for current iteration 149 and draw a prepared texture. 150 Verify if shader pass test by reading pixels from framebuffer and 151 checking if their values are as expected. 152 153Revision History 154 155 Revision 1, 4 October, 2016 (Adam Czupryna) 156 - Intial version; 157 158