Closed stephen-hqxu closed 2 years ago
Yes I think those references to MemoryBarrierNV are outdated, and should probably be updated to reference MemoryBarrierEXT, which is defined in GL_EXT_shader_image_load_store or the core MemoryBarrier function where appropriate.
Regarding GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV, yes that can be used with either MemoryBarrier, or MemoryBarrierEXT, which is an alias of MemoryBarrier.
I could not find MemoryBarrierEXT
in the API either, maybe it was removed too?
I could not find
MemoryBarrierEXT
in the API either, maybe it was removed too?
I see it here: https://github.com/KhronosGroup/OpenGL-Registry/blob/main/api/GL/glext.h#L8209
There are two NV extensions mentioning the use of function
MemoryBarrierNV
, however this function cannot be found in the API.In NV_gpu_program5, the issue 19 mentioned something regarding the function
MemoryBarrierEXT
, but the answer demonstrated the use ofMemoryBarrierNV
. As a side note,MemoryBarrierEXT
andTEXTURE_FETCH_BARRIER_BIT_NV
cannot be found in the API either.https://github.com/KhronosGroup/OpenGL-Registry/blob/b0643365776c260efc6317d2ff67dd8bf5078be9/extensions/NV/NV_gpu_program5.txt#L3057-L3084
In NV_shader_buffer_store, token
SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV
is added toMemoryBarrierNV
.https://github.com/KhronosGroup/OpenGL-Registry/blob/b0643365776c260efc6317d2ff67dd8bf5078be9/extensions/NV/NV_shader_buffer_store.txt#L84-L86
According to the API, here are all tokens the GL 4.2 core API function
MemoryBarrier
support:While
GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV
is defined as.This token value 0x00000010 is not used by any token accepted by
MemoryBarrier
, so it that safe to assumeMemoryBarrier
is now the intended function to be used withGL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV
? I have tried to useSHADER_GLOBAL_ACCESS_BARRIER_BIT_NV
onMemoryBarrier
. The call to functionMemoryBarrier(GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV)
did not return any error.Perhaps the extension specifications are outdated regarding usage
MemoryBarrierNV
as it has been removed from the API and merged with the functionality provided byMemoryBarrier
?