glsl: Scaffolding for ARB_shader_bit_encoding.
authorOlivier Galibert <galibert@pobox.com>
Mon, 30 Apr 2012 11:19:01 +0000 (13:19 +0200)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 7 Jun 2012 07:06:00 +0000 (00:06 -0700)
That adds support for activating the extension.  It doesn't actually
*do* anything yet, of course.

Signed-off-by: Olivier Galibert <galibert@pobox.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
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
src/mesa/main/version.c

index eada4a65681a5458d8fbd92658b3ae390ee0a8c1..86660a9362c8d7463527d084a5e5e474ab0aa80e 100755 (executable)
@@ -186,6 +186,7 @@ read_builtins(GLenum target, const char *protos, const char **functions, unsigne
    st->ARB_texture_rectangle_enable = true;
    st->EXT_texture_array_enable = true;
    st->OES_EGL_image_external_enable = true;
+   st->ARB_shader_bit_encoding_enable = true;
    _mesa_glsl_initialize_types(st);
 
    sh->ir = new(sh) exec_list;
index 47ba54ddfbb4d8dd237a114bd7cbce1be7db1e30..9e8f9b2d653e6e0ffdaf07a3283ab156d7bfb4fe 100644 (file)
@@ -1141,6 +1141,9 @@ glcpp_parser_create (const struct gl_extensions *extensions, int api)
 
           if (extensions->OES_EGL_image_external)
              add_builtin_define(parser, "GL_OES_EGL_image_external", 1);
+
+          if (extensions->ARB_shader_bit_encoding)
+             add_builtin_define(parser, "GL_ARB_shader_bit_encoding", 1);
        }
 
        language_version = 110;
index 46f21dd076cc159eaff5098e80ba9bc3854b4ab3..02c3986169c77b55dc76e4889d1e31244309e6a1 100644 (file)
@@ -295,6 +295,7 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = {
    EXT(AMD_shader_stencil_export,      false, false, true,  true,  false,     ARB_shader_stencil_export),
    EXT(OES_texture_3D,                 true,  false, true,  false, true,      EXT_texture3D),
    EXT(OES_EGL_image_external,         true,  false, true,  false, true,      OES_EGL_image_external),
+   EXT(ARB_shader_bit_encoding,        true,  true,  true,  true,  false,     ARB_shader_bit_encoding),
 };
 
 #undef EXT
index 1a909c68b7f174bfc5c00f14f54c974f6f8413a9..246fc8141dbc8745d6046c05a8f6e1b3f8061f98 100644 (file)
@@ -205,6 +205,8 @@ struct _mesa_glsl_parse_state {
    bool OES_texture_3D_warn;
    bool OES_EGL_image_external_enable;
    bool OES_EGL_image_external_warn;
+   bool ARB_shader_bit_encoding_enable;
+   bool ARB_shader_bit_encoding_warn;
    /*@}*/
 
    /** Extensions supported by the OpenGL implementation. */
index f15f2d882debee728cfc1d99c9d96212017791ab..679714e384ae53c094a210e35f670fdebef5b792 100644 (file)
@@ -79,6 +79,7 @@ void initialize_context_to_defaults(struct gl_context *ctx, gl_api api)
    ctx->Extensions.NV_texture_rectangle = true;
    ctx->Extensions.EXT_texture3D = true;
    ctx->Extensions.OES_EGL_image_external = true;
+   ctx->Extensions.ARB_shader_bit_encoding = true;
 
    ctx->Const.GLSLVersion = 120;
 
index cd76eeb3d8a002be60c61f78abb05a899a57ec3c..2688f7acedcfeaaae71356166290898191c80606 100644 (file)
@@ -112,6 +112,7 @@ static const struct extension extension_table[] = {
    { "GL_ARB_robustness",                          o(dummy_true),                              GL,             2010 },
    { "GL_ARB_sampler_objects",                     o(ARB_sampler_objects),                     GL,             2009 },
    { "GL_ARB_seamless_cube_map",                   o(ARB_seamless_cube_map),                   GL,             2009 },
+   { "GL_ARB_shader_bit_encoding",                 o(ARB_shader_bit_encoding),                 GL,             2010 },
    { "GL_ARB_shader_objects",                      o(ARB_shader_objects),                      GL,             2002 },
    { "GL_ARB_shader_stencil_export",               o(ARB_shader_stencil_export),               GL,             2009 },
    { "GL_ARB_shader_texture_lod",                  o(ARB_shader_texture_lod),                  GL,             2009 },
index 3a8cac9c5a1aeb24d66e9d5cff44cfa69381178d..ea40ffc9c06c96c7ff1aa03c6d5fb5d2125f5d63 100644 (file)
@@ -2895,6 +2895,7 @@ struct gl_extensions
    GLboolean ARB_point_sprite;
    GLboolean ARB_sampler_objects;
    GLboolean ARB_seamless_cube_map;
+   GLboolean ARB_shader_bit_encoding;
    GLboolean ARB_shader_objects;
    GLboolean ARB_shader_stencil_export;
    GLboolean ARB_shader_texture_lod;
index 90afecb5d8be9c0c03e32d7caa0a10c8b7c025b3..efaaf58de880b62e23bfbdb8cf9165a118ddc2a1 100644 (file)
@@ -171,6 +171,7 @@ compute_version(struct gl_context *ctx)
                               ctx->Extensions.ARB_instanced_arrays &&
                               ctx->Extensions.ARB_occlusion_query2 &&
                               ctx->Extensions.ARB_sampler_objects &&
+                              ctx->Extensions.ARB_shader_bit_encoding &&
                               ctx->Extensions.ARB_texture_rgb10_a2ui &&
                               ctx->Extensions.ARB_timer_query &&
                               ctx->Extensions.ARB_vertex_type_2_10_10_10_rev &&