glsl: Add infrastructure for ARB_shading_language_packing
authorMatt Turner <mattst88@gmail.com>
Tue, 22 Jan 2013 01:09:53 +0000 (17:09 -0800)
committerMatt Turner <mattst88@gmail.com>
Fri, 25 Jan 2013 22:10:23 +0000 (14:10 -0800)
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
src/glsl/builtins/tools/generate_builtins.py
src/glsl/glcpp/glcpp-parse.y
src/glsl/glsl_parser_extras.cpp
src/glsl/glsl_parser_extras.h
src/glsl/standalone_scaffolding.cpp
src/mesa/main/extensions.c
src/mesa/main/mtypes.h

index 2cfb1a36e20e808dcf1a41a7ed586eb85191df68..3db862e5f587925fbcd69bfc67c7ce035d2f57b2 100755 (executable)
@@ -189,6 +189,7 @@ read_builtins(GLenum target, const char *protos, const char **functions, unsigne
    st->OES_EGL_image_external_enable = true;
    st->ARB_shader_bit_encoding_enable = true;
    st->ARB_texture_cube_map_array_enable = true;
+   st->ARB_shading_language_packing_enable = true;
    _mesa_glsl_initialize_types(st);
 
    sh->ir = new(sh) exec_list;
index 8fba923a2cb77c5f92bcf37e01882ee84b0033da..e927c7cb7cd75bea4a4c0b8fd336adb613d674bd 100644 (file)
@@ -1227,6 +1227,9 @@ glcpp_parser_create (const struct gl_extensions *extensions, int api)
 
              if (extensions->ARB_texture_cube_map_array)
                 add_builtin_define(parser, "GL_ARB_texture_cube_map_array", 1);
+
+             if (extensions->ARB_shading_language_packing)
+                add_builtin_define(parser, "GL_ARB_shading_language_packing", 1);
           }
        }
 
index b460c86192d7b88d0389cc5578bcb138ff7a0577..c8dbc89ffc23b4288cd4abab819944b92a50b1c0 100644 (file)
@@ -462,6 +462,7 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = {
    EXT(ARB_uniform_buffer_object,      true,  false, true,  true,  false,     ARB_uniform_buffer_object),
    EXT(OES_standard_derivatives,       false, false, true,  false,  true,     OES_standard_derivatives),
    EXT(ARB_texture_cube_map_array,     true,  false, true,  true,  false,     ARB_texture_cube_map_array),
+   EXT(ARB_shading_language_packing,   true,  false, true,  true,  false,     ARB_shading_language_packing),
 };
 
 #undef EXT
index 2e6bb0b0a3ddcbcb302b75e5832fa4645734f056..53df149d87168ac81588d27edde51975f846a9d1 100644 (file)
@@ -272,6 +272,8 @@ struct _mesa_glsl_parse_state {
    bool OES_standard_derivatives_warn;
    bool ARB_texture_cube_map_array_enable;
    bool ARB_texture_cube_map_array_warn;
+   bool ARB_shading_language_packing_enable;
+   bool ARB_shading_language_packing_warn;
    /*@}*/
 
    /** Extensions supported by the OpenGL implementation. */
index ccf5b4f8d60cd3fe04fc43e2332988a320ddbdc0..0fb4f5b1656df14f28186842d08e867a0b1283b7 100644 (file)
@@ -99,6 +99,7 @@ void initialize_context_to_defaults(struct gl_context *ctx, gl_api api)
    ctx->Extensions.EXT_texture3D = true;
    ctx->Extensions.OES_EGL_image_external = true;
    ctx->Extensions.ARB_shader_bit_encoding = true;
+   ctx->Extensions.ARB_shading_language_packing = true;
    ctx->Extensions.OES_standard_derivatives = true;
    ctx->Extensions.ARB_texture_cube_map_array = true;
 
index 5d01ac8ea63ce0da21937cf12afbdada9ae476e3..7ae07fb5a0911a8a2bee9a5a126a26a1e0a5b11d 100644 (file)
@@ -125,6 +125,7 @@ static const struct extension extension_table[] = {
    { "GL_ARB_shader_stencil_export",               o(ARB_shader_stencil_export),               GL,             2009 },
    { "GL_ARB_shader_texture_lod",                  o(ARB_shader_texture_lod),                  GL,             2009 },
    { "GL_ARB_shading_language_100",                o(ARB_shading_language_100),                GLL,            2003 },
+   { "GL_ARB_shading_language_packing",            o(ARB_shading_language_packing),            GL,             2011 },
    { "GL_ARB_shadow",                              o(ARB_shadow),                              GLL,            2001 },
    { "GL_ARB_sync",                                o(ARB_sync),                                GL,             2003 },
    { "GL_ARB_texture_border_clamp",                o(ARB_texture_border_clamp),                GLL,            2000 },
index 9078475c62320966be59f3913e5e1633b4068158..3369623f707f1f03ff07b0ff8aa1f5becf385f61 100644 (file)
@@ -3069,6 +3069,7 @@ struct gl_extensions
    GLboolean ARB_shader_stencil_export;
    GLboolean ARB_shader_texture_lod;
    GLboolean ARB_shading_language_100;
+   GLboolean ARB_shading_language_packing;
    GLboolean ARB_shadow;
    GLboolean ARB_sync;
    GLboolean ARB_texture_border_clamp;