mesa: Add infrastructure for ARB_gpu_shader5.
authorMatt Turner <mattst88@gmail.com>
Tue, 9 Apr 2013 23:01:38 +0000 (16:01 -0700)
committerMatt Turner <mattst88@gmail.com>
Mon, 6 May 2013 17:17:12 +0000 (10:17 -0700)
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
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 75d3c21f43b39d3e4ac07756210fcb047421ca3a..85bd5dddc736f334a6c4b313d8a830af37c551fb 100755 (executable)
@@ -192,6 +192,7 @@ read_builtins(GLenum target, const char *protos, const char **functions, unsigne
    st->ARB_shading_language_packing_enable = true;
    st->ARB_texture_multisample_enable = true;
    st->ARB_texture_query_lod_enable = true;
+   st->ARB_gpu_shader5_enable = true;
    _mesa_glsl_initialize_types(st);
 
    sh->ir = new(sh) exec_list;
index 00edbbfbde23f88e28a26a30c34a5e42352662c3..f0d2ab007990ad0cf94c5386279f304d1a328c19 100644 (file)
@@ -1236,6 +1236,9 @@ glcpp_parser_create (const struct gl_extensions *extensions, int api)
 
              if (extensions->ARB_texture_query_lod)
                 add_builtin_define(parser, "GL_ARB_texture_query_lod", 1);
+
+             if (extensions->ARB_gpu_shader5)
+                add_builtin_define(parser, "GL_ARB_gpu_shader5", 1);
           }
        }
 
index 099229410c919e3ec11aa1904647069ee57dda95..e4636f8730993c2d26fb7b96c5a444cd1ea2df82 100644 (file)
@@ -468,6 +468,7 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = {
    EXT(ARB_shading_language_packing,   true,  false, true,  true,  false,     ARB_shading_language_packing),
    EXT(ARB_texture_multisample,        true,  false, true,  true,  false,     ARB_texture_multisample),
    EXT(ARB_texture_query_lod,          false, false, true,  true,  false,     ARB_texture_query_lod),
+   EXT(ARB_gpu_shader5,                true,  true,  true,  true,  false,     ARB_gpu_shader5),
 };
 
 #undef EXT
index 95891b595f8fed54cbfb2da87f55621349d902f0..c77dda84ef6885755653289726ad400a7e63e51a 100644 (file)
@@ -284,6 +284,8 @@ struct _mesa_glsl_parse_state {
    bool ARB_texture_multisample_warn;
    bool ARB_texture_query_lod_enable;
    bool ARB_texture_query_lod_warn;
+   bool ARB_gpu_shader5_enable;
+   bool ARB_gpu_shader5_warn;
    /*@}*/
 
    /** Extensions supported by the OpenGL implementation. */
index 0c1f52f48c149a74270d917215e818114a0e9f90..3c8f70f9e29f25d1a46290f6c4f5d1bc136749a6 100644 (file)
@@ -104,6 +104,7 @@ void initialize_context_to_defaults(struct gl_context *ctx, gl_api api)
    ctx->Extensions.ARB_texture_cube_map_array = true;
    ctx->Extensions.ARB_texture_multisample = true;
    ctx->Extensions.ARB_texture_query_lod = true;
+   ctx->Extensions.ARB_gpu_shader5 = true;
 
    ctx->Const.GLSLVersion = 120;
 
index d8c5f53ddd42e353e39abcf157331fdf41e33191..8b67fca23b763439e8d89e26201665f65970b84a 100644 (file)
@@ -102,6 +102,7 @@ static const struct extension extension_table[] = {
    { "GL_ARB_framebuffer_object",                  o(ARB_framebuffer_object),                  GL,             2005 },
    { "GL_ARB_framebuffer_sRGB",                    o(EXT_framebuffer_sRGB),                    GL,             1998 },
    { "GL_ARB_get_program_binary",                  o(ARB_shader_objects),                      GL,             2010 },
+   { "GL_ARB_gpu_shader5",                         o(ARB_gpu_shader5),                         GL,             2010 },
    { "GL_ARB_half_float_pixel",                    o(ARB_half_float_pixel),                    GL,             2003 },
    { "GL_ARB_half_float_vertex",                   o(ARB_half_float_vertex),                   GL,             2008 },
    { "GL_ARB_instanced_arrays",                    o(ARB_instanced_arrays),                    GL,             2008 },
index b37c6ab66e54bbdc02322ffa738163ea9348eb49..3fb8618c62f371f5810f2373266f432585ae6024 100644 (file)
@@ -2970,6 +2970,7 @@ struct gl_extensions
    GLboolean ARB_framebuffer_object;
    GLboolean ARB_explicit_attrib_location;
    GLboolean ARB_geometry_shader4;
+   GLboolean ARB_gpu_shader5;
    GLboolean ARB_half_float_pixel;
    GLboolean ARB_half_float_vertex;
    GLboolean ARB_instanced_arrays;