glsl: Add usual extension boilerplate for OES_shader_image_atomic.
authorFrancisco Jerez <currojerez@riseup.net>
Mon, 22 Feb 2016 23:06:45 +0000 (15:06 -0800)
committerFrancisco Jerez <currojerez@riseup.net>
Tue, 23 Feb 2016 03:56:35 +0000 (19:56 -0800)
v2: No need for extension enable bits (Ilia).

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/compiler/glsl/glcpp/glcpp-parse.y
src/compiler/glsl/glsl_parser_extras.cpp
src/compiler/glsl/glsl_parser_extras.h

index 70951a022c3236a3d6a09248df2c423cdfb1711f..b03e19107583d9bd3e269d949ccbbe2df5c350a2 100644 (file)
@@ -2391,6 +2391,9 @@ _glcpp_parser_handle_version_declaration(glcpp_parser_t *parser, intmax_t versio
                  add_builtin_define(parser, "GL_EXT_blend_func_extended", 1);
 
               if (version >= 310) {
+                 if (extensions->ARB_shader_image_load_store)
+                    add_builtin_define(parser, "GL_OES_shader_image_atomic", 1);
+
                  if (extensions->OES_geometry_shader) {
                     add_builtin_define(parser, "GL_OES_geometry_point_size", 1);
                     add_builtin_define(parser, "GL_OES_geometry_shader", 1);
index fbac8366bd100943398a7d6eba849f84777eec32..ec180c0973b65cfe7d103f295b1b37ec2f6b9c61 100644 (file)
@@ -606,6 +606,7 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = {
    EXT(OES_EGL_image_external,         false, true,      OES_EGL_image_external),
    EXT(OES_geometry_point_size,        false, true,      OES_geometry_shader),
    EXT(OES_geometry_shader,            false, true,      OES_geometry_shader),
+   EXT(OES_shader_image_atomic,        false, true,      ARB_shader_image_load_store),
    EXT(OES_standard_derivatives,       false, true,      OES_standard_derivatives),
    EXT(OES_texture_3D,                 false, true,      dummy_true),
    EXT(OES_texture_storage_multisample_2d_array, false, true, ARB_texture_multisample),
index 5f6ca6a03f5d3caeb53fcea9d73bff3cda64175b..86ec057f288dbdaf50f24682d591225c8d3bdf4d 100644 (file)
@@ -593,6 +593,8 @@ struct _mesa_glsl_parse_state {
    bool OES_geometry_point_size_warn;
    bool OES_geometry_shader_enable;
    bool OES_geometry_shader_warn;
+   bool OES_shader_image_atomic_enable;
+   bool OES_shader_image_atomic_warn;
    bool OES_standard_derivatives_enable;
    bool OES_standard_derivatives_warn;
    bool OES_texture_3D_enable;