15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci    NV_memory_object_sparse
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci    GL_NV_memory_object_sparse
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciContributors
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci    Carsten Rohde, NVIDIA
125bd8deadSopenharmony_ci    James Jones, NVIDIA
135bd8deadSopenharmony_ci
145bd8deadSopenharmony_ciContact
155bd8deadSopenharmony_ci
165bd8deadSopenharmony_ci    Carsten Rohde, NVIDIA Corporation (crohde 'at' nvidia.com)
175bd8deadSopenharmony_ci
185bd8deadSopenharmony_ciStatus
195bd8deadSopenharmony_ci
205bd8deadSopenharmony_ci    Complete
215bd8deadSopenharmony_ci
225bd8deadSopenharmony_ciVersion
235bd8deadSopenharmony_ci
245bd8deadSopenharmony_ci    Last Modified Date: August 14, 2020
255bd8deadSopenharmony_ci    Revision:           2
265bd8deadSopenharmony_ci
275bd8deadSopenharmony_ciNumber
285bd8deadSopenharmony_ci
295bd8deadSopenharmony_ci    550
305bd8deadSopenharmony_ci    OpenGL ES Extension #329
315bd8deadSopenharmony_ci
325bd8deadSopenharmony_ciDependencies
335bd8deadSopenharmony_ci
345bd8deadSopenharmony_ci    Written against the OpenGL 4.6 and OpenGL ES 3.2 specifications
355bd8deadSopenharmony_ci    including ARB_sparse_texture and ARB_sparse_buffer.
365bd8deadSopenharmony_ci
375bd8deadSopenharmony_ci    GL_NV_memory_object_sparse requires GL_EXT_memory_object,
385bd8deadSopenharmony_ci    ARB_sparse_texture and/or ARB_sparse_buffer or a version of
395bd8deadSopenharmony_ci    OpenGL or OpenGL ES that incorporates it.
405bd8deadSopenharmony_ci
415bd8deadSopenharmony_ci    NV_memory_object_sparse interacts with ARB_direct_state_access (OpenGL)
425bd8deadSopenharmony_ci    when OpenGL < 4.6 is used.
435bd8deadSopenharmony_ci
445bd8deadSopenharmony_ci    ARB_sparse_texture (OpenGL) interacts with GL_EXT_memory_object_sparse.
455bd8deadSopenharmony_ci    ARB_sparse_buffer (OpenGL) interacts with GL_EXT_memory_object_sparse.
465bd8deadSopenharmony_ci    EXT_sparse_texture (OpenGL ES) interacts with GL_EXT_memory_object_sparse.
475bd8deadSopenharmony_ci
485bd8deadSopenharmony_ciOverview
495bd8deadSopenharmony_ci
505bd8deadSopenharmony_ci    This extension adds sparse support to EXT_memory_object extension.
515bd8deadSopenharmony_ci
525bd8deadSopenharmony_ciNew Procedures and Functions
535bd8deadSopenharmony_ci
545bd8deadSopenharmony_ci    void BufferPageCommitmentMemNV(enum target,
555bd8deadSopenharmony_ci                                   intptr offset, sizeiptr size,
565bd8deadSopenharmony_ci                                   uint memory, uint64 memOffset,
575bd8deadSopenharmony_ci                                   boolean commit);
585bd8deadSopenharmony_ci
595bd8deadSopenharmony_ci    void NamedBufferPageCommitmentMemNV(uint buffer,
605bd8deadSopenharmony_ci                                        intptr offset, sizeiptr size,
615bd8deadSopenharmony_ci                                        uint memory, uint64 memOffset,
625bd8deadSopenharmony_ci                                        boolean commit);
635bd8deadSopenharmony_ci
645bd8deadSopenharmony_ci    void TexPageCommitmentMemNV(enum target,
655bd8deadSopenharmony_ci                                int layer, int level,
665bd8deadSopenharmony_ci                                int xoffset, int yoffset, int zoffset,
675bd8deadSopenharmony_ci                                sizei width, sizei height, sizei depth,
685bd8deadSopenharmony_ci                                uint memory, uint64 offset,
695bd8deadSopenharmony_ci                                boolean commit);
705bd8deadSopenharmony_ci
715bd8deadSopenharmony_ci    void TexturePageCommitmentMemNV(uint texture,
725bd8deadSopenharmony_ci                                    int layer, int level,
735bd8deadSopenharmony_ci                                    int xoffset, int yoffset, int zoffset,
745bd8deadSopenharmony_ci                                    sizei width, sizei height, sizei depth,
755bd8deadSopenharmony_ci                                    uint memory, uint64 offset,
765bd8deadSopenharmony_ci                                    boolean commit);
775bd8deadSopenharmony_ci
785bd8deadSopenharmony_ci
795bd8deadSopenharmony_ciNew Tokens
805bd8deadSopenharmony_ci
815bd8deadSopenharmony_ci    None
825bd8deadSopenharmony_ci
835bd8deadSopenharmony_ci
845bd8deadSopenharmony_ciAdditions to Chapter 6 of the OpenGL 4.4 (core) Specification (Buffer Objects)
855bd8deadSopenharmony_ci
865bd8deadSopenharmony_ci    In Section 6.2, "Creating and Modifying Buffer Object Data Stores", add
875bd8deadSopenharmony_ci    the following add the following to the end of the description of
885bd8deadSopenharmony_ci    BufferSubData:
895bd8deadSopenharmony_ci
905bd8deadSopenharmony_ci    If NV_memory_object_sparse is supported, additionally, the commands
915bd8deadSopenharmony_ci
925bd8deadSopenharmony_ci        void BufferPageCommitmentMemNV(enum target,
935bd8deadSopenharmony_ci                                       intptr offset, sizeiptr size,
945bd8deadSopenharmony_ci                                       uint memory, uint64 memOffset,
955bd8deadSopenharmony_ci                                       boolean commit);
965bd8deadSopenharmony_ci
975bd8deadSopenharmony_ci        void NamedBufferPageCommitmentMemNV(uint buffer,
985bd8deadSopenharmony_ci                                            intptr offset,
995bd8deadSopenharmony_ci                                            sizeiptr size,
1005bd8deadSopenharmony_ci                                            uint memory, uint64 memOffset,
1015bd8deadSopenharmony_ci                                            boolean commit);
1025bd8deadSopenharmony_ci
1035bd8deadSopenharmony_ci    behaves similarly to BufferPageCommitmentARB and
1045bd8deadSopenharmony_ci    NamedBufferPageCommitmentMemARB except that the pages of the sparse buffer
1055bd8deadSopenharmony_ci    are bound to the memory specified by <memory> and <memOffset>.
1065bd8deadSopenharmony_ci
1075bd8deadSopenharmony_ci    Errors (additionally to non-Mem variants)
1085bd8deadSopenharmony_ci
1095bd8deadSopenharmony_ci      An INVALID_OPERATION error is generated if <memory> is not the name of
1105bd8deadSopenharmony_ci      an existing memory object.
1115bd8deadSopenharmony_ci
1125bd8deadSopenharmony_ci      An INVALID_OPERATION error is generated if <offset> + <size> exceeds the
1135bd8deadSopenharmony_ci      size of the memory object.
1145bd8deadSopenharmony_ci
1155bd8deadSopenharmony_ci    Add the following to end of subsection 8.20.2. "Controlling Sparse Texture
1165bd8deadSopenharmony_ci    Commitment":
1175bd8deadSopenharmony_ci
1185bd8deadSopenharmony_ci    If NV_memory_object_sparse is supported, additionally, the commands
1195bd8deadSopenharmony_ci
1205bd8deadSopenharmony_ci        void TexPageCommitmentMemNV(enum target,
1215bd8deadSopenharmony_ci                                    int layer, int level,
1225bd8deadSopenharmony_ci                                    int xoffset, int yoffset, int zoffset,
1235bd8deadSopenharmony_ci                                    sizei width, sizei height, sizei depth,
1245bd8deadSopenharmony_ci                                    uint memory, uint64 offset,
1255bd8deadSopenharmony_ci                                    boolean commit);
1265bd8deadSopenharmony_ci
1275bd8deadSopenharmony_ci        void TexturePageCommitmentMemNV(uint texture,
1285bd8deadSopenharmony_ci                                        int layer, int level,
1295bd8deadSopenharmony_ci                                        int xoffset, int yoffset, int zoffset,
1305bd8deadSopenharmony_ci                                        sizei width, sizei height, sizei depth,
1315bd8deadSopenharmony_ci                                        uint memory, uint64 offset,
1325bd8deadSopenharmony_ci                                        boolean commit);
1335bd8deadSopenharmony_ci
1345bd8deadSopenharmony_ci    behaves similarly to TexPageCommitmentMemARB and
1355bd8deadSopenharmony_ci    TexturePageCommitmentEXT except that the tiles of the sparse texture
1365bd8deadSopenharmony_ci    are bound to the memory specified by <memory> and <offset>.
1375bd8deadSopenharmony_ci
1385bd8deadSopenharmony_ci    <layer> indicates the layer of a texture array or cube texture,
1395bd8deadSopenharmony_ci    <zoffset> must be 0 and <depth> must 1 in this case. For other textures
1405bd8deadSopenharmony_ci    <layer> must be 0.
1415bd8deadSopenharmony_ci
1425bd8deadSopenharmony_ci    Errors (additionally to non-Mem variants)
1435bd8deadSopenharmony_ci
1445bd8deadSopenharmony_ci      An INVALID_OPERATION error is generated if <memory> is not the name of
1455bd8deadSopenharmony_ci      an existing memory object.
1465bd8deadSopenharmony_ci
1475bd8deadSopenharmony_ci      An INVALID_OPERATION error is generated if <memory> is dedicated or
1485bd8deadSopenharmony_ci      imported from a non-opaque handle.
1495bd8deadSopenharmony_ci
1505bd8deadSopenharmony_ci      An INVALID_OPERATION error is generated if <offset> plus the number of
1515bd8deadSopenharmony_ci      bytes required for the tiles to commit exceeds the size of the memory
1525bd8deadSopenharmony_ci      object.
1535bd8deadSopenharmony_ci
1545bd8deadSopenharmony_ci      An INVALID_VALUE error is generated if <layer> is not 0 and the texture
1555bd8deadSopenharmony_ci      neither a texture array or a cube texture.
1565bd8deadSopenharmony_ci
1575bd8deadSopenharmony_ci      An INVALID_VALUE error is generated if <zoffset> is not 0 or <depth> is
1585bd8deadSopenharmony_ci      not 1 if the texture is a texture array or a cube texture.
1595bd8deadSopenharmony_ci
1605bd8deadSopenharmony_ci      An INVALID_VALUE error is generated if <layer> is greater or equal than
1615bd8deadSopenharmony_ci      the number of layers of the texture array.
1625bd8deadSopenharmony_ci
1635bd8deadSopenharmony_ci      An INVALID_VALUE error is generated if <layer> is greater or equal than
1645bd8deadSopenharmony_ci      6 in case of a cube texture.
1655bd8deadSopenharmony_ci
1665bd8deadSopenharmony_ciDependencies on EXT_direct_state_access
1675bd8deadSopenharmony_ci
1685bd8deadSopenharmony_ci    If EXT_direct_state_access is not supported, remove references to the
1695bd8deadSopenharmony_ci    NamedBufferPageCommitmentMemNV and TexturePageCommitmentMemNV commands
1705bd8deadSopenharmony_ci    added by this extension.
1715bd8deadSopenharmony_ci
1725bd8deadSopenharmony_ciIssues
1735bd8deadSopenharmony_ci
1745bd8deadSopenharmony_ci    (1) Should we a 'aspect' parameter to the new gl.*CommitMemNV() functions?
1755bd8deadSopenharmony_ci
1765bd8deadSopenharmony_ci    RESOLVED: No. This can be deferred to a future EXT extension because there
1775bd8deadSopenharmony_ci              is currently no multi-planar texture support in GL and metadata
1785bd8deadSopenharmony_ci              isn't required for NVIDIA hardware.
1795bd8deadSopenharmony_ci
1805bd8deadSopenharmony_ciRevision History
1815bd8deadSopenharmony_ci
1825bd8deadSopenharmony_ci    Revision 2, 2020-08-14 (Piers Daniell)
1835bd8deadSopenharmony_ci        - Fix duplicate parameter names in BufferPageCommitmentMemNV and
1845bd8deadSopenharmony_ci          NamedBufferPageCommitmentMemNV.
1855bd8deadSopenharmony_ci
1865bd8deadSopenharmony_ci    Revision 1, 2020-08-04 (Carsten Rohde)
1875bd8deadSopenharmony_ci        - Initial draft.
188