15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci ARB_buffer_storage 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_ARB_buffer_storage 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciContact 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Graham Sellers (graham.sellers 'at' amd.com) 125bd8deadSopenharmony_ci 135bd8deadSopenharmony_ciContributors 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ci Jeff Bolz, NVIDIA 165bd8deadSopenharmony_ci Daniel Koch, NVIDIA 175bd8deadSopenharmony_ci Jon Leech 185bd8deadSopenharmony_ci Mark Kilgard, NVIDIA 195bd8deadSopenharmony_ci 205bd8deadSopenharmony_ciNotice 215bd8deadSopenharmony_ci 225bd8deadSopenharmony_ci Copyright (c) 2013 The Khronos Group Inc. Copyright terms at 235bd8deadSopenharmony_ci http://www.khronos.org/registry/speccopyright.html 245bd8deadSopenharmony_ci 255bd8deadSopenharmony_ciSpecification Update Policy 265bd8deadSopenharmony_ci 275bd8deadSopenharmony_ci Khronos-approved extension specifications are updated in response to 285bd8deadSopenharmony_ci issues and bugs prioritized by the Khronos OpenGL Working Group. For 295bd8deadSopenharmony_ci extensions which have been promoted to a core Specification, fixes will 305bd8deadSopenharmony_ci first appear in the latest version of that core Specification, and will 315bd8deadSopenharmony_ci eventually be backported to the extension document. This policy is 325bd8deadSopenharmony_ci described in more detail at 335bd8deadSopenharmony_ci https://www.khronos.org/registry/OpenGL/docs/update_policy.php 345bd8deadSopenharmony_ci 355bd8deadSopenharmony_ciStatus 365bd8deadSopenharmony_ci 375bd8deadSopenharmony_ci Complete. Approved by the ARB on June 3, 2013. 385bd8deadSopenharmony_ci Ratified by the Khronos Board of Promoters on July 19, 2013. 395bd8deadSopenharmony_ci 405bd8deadSopenharmony_ciVersion 415bd8deadSopenharmony_ci 425bd8deadSopenharmony_ci Last Modified Date: April 20, 2015 435bd8deadSopenharmony_ci Revision: 25 445bd8deadSopenharmony_ci 455bd8deadSopenharmony_ciNumber 465bd8deadSopenharmony_ci 475bd8deadSopenharmony_ci ARB Extension #144 485bd8deadSopenharmony_ci 495bd8deadSopenharmony_ciDependencies 505bd8deadSopenharmony_ci 515bd8deadSopenharmony_ci This extension is written against version 4.3 of the Core Profile OpenGL 525bd8deadSopenharmony_ci Specification, dated August 6, 2012. 535bd8deadSopenharmony_ci 545bd8deadSopenharmony_ci The definition of this extension is affected by the presence of 555bd8deadSopenharmony_ci GL_EXT_direct_state_access. 565bd8deadSopenharmony_ci 575bd8deadSopenharmony_ciOverview 585bd8deadSopenharmony_ci 595bd8deadSopenharmony_ci OpenGL has long supported buffer objects as a means of storing data 605bd8deadSopenharmony_ci that may be used to source vertex attributes, pixel data for textures, 615bd8deadSopenharmony_ci uniforms and other elements. In un-extended GL, buffer data stores 625bd8deadSopenharmony_ci are mutable - that is, they may be de-allocated or resized while they 635bd8deadSopenharmony_ci are in use. The GL_ARB_texture_storage extension added immutable storage 645bd8deadSopenharmony_ci for texture object (and was subsequently incorporated into OpenGL 4.2). 655bd8deadSopenharmony_ci This extension further applies the concept of immutable storage to 665bd8deadSopenharmony_ci buffer objects. If an implementation is aware of a buffer's immutability, 675bd8deadSopenharmony_ci it may be able to make certain assumptions or apply particular 685bd8deadSopenharmony_ci optimizations in order to increase performance or reliability. 695bd8deadSopenharmony_ci 705bd8deadSopenharmony_ci Furthermore, this extension allows applications to pass additional 715bd8deadSopenharmony_ci information about a requested allocation to the implementation which it 725bd8deadSopenharmony_ci may use to select memory heaps, caching behavior or allocation strategies. 735bd8deadSopenharmony_ci 745bd8deadSopenharmony_ci Finally, this extension introduces the concept of persistent client 755bd8deadSopenharmony_ci mappings of buffer objects, which allow clients to retain pointers to a 765bd8deadSopenharmony_ci buffer's data store returned as the result of a mapping, and to issue 775bd8deadSopenharmony_ci drawing commands while those mappings are in place. 785bd8deadSopenharmony_ci 795bd8deadSopenharmony_ciNew Procedures and Functions 805bd8deadSopenharmony_ci 815bd8deadSopenharmony_ci void BufferStorage(enum target, 825bd8deadSopenharmony_ci sizeiptr size, 835bd8deadSopenharmony_ci const void * data, 845bd8deadSopenharmony_ci bitfield flags); 855bd8deadSopenharmony_ci 865bd8deadSopenharmony_ci When EXT_direct_state_access is present: 875bd8deadSopenharmony_ci 885bd8deadSopenharmony_ci void NamedBufferStorageEXT(uint buffer, 895bd8deadSopenharmony_ci sizeiptr size, 905bd8deadSopenharmony_ci const void * data, 915bd8deadSopenharmony_ci bitfield flags); 925bd8deadSopenharmony_ci 935bd8deadSopenharmony_ciNew Tokens 945bd8deadSopenharmony_ci 955bd8deadSopenharmony_ci Accepted in the <flags> parameter of BufferStorage and 965bd8deadSopenharmony_ci NamedBufferStorageEXT: 975bd8deadSopenharmony_ci 985bd8deadSopenharmony_ci MAP_READ_BIT 0x0001 (existing) 995bd8deadSopenharmony_ci MAP_WRITE_BIT 0x0002 (existing) 1005bd8deadSopenharmony_ci MAP_PERSISTENT_BIT 0x0040 1015bd8deadSopenharmony_ci MAP_COHERENT_BIT 0x0080 1025bd8deadSopenharmony_ci DYNAMIC_STORAGE_BIT 0x0100 1035bd8deadSopenharmony_ci CLIENT_STORAGE_BIT 0x0200 1045bd8deadSopenharmony_ci 1055bd8deadSopenharmony_ci Accepted as part of the <access> parameter to MapBufferRange: 1065bd8deadSopenharmony_ci 1075bd8deadSopenharmony_ci MAP_PERSISTENT_BIT 0x00000040 1085bd8deadSopenharmony_ci MAP_COHERENT_BIT 0x00000080 1095bd8deadSopenharmony_ci 1105bd8deadSopenharmony_ci Accepted by the <pname> parameter of GetBufferParameter{i|i64}v: 1115bd8deadSopenharmony_ci 1125bd8deadSopenharmony_ci BUFFER_IMMUTABLE_STORAGE 0x821F 1135bd8deadSopenharmony_ci BUFFER_STORAGE_FLAGS 0x8220 1145bd8deadSopenharmony_ci 1155bd8deadSopenharmony_ci Accepted by the <barriers> parameter of MemoryBarrier: 1165bd8deadSopenharmony_ci 1175bd8deadSopenharmony_ci CLIENT_MAPPED_BUFFER_BARRIER_BIT 0x00004000 1185bd8deadSopenharmony_ci 1195bd8deadSopenharmony_ciIP Status 1205bd8deadSopenharmony_ci 1215bd8deadSopenharmony_ci No known IP claims. 1225bd8deadSopenharmony_ci 1235bd8deadSopenharmony_ciAdditions to Chapter 2 of the OpenGL Core Profile Specification, Version 4.3, 1245bd8deadSopenharmony_ci"OpenGL Fundamentals" 1255bd8deadSopenharmony_ci 1265bd8deadSopenharmony_ci Insert before the last line of Section 2.5.2, "Buffer Objects", p. 26: 1275bd8deadSopenharmony_ci 1285bd8deadSopenharmony_ci Under certain circumstances, the data store of a buffer object may 1295bd8deadSopenharmony_ci be shared between the client and server and accessed simultaneously 1305bd8deadSopenharmony_ci by both. 1315bd8deadSopenharmony_ci 1325bd8deadSopenharmony_ciAdditions to Chapter 6 of the OpenGL Core Profile Specification, Version 4.3, 1335bd8deadSopenharmony_ci"Buffer Objects" 1345bd8deadSopenharmony_ci 1355bd8deadSopenharmony_ci Modify Section 6.2, "Creating and Modifying Buffer Object Data Stores", 1365bd8deadSopenharmony_ci p. 57 as follows: 1375bd8deadSopenharmony_ci 1385bd8deadSopenharmony_ci The data store of a buffer object is created by calling 1395bd8deadSopenharmony_ci 1405bd8deadSopenharmony_ci void BufferStorage(enum target, 1415bd8deadSopenharmony_ci sizeiptr size, 1425bd8deadSopenharmony_ci const void * data, 1435bd8deadSopenharmony_ci bitfield flags); 1445bd8deadSopenharmony_ci 1455bd8deadSopenharmony_ci with <target> set to one of the targets listed in Table 6.1, <size> set to 1465bd8deadSopenharmony_ci the size of the data store in basic machine units and <flags> containing 1475bd8deadSopenharmony_ci a bit-field describing the intended usage of the data store. The data 1485bd8deadSopenharmony_ci store of the buffer object bound to <target> is allocated as a result of 1495bd8deadSopenharmony_ci a call to this function and cannot be de-allocated until the buffer is 1505bd8deadSopenharmony_ci deleted with a call to DeleteBuffers. Such a store may not be 1515bd8deadSopenharmony_ci re-allocated through further calls to BufferStorage or BufferData. 1525bd8deadSopenharmony_ci 1535bd8deadSopenharmony_ci <data> specifies the address in client memory of the data that should 1545bd8deadSopenharmony_ci be used to initialize the buffer's data store. If <data> is NULL, the 1555bd8deadSopenharmony_ci data store of the buffer is created, but contains undefined data. 1565bd8deadSopenharmony_ci Otherwise, <data> should point to an array of at least <size> basic 1575bd8deadSopenharmony_ci machine units. 1585bd8deadSopenharmony_ci 1595bd8deadSopenharmony_ci <flags> is the bitwise OR of flags describing the intended usage 1605bd8deadSopenharmony_ci of the buffer object's data store by the application. Valid flags and 1615bd8deadSopenharmony_ci their meanings are as follows: 1625bd8deadSopenharmony_ci 1635bd8deadSopenharmony_ci DYNAMIC_STORAGE_BIT The contents of the data store may be 1645bd8deadSopenharmony_ci updated after creation through calls to BufferSubData. If this bit is not 1655bd8deadSopenharmony_ci set, the buffer content may not be directly updated by the client. The 1665bd8deadSopenharmony_ci <data> argument may be used to specify the initial content of the buffer's 1675bd8deadSopenharmony_ci data store regardless of the presence of the DYNAMIC_STORAGE_BIT. 1685bd8deadSopenharmony_ci Regardless of the presence of this bit, buffers may always be updated 1695bd8deadSopenharmony_ci with server-side calls such as CopyBufferSubData and ClearBufferSubData. 1705bd8deadSopenharmony_ci 1715bd8deadSopenharmony_ci MAP_READ_BIT The buffer's data store may be mapped by the client for 1725bd8deadSopenharmony_ci read access and a pointer in the client's address space obtained that may 1735bd8deadSopenharmony_ci be read from. 1745bd8deadSopenharmony_ci 1755bd8deadSopenharmony_ci MAP_WRITE_BIT The buffer's data store may be mapped by the client for 1765bd8deadSopenharmony_ci write access and a pointer in the client's address space obtained that may 1775bd8deadSopenharmony_ci be written to. 1785bd8deadSopenharmony_ci 1795bd8deadSopenharmony_ci MAP_PERSISTENT_BIT The client may request that the server read from 1805bd8deadSopenharmony_ci or write to the buffer while it is mapped. The client's pointer to the 1815bd8deadSopenharmony_ci data store remains valid so long as the data store is mapped, even during 1825bd8deadSopenharmony_ci execution of drawing or dispatch commands. 1835bd8deadSopenharmony_ci 1845bd8deadSopenharmony_ci MAP_COHERENT_BIT Shared access to buffers that are simultaneously 1855bd8deadSopenharmony_ci mapped for client access and are used by the server will be coherent, so 1865bd8deadSopenharmony_ci long as that mapping is performed using MapBufferRange. That is, data 1875bd8deadSopenharmony_ci written to the store by either the client or server will be immediately 1885bd8deadSopenharmony_ci visible to the other with no further action taken by the application. In 1895bd8deadSopenharmony_ci particular: 1905bd8deadSopenharmony_ci 1915bd8deadSopenharmony_ci - If MAP_COHERENT_BIT is not set and the client performs a write 1925bd8deadSopenharmony_ci followed by a call to one of the FlushMapped*BufferRange commands 1935bd8deadSopenharmony_ci with a range including the written range, then in subsequent 1945bd8deadSopenharmony_ci commands the server will see the writes. 1955bd8deadSopenharmony_ci 1965bd8deadSopenharmony_ci - If MAP_COHERENT_BIT is set and the client performs a write, then in 1975bd8deadSopenharmony_ci subsequent commands the server will see the writes. 1985bd8deadSopenharmony_ci 1995bd8deadSopenharmony_ci - If MAP_COHERENT_BIT is not set and the server performs a write, the 2005bd8deadSopenharmony_ci application must call MemoryBarrier with the 2015bd8deadSopenharmony_ci CLIENT_MAPPED_BUFFER_BARRIER_BIT set and then call FenceSync with 2025bd8deadSopenharmony_ci SYNC_GPU_COMMANDS_COMPLETE (or Finish). Then the CPU will see the 2035bd8deadSopenharmony_ci writes after the sync is complete. 2045bd8deadSopenharmony_ci 2055bd8deadSopenharmony_ci - If MAP_COHERENT_BIT is set and the server does a write, the app must 2065bd8deadSopenharmony_ci call FenceSync with SYNC_GPU_COMMANDS_COMPLETE (or Finish). Then the 2075bd8deadSopenharmony_ci CPU will see the writes after the sync is complete. 2085bd8deadSopenharmony_ci 2095bd8deadSopenharmony_ci CLIENT_STORAGE_BIT When all other criteria for the buffer storage 2105bd8deadSopenharmony_ci allocation are met, this bit may be used by an implementation to determine 2115bd8deadSopenharmony_ci whether to use storage that is local to the server or to the client to 2125bd8deadSopenharmony_ci serve as the backing store for the buffer. 2135bd8deadSopenharmony_ci 2145bd8deadSopenharmony_ci If <flags> contains MAP_PERSISTENT_BIT, it must also contain at least one 2155bd8deadSopenharmony_ci of MAP_READ_BIT or MAP_WRITE_BIT. 2165bd8deadSopenharmony_ci 2175bd8deadSopenharmony_ci It is an error to specify MAP_COHERENT_BIT without also specifying 2185bd8deadSopenharmony_ci MAP_PERSISTENT_BIT. 2195bd8deadSopenharmony_ci 2205bd8deadSopenharmony_ci BufferStorage deletes any existing data store, and sets the values of 2215bd8deadSopenharmony_ci the buffer object's state variables as shown in table 6.3. 2225bd8deadSopenharmony_ci 2235bd8deadSopenharmony_ci If any portion of the buffer object is mapped in the current context or 2245bd8deadSopenharmony_ci any context current to another thread, it is as though UnmapBuffer (see 2255bd8deadSopenharmony_ci section 6.3.1) is executed in each such context prior to deleting the 2265bd8deadSopenharmony_ci existing data store. 2275bd8deadSopenharmony_ci 2285bd8deadSopenharmony_ci Name | Value for | Value for 2295bd8deadSopenharmony_ci | BufferData | BufferStorage 2305bd8deadSopenharmony_ci -------------------------+-----------------------+--------------- 2315bd8deadSopenharmony_ci BUFFER_SIZE | <size> | <size> 2325bd8deadSopenharmony_ci BUFFER_USAGE | <usage> | DYNAMIC_DRAW 2335bd8deadSopenharmony_ci BUFFER_ACCESS | READ_WRITE | READ_WRITE 2345bd8deadSopenharmony_ci BUFFER_ACCESS_FLAGS | 0 | 0 2355bd8deadSopenharmony_ci BUFFER_IMMUTABLE_STORAGE | FALSE | TRUE 2365bd8deadSopenharmony_ci BUFFER_MAPPED | FALSE | FALSE 2375bd8deadSopenharmony_ci BUFFER_MAP_POINTER | NULL | NULL 2385bd8deadSopenharmony_ci BUFFER_MAP_OFFSET | 0 | 0 2395bd8deadSopenharmony_ci BUFFER_MAP_LENGTH | 0 | 0 2405bd8deadSopenharmony_ci BUFFER_STORAGE_FLAGS | MAP_READ_BIT | | <flags> 2415bd8deadSopenharmony_ci | MAP_WRITE_BIT | | 2425bd8deadSopenharmony_ci | DYNAMIC_STORAGE_BIT | 2435bd8deadSopenharmony_ci Table 6.3: Buffer object state after calling BufferData or 2445bd8deadSopenharmony_ci BufferStorage. 2455bd8deadSopenharmony_ci 2465bd8deadSopenharmony_ci A mutable data store may be allocated for a buffer object by calling 2475bd8deadSopenharmony_ci 2485bd8deadSopenharmony_ci void BufferData(...) 2495bd8deadSopenharmony_ci 2505bd8deadSopenharmony_ci <include the remainder of Section 6.2 as written, and then append>. 2515bd8deadSopenharmony_ci 2525bd8deadSopenharmony_ci Calling BufferData is equivalent to calling BufferStorage with 2535bd8deadSopenharmony_ci <target>, <size> and <data> as specified, and <flags> set to the logical 2545bd8deadSopenharmony_ci OR of DYNAMIC_STORAGE_BIT, MAP_READ_BIT and MAP_WRITE_BIT. The GL will 2555bd8deadSopenharmony_ci use the value of <usage> parameter to BufferData as a hint to further 2565bd8deadSopenharmony_ci determine the intended use of the buffer. However, BufferStorage allocates 2575bd8deadSopenharmony_ci immutable storage whereas BufferData allocates mutable storage. Thus, when 2585bd8deadSopenharmony_ci a buffer's data store is allocated through a call to BufferData, the 2595bd8deadSopenharmony_ci buffer's BUFFER_IMMUTABLE_STORAGE flags is set to FALSE. 2605bd8deadSopenharmony_ci 2615bd8deadSopenharmony_ci Add the following errors: 2625bd8deadSopenharmony_ci 2635bd8deadSopenharmony_ci An INVALID_OPERATION error is generated by BufferData and BufferStorage 2645bd8deadSopenharmony_ci if the BUFFER_IMMUTABLE_STORAGE flag of the buffer bound to <target> is 2655bd8deadSopenharmony_ci set to TRUE. 2665bd8deadSopenharmony_ci 2675bd8deadSopenharmony_ci An INVALID_OPERATION error is generated by BufferSubData if the 2685bd8deadSopenharmony_ci BUFFER_IMMUTABLE_STORAGE flag of the buffer bound to <target> is TRUE 2695bd8deadSopenharmony_ci and the value of BUFFER_STORAGE_FLAGS for the buffer does not have 2705bd8deadSopenharmony_ci the DYNAMIC_STORAGE_BIT set. 2715bd8deadSopenharmony_ci 2725bd8deadSopenharmony_ci The command: 2735bd8deadSopenharmony_ci 2745bd8deadSopenharmony_ci void NamedBufferStorageEXT(uint buffer, 2755bd8deadSopenharmony_ci sizeiptr size, 2765bd8deadSopenharmony_ci const void * data, 2775bd8deadSopenharmony_ci bitfield flags); 2785bd8deadSopenharmony_ci 2795bd8deadSopenharmony_ci behaves similarly to BufferStorage, except that the buffer whose storage 2805bd8deadSopenharmony_ci is to be defined is specified by <buffer> rather than by the current 2815bd8deadSopenharmony_ci binding to <target>. 2825bd8deadSopenharmony_ci 2835bd8deadSopenharmony_ci Add the following error: 2845bd8deadSopenharmony_ci 2855bd8deadSopenharmony_ci An INVALID_OPERATION error is generated by NamedBufferStorageEXT if 2865bd8deadSopenharmony_ci the BUFFER_IMMUTABLE_STORAGE flag of <buffer> is set to TRUE. 2875bd8deadSopenharmony_ci 2885bd8deadSopenharmony_ci Append to Table 6.2, "Buffer object parameters and their values": 2895bd8deadSopenharmony_ci 2905bd8deadSopenharmony_ci +---------------------------+---------+-----------+------------------+ 2915bd8deadSopenharmony_ci | | | Initial | Legal | 2925bd8deadSopenharmony_ci | Name | Type | Value | Values | 2935bd8deadSopenharmony_ci +---------------------------+---------+-----------+------------------+ 2945bd8deadSopenharmony_ci | BUFFER_IMMUTABLE_STORAGE | boolean | FALSE | TRUE, FALSE | 2955bd8deadSopenharmony_ci | BUFFER_STORAGE_FLAGS | int | 0 | See section 6.2 | 2965bd8deadSopenharmony_ci +---------------------------+---------+-----------+------------------+ 2975bd8deadSopenharmony_ci 2985bd8deadSopenharmony_ci Append to Table 6.3, "Buffer object initial state": 2995bd8deadSopenharmony_ci 3005bd8deadSopenharmony_ci +---------------------------+-------------------------------------- + 3015bd8deadSopenharmony_ci | Name | Value | 3025bd8deadSopenharmony_ci +---------------------------+---------------------------------------+ 3035bd8deadSopenharmony_ci | BUFFER_IMMUTABLE_STORAGE | TRUE if the buffer's storage is | 3045bd8deadSopenharmony_ci | | immutable, FALSE otherwise | 3055bd8deadSopenharmony_ci | BUFFER_STORAGE_FLAGS | 0 | 3065bd8deadSopenharmony_ci +---------------------------+---------------------------------------+ 3075bd8deadSopenharmony_ci 3085bd8deadSopenharmony_ci Modify Section 6.3, "Mapping and Unmapping Buffer Data" 3095bd8deadSopenharmony_ci 3105bd8deadSopenharmony_ci Add to the bulleted list describing flags that modify buffer mappings, 3115bd8deadSopenharmony_ci p.62. 3125bd8deadSopenharmony_ci 3135bd8deadSopenharmony_ci * MAP_PERSISTENT_BIT indicates that it is not an error for the GL to 3145bd8deadSopenharmony_ci read data from or write data to the buffer while it is mapped (see 3155bd8deadSopenharmony_ci section 6.3.2). If this bit is set, the value of 3165bd8deadSopenharmony_ci BUFFER_STORAGE_FLAGS for the buffer being mapped must include 3175bd8deadSopenharmony_ci MAP_PERSISTENT_BIT. 3185bd8deadSopenharmony_ci 3195bd8deadSopenharmony_ci * MAP_COHERENT_BIT indicates that the mapping should be performed 3205bd8deadSopenharmony_ci coherently. That is, such a mapping follows the rules set forth in 3215bd8deadSopenharmony_ci section 6.2, "Creating and Modifying Buffer Object Data Stores". 3225bd8deadSopenharmony_ci If the MAP_COHERENT_BIT is set and the buffer's BUFFER_STORAGE_FLAGS 3235bd8deadSopenharmony_ci does not include MAP_COHERENT_BIT, the error INVALID_OPERATION is 3245bd8deadSopenharmony_ci generated. 3255bd8deadSopenharmony_ci 3265bd8deadSopenharmony_ci Modify Section 6.3.2, "Effects of Mapping Buffers on Other GL Commands" 3275bd8deadSopenharmony_ci to read: 3285bd8deadSopenharmony_ci 3295bd8deadSopenharmony_ci An INVALID_OPERATION error is generated by most, but not all GL 3305bd8deadSopenharmony_ci commands when an attempt is detected by such a command to read data from 3315bd8deadSopenharmony_ci or write data to a mapped buffer object unless it was allocated with the 3325bd8deadSopenharmony_ci by a call to BufferStorage with MAP_PERSISTENT_BIT set in 3335bd8deadSopenharmony_ci <flags>. 3345bd8deadSopenharmony_ci 3355bd8deadSopenharmony_ci Any command which does not detect these attempts, and performs such an 3365bd8deadSopenharmony_ci invalid read or write, has undefined results and may result in GL 3375bd8deadSopenharmony_ci interruption or termination. 3385bd8deadSopenharmony_ci 3395bd8deadSopenharmony_ci Add the following to the description of FlushMappedBufferRange: 3405bd8deadSopenharmony_ci 3415bd8deadSopenharmony_ci If a buffer range is mapped with both the MAP_PERSISTENT_BIT and 3425bd8deadSopenharmony_ci MAP_FLUSH_EXPLICIT_BIT set, then FlushMappedBufferRange may be called to 3435bd8deadSopenharmony_ci ensure that data written by the client into the flushed region becomes 3445bd8deadSopenharmony_ci visible to the server. Data written to a coherent store will always 3455bd8deadSopenharmony_ci become visible to the server after an unspecified period of time. 3465bd8deadSopenharmony_ci 3475bd8deadSopenharmony_ci Modify Section 6.8, "Buffer Object State", p. 70: 3485bd8deadSopenharmony_ci 3495bd8deadSopenharmony_ci Add the following required state to a buffer object: 3505bd8deadSopenharmony_ci 3515bd8deadSopenharmony_ci ..., a boolean indicating whether or not buffer storage is 3525bd8deadSopenharmony_ci immutable, an unsigned integer storing the flags with which it was 3535bd8deadSopenharmony_ci allocated, ... 3545bd8deadSopenharmony_ci 3555bd8deadSopenharmony_ciAdditions to Chapter 7 of the OpenGL Core Profile Specification, Version 4.3, 3565bd8deadSopenharmony_ci"Programs and Shaders" 3575bd8deadSopenharmony_ci 3585bd8deadSopenharmony_ci Add to the list of flags accepted by the <barriers> parameter to 3595bd8deadSopenharmony_ci MemoryBarrier in Section 7.12.2, "Shader Memory Access Synchronization": 3605bd8deadSopenharmony_ci 3615bd8deadSopenharmony_ci * CLIENT_MAPPED_BUFFER_BARRIER_BIT: Access by the client to persistent 3625bd8deadSopenharmony_ci mapped regions of buffer objects will reflect data written by shaders 3635bd8deadSopenharmony_ci prior to the barrier. Note that this may cause additional 3645bd8deadSopenharmony_ci synchronization operations. 3655bd8deadSopenharmony_ci 3665bd8deadSopenharmony_ciNew State 3675bd8deadSopenharmony_ci 3685bd8deadSopenharmony_ci Append to Table 23.6, "Buffer Object State", p. 511: 3695bd8deadSopenharmony_ci 3705bd8deadSopenharmony_ci +---------------------------+-----------+----------------------+-------------------+---------------------------------+------------+ 3715bd8deadSopenharmony_ci | Get Value | Type | Get Command | Initial Value | Description | Sec. | 3725bd8deadSopenharmony_ci +---------------------------+-----------+----------------------+-------------------+---------------------------------+------------+ 3735bd8deadSopenharmony_ci | BUFFER_IMMUTABLE_STORAGE | B | GetBufferParameteriv | FALSE | TRUE if buffer's data store is | 6 | 3745bd8deadSopenharmony_ci | | | | | immutable, FALSE otherwise | | 3755bd8deadSopenharmony_ci | BUFFER_STORAGE_FLAGS | Z+ | GetBufferParameteriv | 0 | The buffer object's storage | 6 | 3765bd8deadSopenharmony_ci | | | | | flags. | | 3775bd8deadSopenharmony_ci +---------------------------+-----------+----------------------+-------------------+---------------------------------+------------+ 3785bd8deadSopenharmony_ci 3795bd8deadSopenharmony_ciNew Implementation Dependent State 3805bd8deadSopenharmony_ci 3815bd8deadSopenharmony_ci None. 3825bd8deadSopenharmony_ci 3835bd8deadSopenharmony_ciErrors 3845bd8deadSopenharmony_ci 3855bd8deadSopenharmony_ci INVALID_OPERATION is generated by BufferStorage if zero is bound to 3865bd8deadSopenharmony_ci <target>. 3875bd8deadSopenharmony_ci 3885bd8deadSopenharmony_ci INVALID_OPERATION is generated by BufferStorage, NamedBufferStorageEXT 3895bd8deadSopenharmony_ci and BufferData if the buffer object already owns an immutable data 3905bd8deadSopenharmony_ci store. 3915bd8deadSopenharmony_ci 3925bd8deadSopenharmony_ci INVALID_VALUE is generated by BufferStorage and NamedBufferStorageEXT 3935bd8deadSopenharmony_ci if <size> is less than or equal to zero. 3945bd8deadSopenharmony_ci 3955bd8deadSopenharmony_ci INVALID_VALUE is generated by BufferStorage and NamedBufferStorageEXT if 3965bd8deadSopenharmony_ci <flags> contains MAP_PERSISTENT_BIT but does not contain 3975bd8deadSopenharmony_ci at least one of MAP_READ_BIT or 3985bd8deadSopenharmony_ci MAP_WRITE_BIT. 3995bd8deadSopenharmony_ci 4005bd8deadSopenharmony_ci INVALID_VALUE is generated by BufferStorage and NamedBufferStorageEXT if 4015bd8deadSopenharmony_ci <flags> contains MAP_COHERENT_BIT, but does not also 4025bd8deadSopenharmony_ci contain MAP_PERSISTENT_BIT. 4035bd8deadSopenharmony_ci 4045bd8deadSopenharmony_ci INVALID_OPERATION is generated by MapBufferRange if any of MAP_READ_BIT, 4055bd8deadSopenharmony_ci MAP_WRITE_BIT, MAP_PERSISTENT_BIT, or MAP_COHERENT_BIT are included in 4065bd8deadSopenharmony_ci <access>, but the same bit is not included in the buffer's storage 4075bd8deadSopenharmony_ci flags. 4085bd8deadSopenharmony_ci 4095bd8deadSopenharmony_ci INVALID_OPERATION is generated by MapBufferRange if MAP_PERSISTENT_BIT 4105bd8deadSopenharmony_ci is included in <access> but MAP_PERSISTENT_BIT is not 4115bd8deadSopenharmony_ci included in the buffer's storage flags, or if MAP_COHERENT_BIT is included 4125bd8deadSopenharmony_ci in <access> but MAP_COHERENT_BIT is not 4135bd8deadSopenharmony_ci included in the buffer's storage flags. 4145bd8deadSopenharmony_ci 4155bd8deadSopenharmony_ci OUT_OF_MEMORY is generated by BufferStorage and NamedBufferStorageEXT if 4165bd8deadSopenharmony_ci the GL is not able to allocate a data store with the properties requested 4175bd8deadSopenharmony_ci in <flags>. 4185bd8deadSopenharmony_ci 4195bd8deadSopenharmony_ci *REMOVE* all errors generated by any command should they detect access to 4205bd8deadSopenharmony_ci a mapped buffer and replace with language such as: 4215bd8deadSopenharmony_ci 4225bd8deadSopenharmony_ci INVALID_OPERATION is generated by <command> if the buffer is currently 4235bd8deadSopenharmony_ci mapped by MapBuffer{Range} unless it was mapped with the 4245bd8deadSopenharmony_ci MAP_PERSISTENT_BIT included in <access>. 4255bd8deadSopenharmony_ci 4265bd8deadSopenharmony_ciDependencies on GL_EXT_direct_state_access 4275bd8deadSopenharmony_ci 4285bd8deadSopenharmony_ci If GL_EXT_direct_state_access is not supported, remove all references to 4295bd8deadSopenharmony_ci NamedBufferStorageEXT. 4305bd8deadSopenharmony_ci 4315bd8deadSopenharmony_ciConformance Tests 4325bd8deadSopenharmony_ci 4335bd8deadSopenharmony_ci TBD 4345bd8deadSopenharmony_ci 4355bd8deadSopenharmony_ciUsage Examples 4365bd8deadSopenharmony_ci 4375bd8deadSopenharmony_ci Example 1: Updating the content of a buffer which does not have the 4385bd8deadSopenharmony_ci DYNAMIC flag set: 4395bd8deadSopenharmony_ci 4405bd8deadSopenharmony_ci // Allocate two buffers, one of which will be our 'staging buffer'. 4415bd8deadSopenharmony_ci GLuint bufs[2]; 4425bd8deadSopenharmony_ci glGenBuffers(2, &bufs[0]); 4435bd8deadSopenharmony_ci 4445bd8deadSopenharmony_ci // Client can map this buffer for write. 4455bd8deadSopenharmony_ci // One could possibly make this mapping persistent. 4465bd8deadSopenharmony_ci glBindBuffer(GL_COPY_READ_BUFFER, bufs[0]); 4475bd8deadSopenharmony_ci glBufferStorage(GL_COPY_READ_BUFFER, size, NULL, 4485bd8deadSopenharmony_ci GL_MAP_WRITE_BIT); 4495bd8deadSopenharmony_ci 4505bd8deadSopenharmony_ci // Client cannot read or write this buffer, server can do both. 4515bd8deadSopenharmony_ci glBindBuffer(GL_COPY_WRITE_BUFFER, bufs[1]); 4525bd8deadSopenharmony_ci glBufferStorage(GL_COPY_WRITE_BUFFER, size, NULL, 0); 4535bd8deadSopenharmony_ci 4545bd8deadSopenharmony_ci // Now, map the staging buffer to put data into it. 4555bd8deadSopenharmony_ci void * data = glMapBufferRange(GL_COPY_READ_BUFFER, 0, size, 4565bd8deadSopenharmony_ci GL_MAP_WRITE_BIT | 4575bd8deadSopenharmony_ci GL_MAP_INVALIDATE_BUFFER_BIT); 4585bd8deadSopenharmony_ci memcpy(data, source_data, size); 4595bd8deadSopenharmony_ci glUnmapBuffer(GL_COPY_READ_BUFFER); 4605bd8deadSopenharmony_ci 4615bd8deadSopenharmony_ci // Copy from the staging buffer to the server-side buffer. 4625bd8deadSopenharmony_ci glCopyBufferSubData(GL_COPY_READ_BUFFER, GL_COPY_WRITE_BUFFER, 0, 0, size); 4635bd8deadSopenharmony_ci 4645bd8deadSopenharmony_ci Example 2: Read from framebuffer into a buffer mapped into client's 4655bd8deadSopenharmony_ci address space: 4665bd8deadSopenharmony_ci 4675bd8deadSopenharmony_ci // Create buffer, allocate storage, and create a persistent map. 4685bd8deadSopenharmony_ci GLuint pbo; 4695bd8deadSopenharmony_ci glGenBuffers(1, &pbo); 4705bd8deadSopenharmony_ci glBindBuffer(GL_PIXEL_PACK_BUFFER, pbo); 4715bd8deadSopenharmony_ci glBufferStorage(GL_PIXEL_PACK_BUFFER, size, NULL, 4725bd8deadSopenharmony_ci GL_MAP_READ_BIT | 4735bd8deadSopenharmony_ci GL_MAP_PERSISTENT_BIT); 4745bd8deadSopenharmony_ci 4755bd8deadSopenharmony_ci void * data = glMapBufferRange(GL_PIXEL_PACK_BUFFER, 4765bd8deadSopenharmony_ci GL_MAP_READ_BIT | 4775bd8deadSopenharmony_ci GL_MAP_PERSISTENT_BIT); 4785bd8deadSopenharmony_ci 4795bd8deadSopenharmony_ci glReadPixels(0, 0, width, height, format, type, NULL); 4805bd8deadSopenharmony_ci glMemoryBarrier(GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT); 4815bd8deadSopenharmony_ci GLsync fence = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0); 4825bd8deadSopenharmony_ci 4835bd8deadSopenharmony_ci // Do stuff to use time... 4845bd8deadSopenharmony_ci ReallyExpensiveFunction(); 4855bd8deadSopenharmony_ci 4865bd8deadSopenharmony_ci glClientWaitSync(fence); 4875bd8deadSopenharmony_ci 4885bd8deadSopenharmony_ci // Use the data written to the buffer 4895bd8deadSopenharmony_ci UseDataInMemory(data); 4905bd8deadSopenharmony_ci 4915bd8deadSopenharmony_ci XXX TODO::: MORE EXAMPLES HERE 4925bd8deadSopenharmony_ci 4935bd8deadSopenharmony_ciIssues 4945bd8deadSopenharmony_ci 4955bd8deadSopenharmony_ci 1) What is the best strategy to allow 'render while mapped'? Options I 4965bd8deadSopenharmony_ci can think of right now are (a) Allow the application to render when a 4975bd8deadSopenharmony_ci buffer is mapped, so long as the MAP_PERSISTENT_BIT 4985bd8deadSopenharmony_ci was set when it was allocated; (b) Continue to disallow 'render while 4995bd8deadSopenharmony_ci mapped', but say that a client pointer obtained from MapBuffer{Range} 5005bd8deadSopenharmony_ci remains valid even when the buffer is not mapped, so long as it has 5015bd8deadSopenharmony_ci not been destroyed; (c) add a flag to glMapBufferRange's <access> 5025bd8deadSopenharmony_ci parameter to indicate the desire to render with it. 5035bd8deadSopenharmony_ci 5045bd8deadSopenharmony_ci RESOLVED: We choose a combination of (a) and (c). The application must 5055bd8deadSopenharmony_ci both create the data store with MAP_PERSISTENT_BIT set 5065bd8deadSopenharmony_ci _and_ map it with MAP_PERSISTENT_BIT set in <access>. Did the same 5075bd8deadSopenharmony_ci for coherency too. 5085bd8deadSopenharmony_ci 5095bd8deadSopenharmony_ci 2) The new flags don't directly map to the <usage> parameter for 5105bd8deadSopenharmony_ci glBufferData and one cannot be expressed in terms of the other. Does 5115bd8deadSopenharmony_ci that matter? 5125bd8deadSopenharmony_ci 5135bd8deadSopenharmony_ci RESOLVED: Most applications get <usage> wrong and they're only hints 5145bd8deadSopenharmony_ci anyway. The flags are hard and fast rules that must be followed. They 5155bd8deadSopenharmony_ci serve a different purpose. The idea here is to allow the 5165bd8deadSopenharmony_ci implementation to not have to second guess the application and to 5175bd8deadSopenharmony_ci perform less tracking, and for the application to have more control. 5185bd8deadSopenharmony_ci We define BufferData in terms of BufferStorage with the most liberal 5195bd8deadSopenharmony_ci allowed flags (essentially, anything goes), but still pass the 5205bd8deadSopenharmony_ci <usage> hint to the implementation to allow it to continue to second 5215bd8deadSopenharmony_ci guess the application. 5225bd8deadSopenharmony_ci 5235bd8deadSopenharmony_ci 3) Do we have all the flags we want? Are any problematic? 5245bd8deadSopenharmony_ci 5255bd8deadSopenharmony_ci RESOLVED: We don't want any more flags. We don't believe any are 5265bd8deadSopenharmony_ci problematic. 5275bd8deadSopenharmony_ci 5285bd8deadSopenharmony_ci 4) Should we include MULTI_TARGET_BIT? There are legitimate use cases where 5295bd8deadSopenharmony_ci a buffer could be used on two or three targets. However, this bit is an 5305bd8deadSopenharmony_ci 'all or nothing' kind of thing. 5315bd8deadSopenharmony_ci 5325bd8deadSopenharmony_ci RESOLVED: No, not at this time. 5335bd8deadSopenharmony_ci 5345bd8deadSopenharmony_ci 5) How do you get data into a non-dynamic buffer if you can't write to it 5355bd8deadSopenharmony_ci from the client? 5365bd8deadSopenharmony_ci 5375bd8deadSopenharmony_ci RESOLVED: The server is capable of writing to buffers that were not 5385bd8deadSopenharmony_ci allocated with the DYNAMIC flag set. Therefore, it is possible to 5395bd8deadSopenharmony_ci use CopyBufferSubData to copy from a dynamic buffer to a non-dynamic 5405bd8deadSopenharmony_ci buffer. It's also possible to write to it with any other server-side 5415bd8deadSopenharmony_ci mechanism such as transform feedback, image stores and so on. 5425bd8deadSopenharmony_ci 5435bd8deadSopenharmony_ci 6) If a buffer is allocated without the GL_BUFFER_STORAGE_SERVER_READ_BIT 5445bd8deadSopenharmony_ci (or GL_BUFFER_STORAGE_SERVER_WRITE_BIT), what happens if an attempt is 5455bd8deadSopenharmony_ci made use the buffer in a way that may cause the server to read 5465bd8deadSopenharmony_ci (or write) to the buffer? 5475bd8deadSopenharmony_ci 5485bd8deadSopenharmony_ci RESOLVED: Nuked the SERVER_READ and SERVER_WRITE bits. They didn't 5495bd8deadSopenharmony_ci serve the purpose for which they were intended. 5505bd8deadSopenharmony_ci 5515bd8deadSopenharmony_ci 7) Which operations are able to update buffers that are not dynamic? 5525bd8deadSopenharmony_ci 5535bd8deadSopenharmony_ci Non-dynamic buffers effectively don't allow direct transfer of data 5545bd8deadSopenharmony_ci from client to server (i.e., glBufferSubData). Examples of operations 5555bd8deadSopenharmony_ci that may write to non-dynamic buffers are transform feedback, image 5565bd8deadSopenharmony_ci stores, ReadPixels, GetTexImage (PBO), CopyBufferSubData, 5575bd8deadSopenharmony_ci ClearBufferSubData - essentially anything that doesn't transfer 5585bd8deadSopenharmony_ci arbitrary amounts of data from client to server. 5595bd8deadSopenharmony_ci 5605bd8deadSopenharmony_ci 8) Are there any restrictions on calling GetBufferSubData on a buffer 5615bd8deadSopenharmony_ci allocated using BufferStorage? 5625bd8deadSopenharmony_ci 5635bd8deadSopenharmony_ci RESOLVED: No, there are not. 5645bd8deadSopenharmony_ci 5655bd8deadSopenharmony_ci 9) What is the meaning of CLIENT_STORAGE_BIT? Is it one of those 5665bd8deadSopenharmony_ci silly hint things? 5675bd8deadSopenharmony_ci 5685bd8deadSopenharmony_ci DISCUSSION: Unfortunately, yes, it is. For some platforms, such as UMA 5695bd8deadSopenharmony_ci systems, it's irrelevant and all memory is both server and client 5705bd8deadSopenharmony_ci accessible. The issue is, that on some platforms and for certain 5715bd8deadSopenharmony_ci combinations of flags, there may be multiple regions of memory that 5725bd8deadSopenharmony_ci can satisfy the request (visible to both server and client and coherent 5735bd8deadSopenharmony_ci to both, for example), but may have substantially different performance 5745bd8deadSopenharmony_ci characteristics for access from either. This bit essentially serves 5755bd8deadSopenharmony_ci as a hint to say that that an application will access the store more 5765bd8deadSopenharmony_ci frequently from the client than from the server. In practice, 5775bd8deadSopenharmony_ci applications will still get it wrong (like setting it all the time or 5785bd8deadSopenharmony_ci never setting it at all, for example), implementations will still have 5795bd8deadSopenharmony_ci to second guess applications and end up full of heuristics to figure out 5805bd8deadSopenharmony_ci where to put data and gobs of code to move things around based on what 5815bd8deadSopenharmony_ci applications do, and eventually it'll make no difference whether 5825bd8deadSopenharmony_ci applications set it or not. But hey, we tried. 5835bd8deadSopenharmony_ci 5845bd8deadSopenharmony_ci 10) Do we want to add flags for MapBufferRange for PERSISTENT and/or 5855bd8deadSopenharmony_ci COHERENT mapping? In their absence, implementations must assume that 5865bd8deadSopenharmony_ci any mapping performed on a buffer whose storage flags include the 5875bd8deadSopenharmony_ci PERSISTENT or COHERENT flags must behave appropriately. 5885bd8deadSopenharmony_ci 5895bd8deadSopenharmony_ci RESOLVED. Added. 5905bd8deadSopenharmony_ci 5915bd8deadSopenharmony_ci 11) Do we need language to explicitly say that flushes of non-coherent 5925bd8deadSopenharmony_ci mapped buffers need to occur on buffers mapped with the FLUSH_EXPLICIT 5935bd8deadSopenharmony_ci bit? 5945bd8deadSopenharmony_ci 5955bd8deadSopenharmony_ci RESOLVED: No. The language already states that FlushMappedBufferRange 5965bd8deadSopenharmony_ci should be used to perform the flush, and this command requires that 5975bd8deadSopenharmony_ci the mapping be established with the FLUSH_EXPLICIT bit set. 5985bd8deadSopenharmony_ci 5995bd8deadSopenharmony_ci 12) Which functions can/cannot be used to update the content of a 6005bd8deadSopenharmony_ci non-DYNAMIC buffer? Can the buffer be the target of an update 6015bd8deadSopenharmony_ci operation at all? 6025bd8deadSopenharmony_ci 6035bd8deadSopenharmony_ci RESOLVED: BufferSubData is only allowed for DYNAMIC buffers. Updates 6045bd8deadSopenharmony_ci through mappings are allowed so long as the STORAGE_MAP_WRITE_BIT is 6055bd8deadSopenharmony_ci set. Server side commands, including CopyBufferSubData, 6065bd8deadSopenharmony_ci ClearBufferSubData, ReadPixels, GetTexImage are allowed. Further, 6075bd8deadSopenharmony_ci shader writes such as image stores, SSBO, atomic counters, transform 6085bd8deadSopenharmony_ci feedback and so on are also allowed. 6095bd8deadSopenharmony_ci 6105bd8deadSopenharmony_ci 13) Why is there a gap between the MAP_WRITE_BIT and MAP_PERSISTENT_BIT 6115bd8deadSopenharmony_ci token values? 6125bd8deadSopenharmony_ci 6135bd8deadSopenharmony_ci RESOLVED: MAP_PERSISTENT_BIT and MAP_COHERENT_BIT are allocated from 6145bd8deadSopenharmony_ci the bitfield used for MapBufferRange, which include values that 6155bd8deadSopenharmony_ci aren't relevant for BufferStorage. This allows the same tokens 6165bd8deadSopenharmony_ci to be used as flags for BufferStorage and MapBufferRange, hopefully 6175bd8deadSopenharmony_ci reducing confusion. 6185bd8deadSopenharmony_ci 6195bd8deadSopenharmony_ciRevision History 6205bd8deadSopenharmony_ci 6215bd8deadSopenharmony_ci Rev. Date Author Changes 6225bd8deadSopenharmony_ci ---- -------- -------- ----------------------------------------- 6235bd8deadSopenharmony_ci 6245bd8deadSopenharmony_ci 1 01/16/2013 gsellers Initial draft 6255bd8deadSopenharmony_ci 6265bd8deadSopenharmony_ci 2 01/21/2013 gsellers Updates 6275bd8deadSopenharmony_ci 6285bd8deadSopenharmony_ci 3 01/22/2013 gsellers Change static->dynamic. Remove target 6295bd8deadSopenharmony_ci restrictions. Get a little closer to expressing 6305bd8deadSopenharmony_ci BufferData in terms of BufferStorage. 6315bd8deadSopenharmony_ci 6325bd8deadSopenharmony_ci 4 04/22/2013 gsellers Add CLIENT_MAPPED_BUFFER_ACCESS_BIT for 6335bd8deadSopenharmony_ci MemoryBarrier. 6345bd8deadSopenharmony_ci Add BUFFER_STORAGE_{READ|WRITE}_BIT and issue 6. 6355bd8deadSopenharmony_ci Add example usage for non-dynamic buffers. 6365bd8deadSopenharmony_ci Add issue 7. 6375bd8deadSopenharmony_ci 6385bd8deadSopenharmony_ci 5 04/23/2013 gsellers Nuked the BUFFER_STORAGE_{READ|WRITE}_BIT 6395bd8deadSopenharmony_ci flags again. 6405bd8deadSopenharmony_ci Make DYNAMIC and MAP_WRITE_BIT 6415bd8deadSopenharmony_ci orthogonal. 6425bd8deadSopenharmony_ci Rename CLIENT_MAPPED_BUFFER_ACCESS_BIT to 6435bd8deadSopenharmony_ci CLIENT_MAPPED_BUFFER_BARRIER_BIT. 6445bd8deadSopenharmony_ci Add another example. 6455bd8deadSopenharmony_ci Update values of tokens. 6465bd8deadSopenharmony_ci Add (and resolve) issue 8. 6475bd8deadSopenharmony_ci 6485bd8deadSopenharmony_ci 6 05/14/2013 gsellers Add BUFFER_STORAGE_SERVER_BIT. 6495bd8deadSopenharmony_ci Define value of <usage> for buffers allocated 6505bd8deadSopenharmony_ci with BufferStorage. Issue 9. 6515bd8deadSopenharmony_ci 6525bd8deadSopenharmony_ci 7 05/22/2013 gsellers Address several issues from bug 10246. 6535bd8deadSopenharmony_ci 6545bd8deadSopenharmony_ci 8 05/23/2013 gsellers Address issues from bug 10288. 6555bd8deadSopenharmony_ci * Change BUFFER_STORAGE_SERVER_BIT to 6565bd8deadSopenharmony_ci CLIENT_STORAGE_BIT (inverting its 6575bd8deadSopenharmony_ci sense), which makes 0 'fast'. 6585bd8deadSopenharmony_ci * Clarify that DYNAMIC_BIT only affects 6595bd8deadSopenharmony_ci BufferSubData (i.e., direct, arbitrary 6605bd8deadSopenharmony_ci client->server transfers). 6615bd8deadSopenharmony_ci * Add issues 11 + 12. 6625bd8deadSopenharmony_ci 6635bd8deadSopenharmony_ci 9 05/28/2013 Jon Leech Fix various typos resulting from changes 6645bd8deadSopenharmony_ci in token names, tweak language to match API 6655bd8deadSopenharmony_ci spec, some paragraph reflowing, insert some 6665bd8deadSopenharmony_ci questions marked by '**' inline. 6675bd8deadSopenharmony_ci 6685bd8deadSopenharmony_ci 10 05/29/2013 gsellers Remove <target> parameter from 6695bd8deadSopenharmony_ci NamedBufferStorageEXT. 6705bd8deadSopenharmony_ci Incorporate new rules for coherency. 6715bd8deadSopenharmony_ci Add COHERENT_MAP_BIT for MapBufferRange. 6725bd8deadSopenharmony_ci 6735bd8deadSopenharmony_ci 11 05/30/2013 Jon Leech Fix typos including COHERENT_MAP_BIT 6745bd8deadSopenharmony_ci -> MAP_COHERENT_BIT and PERSISTENT_MAP_BIT 6755bd8deadSopenharmony_ci -> MAP_PERSISTENT_BIT. 6765bd8deadSopenharmony_ci 6775bd8deadSopenharmony_ci 12 05/30/2013 gsellers Resolve issues 3 and 10. Fix typos. 6785bd8deadSopenharmony_ci Resolve issues from bug 10326. 6795bd8deadSopenharmony_ci Add (and resolve) issue 13. 6805bd8deadSopenharmony_ci 6815bd8deadSopenharmony_ci 13 05/30/2013 gsellers Change names of flags (again). 6825bd8deadSopenharmony_ci Use same values for MapBufferRange flags 6835bd8deadSopenharmony_ci and BufferStorage flags. 6845bd8deadSopenharmony_ci 6855bd8deadSopenharmony_ci 14 05/30/2013 Jon Leech Clean up language describing flags and 6865bd8deadSopenharmony_ci some indentation issues. 6875bd8deadSopenharmony_ci 6885bd8deadSopenharmony_ci 15 05/31/2013 Jon Leech Add BUFFER_IMMUTABLE_STORAGE to table 6895bd8deadSopenharmony_ci 6.2 (Bug 10288). 6905bd8deadSopenharmony_ci 6915bd8deadSopenharmony_ci 16 06/06/2013 Jon Leech Change default BUFFER_IMMUTABLE_STORAGE 6925bd8deadSopenharmony_ci value in table 6.2 to FALSE, matching API 6935bd8deadSopenharmony_ci spec, since these are values when created 6945bd8deadSopenharmony_ci with BindBuffer. Fix typo from bug 10326. 6955bd8deadSopenharmony_ci 6965bd8deadSopenharmony_ci 17 06/27/2013 Jon Leech Add error for BufferSubData and fix 6975bd8deadSopenharmony_ci example code (Bug 10326) 6985bd8deadSopenharmony_ci 6995bd8deadSopenharmony_ci 18 07/03/2013 gsellers Fix language describing DYNAMIC_STORAGE_BIT 7005bd8deadSopenharmony_ci (mutated -> updated), and typo in description 7015bd8deadSopenharmony_ci of usage parameter when storage is allocated 7025bd8deadSopenharmony_ci with BufferStorage. (Bug 10471) 7035bd8deadSopenharmony_ci 7045bd8deadSopenharmony_ci 19 07/18/2013 gsellers Added missing values for MAP_PERSISTENT_BIT 7055bd8deadSopenharmony_ci and MAP_COHERENT_BIT. 7065bd8deadSopenharmony_ci 7075bd8deadSopenharmony_ci 20 07/18/2013 Jon Leech Add BufferStorage initial state to table 7085bd8deadSopenharmony_ci 6.3 and add error when zero is bound to 7095bd8deadSopenharmony_ci <target> (Bug 10335). 7105bd8deadSopenharmony_ci 7115bd8deadSopenharmony_ci 21 07/19/2013 Jon Leech Clean up table 6.3 captions to match 7125bd8deadSopenharmony_ci API spec (Bug 10335). 7135bd8deadSopenharmony_ci 7145bd8deadSopenharmony_ci 22 08/15/2013 Jon Leech Remove error for BufferStorage and 7155bd8deadSopenharmony_ci NamedBufferStorageEXT if <flags> contains 7165bd8deadSopenharmony_ci MAP_WRITE_BIT but does not contain 7175bd8deadSopenharmony_ci DYNAMIC_STORAGE_BIT (Bug 10561, public Bug 7185bd8deadSopenharmony_ci 925). 7195bd8deadSopenharmony_ci 7205bd8deadSopenharmony_ci 23 08/16/2013 mjk Better indicate DSA entrypoints 7215bd8deadSopenharmony_ci 7225bd8deadSopenharmony_ci 24 06/09/2014 Jon Leech Change query commands for buffer storage 7235bd8deadSopenharmony_ci state to GetBufferParameteriv (Bug 12307). 7245bd8deadSopenharmony_ci 7255bd8deadSopenharmony_ci 25 04/20/2015 Jon Leech Change description of MAP_COHERENT_BIT for 7265bd8deadSopenharmony_ci buffer storage so that barriers with 7275bd8deadSopenharmony_ci CLIENT_MAPPED_BUFFER_BARRIER_BIT do not need 7285bd8deadSopenharmony_ci to make CPU writes visible to the GPU in 7295bd8deadSopenharmony_ci this case without an explicit flush (Bug 7305bd8deadSopenharmony_ci 13578). 731