KhronosGroup / OpenGL-Refpages

OpenGL and OpenGL ES reference page sources, and generated HTML used as backing store for khronos.org
424 stars 131 forks source link

Reference page for MemoryBarrier omits information for certain barrier bits #128

Open JuanDiegoMontoya opened 1 year ago

JuanDiegoMontoya commented 1 year ago

In the reference page for glMemoryBarrier, the descriptions for GL_ATOMIC_COUNTER_BARRIER_BIT and GL_SHADER_STORAGE_BARRIER_BIT are these, respectively:

GL_ATOMIC_COUNTER_BARRIER_BIT Accesses to atomic counters after the barrier will reflect writes prior to the barrier.

GL_SHADER_STORAGE_BARRIER_BIT Accesses to shader storage blocks after the barrier will reflect writes prior to the barrier.

However, in the OpenGL 4.6 (as well as 4.3-4.5) core specification, the descriptions of these are longer and include some important information about the reads becoming visible (emphasis mine):

ATOMIC_COUNTER_BARRIER_BIT: Memory accesses using shader atomic counter built-in functions issued after the barrier will reflect data written by shaders prior to the barrier. Additionally, atomic counter function invoca- tions after the barrier will not execute until all memory accesses (e.g., loads, stores, texture fetches, vertex fetches) initiated prior to the barrier complete.

SHADER_STORAGE_BARRIER_BIT: Memory accesses using shader buffer variables issued after the barrier will reflect data written by shaders prior to the barrier. Additionally, assignments to and atomic operations performed on shader buffer variables after the barrier will not execute until all memory accesses initiated prior to the barrier complete.

Curiously, the other barrier bits in the reference page include this information.