Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
JuanDiegoMontoya opened this issue Apr 18, 2023 · 0 comments · May be fixed by #143
Open

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

JuanDiegoMontoya opened this issue Apr 18, 2023 · 0 comments · May be fixed by #143

Comments

@JuanDiegoMontoya
Copy link

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.

NogginBops added a commit to NogginBops/OpenGL-Refpages that referenced this issue Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant