1Name 2 3 NV_memory_object_sparse 4 5Name Strings 6 7 GL_NV_memory_object_sparse 8 9Contributors 10 11 Carsten Rohde, NVIDIA 12 James Jones, NVIDIA 13 14Contact 15 16 Carsten Rohde, NVIDIA Corporation (crohde 'at' nvidia.com) 17 18Status 19 20 Complete 21 22Version 23 24 Last Modified Date: August 14, 2020 25 Revision: 2 26 27Number 28 29 550 30 OpenGL ES Extension #329 31 32Dependencies 33 34 Written against the OpenGL 4.6 and OpenGL ES 3.2 specifications 35 including ARB_sparse_texture and ARB_sparse_buffer. 36 37 GL_NV_memory_object_sparse requires GL_EXT_memory_object, 38 ARB_sparse_texture and/or ARB_sparse_buffer or a version of 39 OpenGL or OpenGL ES that incorporates it. 40 41 NV_memory_object_sparse interacts with ARB_direct_state_access (OpenGL) 42 when OpenGL < 4.6 is used. 43 44 ARB_sparse_texture (OpenGL) interacts with GL_EXT_memory_object_sparse. 45 ARB_sparse_buffer (OpenGL) interacts with GL_EXT_memory_object_sparse. 46 EXT_sparse_texture (OpenGL ES) interacts with GL_EXT_memory_object_sparse. 47 48Overview 49 50 This extension adds sparse support to EXT_memory_object extension. 51 52New Procedures and Functions 53 54 void BufferPageCommitmentMemNV(enum target, 55 intptr offset, sizeiptr size, 56 uint memory, uint64 memOffset, 57 boolean commit); 58 59 void NamedBufferPageCommitmentMemNV(uint buffer, 60 intptr offset, sizeiptr size, 61 uint memory, uint64 memOffset, 62 boolean commit); 63 64 void TexPageCommitmentMemNV(enum target, 65 int layer, int level, 66 int xoffset, int yoffset, int zoffset, 67 sizei width, sizei height, sizei depth, 68 uint memory, uint64 offset, 69 boolean commit); 70 71 void TexturePageCommitmentMemNV(uint texture, 72 int layer, int level, 73 int xoffset, int yoffset, int zoffset, 74 sizei width, sizei height, sizei depth, 75 uint memory, uint64 offset, 76 boolean commit); 77 78 79New Tokens 80 81 None 82 83 84Additions to Chapter 6 of the OpenGL 4.4 (core) Specification (Buffer Objects) 85 86 In Section 6.2, "Creating and Modifying Buffer Object Data Stores", add 87 the following add the following to the end of the description of 88 BufferSubData: 89 90 If NV_memory_object_sparse is supported, additionally, the commands 91 92 void BufferPageCommitmentMemNV(enum target, 93 intptr offset, sizeiptr size, 94 uint memory, uint64 memOffset, 95 boolean commit); 96 97 void NamedBufferPageCommitmentMemNV(uint buffer, 98 intptr offset, 99 sizeiptr size, 100 uint memory, uint64 memOffset, 101 boolean commit); 102 103 behaves similarly to BufferPageCommitmentARB and 104 NamedBufferPageCommitmentMemARB except that the pages of the sparse buffer 105 are bound to the memory specified by <memory> and <memOffset>. 106 107 Errors (additionally to non-Mem variants) 108 109 An INVALID_OPERATION error is generated if <memory> is not the name of 110 an existing memory object. 111 112 An INVALID_OPERATION error is generated if <offset> + <size> exceeds the 113 size of the memory object. 114 115 Add the following to end of subsection 8.20.2. "Controlling Sparse Texture 116 Commitment": 117 118 If NV_memory_object_sparse is supported, additionally, the commands 119 120 void TexPageCommitmentMemNV(enum target, 121 int layer, int level, 122 int xoffset, int yoffset, int zoffset, 123 sizei width, sizei height, sizei depth, 124 uint memory, uint64 offset, 125 boolean commit); 126 127 void TexturePageCommitmentMemNV(uint texture, 128 int layer, int level, 129 int xoffset, int yoffset, int zoffset, 130 sizei width, sizei height, sizei depth, 131 uint memory, uint64 offset, 132 boolean commit); 133 134 behaves similarly to TexPageCommitmentMemARB and 135 TexturePageCommitmentEXT except that the tiles of the sparse texture 136 are bound to the memory specified by <memory> and <offset>. 137 138 <layer> indicates the layer of a texture array or cube texture, 139 <zoffset> must be 0 and <depth> must 1 in this case. For other textures 140 <layer> must be 0. 141 142 Errors (additionally to non-Mem variants) 143 144 An INVALID_OPERATION error is generated if <memory> is not the name of 145 an existing memory object. 146 147 An INVALID_OPERATION error is generated if <memory> is dedicated or 148 imported from a non-opaque handle. 149 150 An INVALID_OPERATION error is generated if <offset> plus the number of 151 bytes required for the tiles to commit exceeds the size of the memory 152 object. 153 154 An INVALID_VALUE error is generated if <layer> is not 0 and the texture 155 neither a texture array or a cube texture. 156 157 An INVALID_VALUE error is generated if <zoffset> is not 0 or <depth> is 158 not 1 if the texture is a texture array or a cube texture. 159 160 An INVALID_VALUE error is generated if <layer> is greater or equal than 161 the number of layers of the texture array. 162 163 An INVALID_VALUE error is generated if <layer> is greater or equal than 164 6 in case of a cube texture. 165 166Dependencies on EXT_direct_state_access 167 168 If EXT_direct_state_access is not supported, remove references to the 169 NamedBufferPageCommitmentMemNV and TexturePageCommitmentMemNV commands 170 added by this extension. 171 172Issues 173 174 (1) Should we a 'aspect' parameter to the new gl.*CommitMemNV() functions? 175 176 RESOLVED: No. This can be deferred to a future EXT extension because there 177 is currently no multi-planar texture support in GL and metadata 178 isn't required for NVIDIA hardware. 179 180Revision History 181 182 Revision 2, 2020-08-14 (Piers Daniell) 183 - Fix duplicate parameter names in BufferPageCommitmentMemNV and 184 NamedBufferPageCommitmentMemNV. 185 186 Revision 1, 2020-08-04 (Carsten Rohde) 187 - Initial draft. 188