[Mesa-dev] memoryBarrier + SSBO

Albert Freeman albertwdfreeman at gmail.com
Sat Sep 26 15:32:47 PDT 2015


On 27 September 2015 at 08:30, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> On Sat, Sep 26, 2015 at 6:12 PM, Albert Freeman
> <albertwdfreeman at gmail.com> wrote:
>> On 26 September 2015 at 03:32, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
>>> Hi Ian (and other spec experts),
>>>
>>> The ARB_ssbo spec mentions the following:
>>>
>>>     OpenGL 4.0 (either core or compatibility profile) is required.
>>>
>>> ...
>>>
>>>     Additionally, the shading language provides the memoryBarrier() function
>>>     to control the relative order of memory accesses within individual shader
>>>     invocations and provides various memory qualifiers controlling how the
>>>     memory corresponding to individual variables is accessed.
>>>
>>> However the memoryBarrier() function only becomes available in GLSL
>>> 4.20 [along with the glMemoryBarrier() function that the spec also
>>> refers to] or with ARB_shader_image_load_store.
>>>
>>> Is the implication that such functionality should be auto-exposed in
>>> image-less drivers that support ssbo? Or that this functionality
>>> should just not exist unless images are supported?
>>>
>>> This is relevant to me as I plan on adding ssbo support to gallium
>>> before images. Also, is there really anything in there that would
>>> prevent this from being exposed on a GL 3.1 driver (I'm thinking of
>>> freedreno which doesn't support GS yet and is my initial target for
>>> this, since I can make atomics actually work on there, unlike NVIDIA
>>> where the damn things just won't budge without some magic
>>> yet-to-be-found make-it-work bit).
>>>
>>> Cheers,
>>>
>>>   -ilia
>>
>> I think that is an error in the ARB_ssbo spec (as that spec also
>> mentions: "This extension is written against the OpenGL 4.2
>> (Compatibility Profile) Specification."). I believe this occurred as
>> ARB_ssbo was adapted from NV_ssbo; NV_ssbo does not mention
>> MemoryBarrier (i.e. someone forgot to update the version when NV_ssbo
>> was enhanced for ARB).
>
> Many extension specs are like this though... written as a diff against
> OpenGL version X, but require OpenGL version Y, s.t. Y < X.
>
> What are you saying is the spec error, by the way? The minimum version
> requirement? Or the fact that the interaction isn't listed?
>
>   -ilia
The minimum version requirement, it is GL 4.0 on NV_ssbo and wasen't
changed when that was "enhanced" (e.g. Memory Barrier stuff was added)
for ARB_ssbo.


More information about the mesa-dev mailing list