Ian Romanick <i...@freedesktop.org> writes:

> On 08/17/2015 09:56 AM, Ilia Mirkin wrote:
>> On Mon, Aug 17, 2015 at 12:46 PM, Francisco Jerez <curroje...@riseup.net> 
>> wrote:
>>> ---
>>>  src/mesa/main/extensions.c | 1 +
>>>  src/mesa/main/mtypes.h     | 1 +
>>>  2 files changed, 2 insertions(+)
>>>
>>> diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
>>> index d934d19..38c7bc8 100644
>>> --- a/src/mesa/main/extensions.c
>>> +++ b/src/mesa/main/extensions.c
>>> @@ -319,6 +319,7 @@ static const struct extension extension_table[] = {
>>>     { "GL_OES_query_matrix",                        o(dummy_true),          
>>>                          ES1,       2003 },
>>>     { "GL_OES_read_format",                         o(dummy_true),          
>>>                     GL | ES1,       2003 },
>>>     { "GL_OES_rgb8_rgba8",                          o(dummy_true),          
>>>                          ES1 | ES2, 2005 },
>>> +   { "GL_OES_shader_image_atomic",                 
>>> o(OES_shader_image_atomic),                      ES3,       2015 },
>>>     { "GL_OES_single_precision",                    o(dummy_true),          
>>>                          ES1,       2003 },
>>>     { "GL_OES_standard_derivatives",                
>>> o(OES_standard_derivatives),                           ES2, 2005 },
>>>     { "GL_OES_stencil1",                            o(dummy_false),         
>>>             DISABLE,                2005 },
>>> diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
>>> index 9964fb4..b489f8c 100644
>>> --- a/src/mesa/main/mtypes.h
>>> +++ b/src/mesa/main/mtypes.h
>>> @@ -3970,6 +3970,7 @@ struct gl_extensions
>>>     GLboolean OES_draw_texture;
>>>     GLboolean OES_depth_texture_cube_map;
>>>     GLboolean OES_EGL_image_external;
>>> +   GLboolean OES_shader_image_atomic;
>> 
>> Does this add any functionality over ARB_shader_image_load_store? I
>> guess extension bools are cheap, but... seems unnecessary.
>
> Yes and no.  In terms of functionality, all desktop hardware that can do
> GL_ARB_shader_image_load_store can do this extension.

Yeah, in principle they should, although it might need non-trivial
driver changes if the hardware doesn't support atomic operations at all
on floating-point surfaces.  You may need to lie to the hardware and
pretend that the surface contains integer data.

If we don't expect to have to deal with hardware that can do image loads
and stores at the GLES 3.1 level but without native support for atomics,
Ilia may be right and the OES_shader_image_atomic extension enable may
be redundant.  I'd be fine with removing it, in which case the
ARB_shader_image_load_store enable would really mean
MESA_shader_image_load_store, largely equivalent to
ARB_shader_image_load_store but with the additional atomic built-in
required for OES_shader_image_atomic support.

> However, this extension has one annoying bit of text:
>
>     "OpenGL ES 3.1 and GLSL ES 3.10 are required."
>
> We may need an ES31 tag.  Right now several drivers support OpenGL ES
> 3.0, and they could incorrectly advertise this extension.  This may be a
> transient state, so it may not matter much in the long run.
>
Sounds reasonable to me, I'll add an ES31 tag and squash this into this
commit:
| --- a/src/mesa/main/extensions.c
| +++ b/src/mesa/main/extensions.c
| @@ -319,7 +320,7 @@ static const struct extension extension_table[] = {
|     { "GL_OES_query_matrix",                        o(dummy_true),            
                       ES1,       2003 },
|     { "GL_OES_read_format",                         o(dummy_true),            
                  GL | ES1,       2003 },
|     { "GL_OES_rgb8_rgba8",                          o(dummy_true),            
                       ES1 | ES2, 2005 },
| -   { "GL_OES_shader_image_atomic",                 
o(OES_shader_image_atomic),                      ES3,       2015 },
| +   { "GL_OES_shader_image_atomic",                 
o(OES_shader_image_atomic),                            ES31,2015 },
|     { "GL_OES_single_precision",                    o(dummy_true),            
                       ES1,       2003 },
|     { "GL_OES_standard_derivatives",                
o(OES_standard_derivatives),                           ES2, 2005 },
|     { "GL_OES_stencil1",                            o(dummy_false),           
          DISABLE,                2005 },

>>>     GLboolean OES_texture_float;
>>>     GLboolean OES_texture_float_linear;
>>>     GLboolean OES_texture_half_float;
>>> --
>>> 2.4.6
>>>
>>> _______________________________________________
>>> mesa-dev mailing list
>>> mesa-dev@lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Attachment: signature.asc
Description: PGP signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to