X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fmain%2Fextensions.c;h=0675ce75da62c9e34bb9d87c88a1d44a0cef86ec;hb=f609cf782ab5e90ddf045dc4b0da8cebf99be0d1;hp=b02a49de46efa72db96add44f32d9dc130cb7c23;hpb=d4a38e86d4b4d66cca20ee63222f940cb73fa709;p=mesa.git diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index b02a49de46e..0675ce75da6 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -78,10 +78,12 @@ struct extension { static const struct extension extension_table[] = { /* ARB Extensions */ { "GL_ARB_ES2_compatibility", o(ARB_ES2_compatibility), GL, 2009 }, + { "GL_ARB_base_instance", o(ARB_base_instance), GL, 2011 }, { "GL_ARB_blend_func_extended", o(ARB_blend_func_extended), GL, 2009 }, { "GL_ARB_color_buffer_float", o(ARB_color_buffer_float), GL, 2004 }, { "GL_ARB_copy_buffer", o(ARB_copy_buffer), GL, 2008 }, { "GL_ARB_conservative_depth", o(ARB_conservative_depth), GL, 2011 }, + { "GL_ARB_debug_output", o(dummy_true), GL, 2009 }, { "GL_ARB_depth_buffer_float", o(ARB_depth_buffer_float), GL, 2008 }, { "GL_ARB_depth_clamp", o(ARB_depth_clamp), GL, 2003 }, { "GL_ARB_depth_texture", o(ARB_depth_texture), GL, 2001 }, @@ -111,6 +113,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 }, @@ -136,9 +139,12 @@ static const struct extension extension_table[] = { { "GL_ARB_texture_rg", o(ARB_texture_rg), GL, 2008 }, { "GL_ARB_texture_storage", o(ARB_texture_storage), GL, 2011 }, { "GL_ARB_texture_swizzle", o(EXT_texture_swizzle), GL, 2008 }, + { "GL_ARB_timer_query", o(ARB_timer_query), GL, 2010 }, { "GL_ARB_transform_feedback2", o(ARB_transform_feedback2), GL, 2010 }, + { "GL_ARB_transform_feedback3", o(ARB_transform_feedback3), GL, 2010 }, + { "GL_ARB_transform_feedback_instanced", o(ARB_transform_feedback_instanced), GL, 2011 }, { "GL_ARB_transpose_matrix", o(ARB_transpose_matrix), GL, 1999 }, - { "GL_ARB_uniform_buffer_object", o(ARB_uniform_buffer_object), GL, 2002 }, + { "GL_ARB_uniform_buffer_object", o(ARB_uniform_buffer_object), GL, 2009 }, { "GL_ARB_vertex_array_bgra", o(EXT_vertex_array_bgra), GL, 2008 }, { "GL_ARB_vertex_array_object", o(ARB_vertex_array_object), GL, 2006 }, { "GL_ARB_vertex_buffer_object", o(dummy_true), GL, 2003 }, @@ -197,6 +203,8 @@ static const struct extension extension_table[] = { { "GL_EXT_texture_env_dot3", o(EXT_texture_env_dot3), GL, 2000 }, { "GL_EXT_texture_filter_anisotropic", o(EXT_texture_filter_anisotropic), GL | ES1 | ES2, 1999 }, { "GL_EXT_texture_format_BGRA8888", o(dummy_true), ES1 | ES2, 2005 }, + { "GL_EXT_texture_rg", o(ARB_texture_rg), ES2, 2011 }, + { "GL_EXT_read_format_bgra", o(dummy_true), ES1 | ES2, 2009 }, { "GL_EXT_texture_integer", o(EXT_texture_integer), GL, 2006 }, { "GL_EXT_texture_lod_bias", o(dummy_true), GL | ES1, 1999 }, { "GL_EXT_texture_mirror_clamp", o(EXT_texture_mirror_clamp), GL, 2004 }, @@ -211,6 +219,7 @@ static const struct extension extension_table[] = { { "GL_EXT_texture_type_2_10_10_10_REV", o(dummy_true), ES2, 2008 }, { "GL_EXT_timer_query", o(EXT_timer_query), GL, 2006 }, { "GL_EXT_transform_feedback", o(EXT_transform_feedback), GL, 2011 }, + { "GL_EXT_unpack_subimage", o(dummy_true), ES2, 2011 }, { "GL_EXT_vertex_array_bgra", o(EXT_vertex_array_bgra), GL, 2008 }, { "GL_EXT_vertex_array", o(dummy_true), GL, 1995 }, @@ -225,7 +234,7 @@ static const struct extension extension_table[] = { { "GL_OES_depth32", o(dummy_false), DISABLE, 2005 }, { "GL_OES_depth_texture", o(ARB_depth_texture), ES2, 2006 }, #if FEATURE_OES_draw_texture - { "GL_OES_draw_texture", o(OES_draw_texture), ES1 | ES2, 2004 }, + { "GL_OES_draw_texture", o(OES_draw_texture), ES1, 2004 }, #endif #if FEATURE_OES_EGL_image /* FIXME: Mesa expects GL_OES_EGL_image to be available in OpenGL contexts. */ @@ -296,6 +305,7 @@ static const struct extension extension_table[] = { { "GL_NV_packed_depth_stencil", o(EXT_packed_depth_stencil), GL, 2000 }, { "GL_NV_point_sprite", o(NV_point_sprite), GL, 2001 }, { "GL_NV_primitive_restart", o(NV_primitive_restart), GL, 2002 }, + { "GL_NV_read_buffer", o(dummy_true), ES2, 2011 }, { "GL_NV_texgen_reflection", o(NV_texgen_reflection), GL, 1999 }, { "GL_NV_texture_barrier", o(NV_texture_barrier), GL, 2009 }, { "GL_NV_texture_env_combine4", o(NV_texture_env_combine4), GL, 1999 }, @@ -747,9 +757,11 @@ get_extension_override( struct gl_context *ctx ) } } + free(env); + /* Remove trailing space. */ len = strlen(extra_exts); - if (extra_exts[len - 1] == ' ') + if (len > 0 && extra_exts[len - 1] == ' ') extra_exts[len - 1] = '\0'; return extra_exts; @@ -931,14 +943,11 @@ _mesa_get_enabled_extension(struct gl_context *ctx, GLuint index) size_t n; const struct extension *i; - if (index < 0) - return NULL; - base = (GLboolean*) &ctx->Extensions; n = 0; for (i = extension_table; i->name != 0; ++i) { if (n == index && base[i->offset]) { - return (GLubyte*) i->name; + return (const GLubyte*) i->name; } else if (base[i->offset]) { ++n; }