X-Git-Url: https://git.libre-soc.org/?p=mesa.git;a=blobdiff_plain;f=src%2Fglx%2Fglxextensions.c;h=ada179391777cd02e60eeddca440c310c79f6ee3;hp=d6eb408309c3083156134c870ae602309455e26e;hb=0d635ccc912d7122f35f81eec27d8b2c0a2a7a28;hpb=2bf95c519e755146704f4942b1703d47d18bfeaa diff --git a/src/glx/glxextensions.c b/src/glx/glxextensions.c index d6eb408309c..ada17939177 100644 --- a/src/glx/glxextensions.c +++ b/src/glx/glxextensions.c @@ -61,85 +61,112 @@ struct extension_info */ unsigned char version_major; unsigned char version_minor; + + /** + * The client (i.e., libGL) supports this extension. + * + * Except during bring up, all extensions should have this set to Y. There + * are a few cases of extensions that have partial (or speculative) + * support, but these are rare. There also shouldn't be any new ones + * added. + * + * Generally, extensions require server support and ::client_support to be + * enabled. If the display is capable of direct rendering, + * ::direct_support is also required. + * + * \sa ::client_only + */ unsigned char client_support; + + /** + * The direct-renderer (e.g., i965_dri.so) supports this extension. + * + * For cases where all of the infrastructure to support the extension is a + * required part of the loader/driver interface, this can default to Y. + * For most cases, extended functionality, usually in the form of DRI2 + * extensions, is necessary to support the extension. The loader will set + * the flag true if all the requirements are met. + * + * If the display is capable of direct rendering, ::direct_support is + * required for the extension to be enabled. + */ unsigned char direct_support; - unsigned char client_only; /** Is the extension client-side only? */ - unsigned char direct_only; /** Is the extension for direct - * contexts only? - */ + + /** + * The extension depends only on client support. + * + * This is for extensions like GLX_ARB_get_proc_address that are contained + * entirely in the client library. There is no dependency on the server or + * the direct-renderer. + * + * These extensions will be enabled if ::client_support is set. + * + * \note + * An extension \b cannot be both client-only and direct-only because being + * direct-only implies a dependency on the direct renderer. + * + * \sa ::client_support, ::direct_only + */ + unsigned char client_only; + + /** + * The extension only functions with direct-rendering contexts + * + * The extension has no GLX protocol, and, therefore, no explicit + * dependency on the server. The functionality is contained entirely in + * the client library and the direct renderer. A few of the swap-related + * extensions are intended to behave this way. + * + * These extensions will be enabled if both ::client_support and + * ::direct_support are set. + * + * \note + * An extension \b cannot be both client-only and direct-only because being + * client-only implies that all functionality is outside the + * direct-renderer. + * + * \sa ::direct_support, ::client_only + */ + unsigned char direct_only; }; /* *INDENT-OFF* */ static const struct extension_info known_glx_extensions[] = { + { GLX(ARB_context_flush_control), VER(0,0), Y, N, N, N }, + { GLX(ARB_create_context), VER(0,0), Y, N, N, N }, + { GLX(ARB_create_context_no_error), VER(1,4), Y, N, N, N }, + { GLX(ARB_create_context_profile), VER(0,0), Y, N, N, N }, + { GLX(ARB_create_context_robustness), VER(0,0), Y, N, N, N }, + { GLX(ARB_fbconfig_float), VER(0,0), Y, Y, N, N }, + { GLX(ARB_framebuffer_sRGB), VER(0,0), Y, Y, N, N }, { GLX(ARB_get_proc_address), VER(1,4), Y, N, Y, N }, { GLX(ARB_multisample), VER(1,4), Y, Y, N, N }, - { GLX(ARB_render_texture), VER(0,0), N, N, N, N }, - { GLX(ATI_pixel_format_float), VER(0,0), N, N, N, N }, -#ifdef GLX_USE_APPLEGL - { GLX(EXT_import_context), VER(0,0), N, N, N, N }, - { GLX(EXT_visual_info), VER(0,0), N, N, N, N }, -#else + { GLX(EXT_buffer_age), VER(0,0), Y, N, N, Y }, + { GLX(EXT_create_context_es2_profile), VER(0,0), Y, N, N, N }, + { GLX(EXT_create_context_es_profile), VER(0,0), Y, N, N, N }, + { GLX(EXT_fbconfig_packed_float), VER(0,0), Y, Y, N, N }, + { GLX(EXT_framebuffer_sRGB), VER(0,0), Y, Y, N, N }, { GLX(EXT_import_context), VER(0,0), Y, Y, N, N }, + { GLX(EXT_no_config_context), VER(0,0), Y, N, N, N }, + { GLX(EXT_texture_from_pixmap), VER(0,0), Y, N, N, N }, { GLX(EXT_visual_info), VER(0,0), Y, Y, N, N }, -#endif { GLX(EXT_visual_rating), VER(0,0), Y, Y, N, N }, - { GLX(EXT_framebuffer_sRGB), VER(0,0), Y, Y, N, N }, -#ifdef GLX_USE_APPLEGL - { GLX(MESA_agp_offset), VER(0,0), N, N, N, N }, /* Deprecated */ - { GLX(MESA_copy_sub_buffer), VER(0,0), N, N, N, N }, -#else - { GLX(MESA_agp_offset), VER(0,0), N, N, N, Y }, /* Deprecated */ + { GLX(ATI_pixel_format_float), VER(0,0), N, N, N, N }, + { GLX(INTEL_swap_event), VER(0,0), Y, N, N, N }, { GLX(MESA_copy_sub_buffer), VER(0,0), Y, N, N, N }, -#endif - { GLX(MESA_multithread_makecurrent),VER(0,0), Y, N, Y, N }, - { GLX(MESA_pixmap_colormap), VER(0,0), N, N, N, N }, /* Deprecated */ - { GLX(MESA_release_buffers), VER(0,0), N, N, N, N }, /* Deprecated */ -#ifdef GLX_USE_APPLEGL - { GLX(MESA_swap_control), VER(0,0), N, N, N, N }, -#else + { GLX(MESA_multithread_makecurrent),VER(0,0), Y, N, N, Y }, + { GLX(MESA_query_renderer), VER(0,0), Y, N, N, Y }, { GLX(MESA_swap_control), VER(0,0), Y, N, N, Y }, -#endif { GLX(NV_float_buffer), VER(0,0), N, N, N, N }, - { GLX(NV_render_depth_texture), VER(0,0), N, N, N, N }, - { GLX(NV_render_texture_rectangle), VER(0,0), N, N, N, N }, -#ifdef GLX_USE_APPLEGL - { GLX(NV_vertex_array_range), VER(0,0), N, N, N, N }, /* Deprecated */ - { GLX(OML_swap_method), VER(0,0), N, N, N, N }, - { GLX(OML_sync_control), VER(0,0), N, N, N, N }, - { GLX(SGI_make_current_read), VER(1,3), N, N, N, N }, - { GLX(SGI_swap_control), VER(0,0), N, N, N, N }, - { GLX(SGI_video_sync), VER(0,0), N, N, N, N }, -#else - { GLX(NV_vertex_array_range), VER(0,0), N, N, N, Y }, /* Deprecated */ { GLX(OML_swap_method), VER(0,0), Y, Y, N, N }, { GLX(OML_sync_control), VER(0,0), Y, N, N, Y }, - { GLX(SGI_make_current_read), VER(1,3), Y, N, N, N }, - { GLX(SGI_swap_control), VER(0,0), Y, N, N, N }, - { GLX(SGI_video_sync), VER(0,0), Y, N, N, Y }, -#endif - { GLX(SGIS_blended_overlay), VER(0,0), N, N, N, N }, - { GLX(SGIS_color_range), VER(0,0), N, N, N, N }, -#ifdef GLX_USE_APPLEGL - { GLX(SGIS_multisample), VER(0,0), N, N, N, N }, -#else { GLX(SGIS_multisample), VER(0,0), Y, Y, N, N }, -#endif { GLX(SGIX_fbconfig), VER(1,3), Y, Y, N, N }, -#ifdef GLX_USE_APPLEGL - { GLX(SGIX_pbuffer), VER(1,3), N, N, N, N }, -#else { GLX(SGIX_pbuffer), VER(1,3), Y, Y, N, N }, -#endif - { GLX(SGIX_swap_barrier), VER(0,0), N, N, N, N }, - { GLX(SGIX_swap_group), VER(0,0), N, N, N, N }, -#ifdef GLX_USE_APPLEGL - { GLX(SGIX_visual_select_group), VER(0,0), N, N, N, N }, - { GLX(EXT_texture_from_pixmap), VER(0,0), N, N, N, N }, -#else { GLX(SGIX_visual_select_group), VER(0,0), Y, Y, N, N }, - { GLX(EXT_texture_from_pixmap), VER(0,0), Y, N, N, N }, -#endif - { GLX(INTEL_swap_event), VER(1,4), Y, Y, N, N }, + { GLX(SGI_make_current_read), VER(1,3), Y, N, N, N }, + { GLX(SGI_swap_control), VER(0,0), Y, N, N, N }, + { GLX(SGI_video_sync), VER(0,0), Y, N, N, Y }, { NULL } }; @@ -164,6 +191,7 @@ static const struct extension_info known_gl_extensions[] = { { GL(ARB_texture_env_combine), VER(1,3), Y, N, N, N }, { GL(ARB_texture_env_crossbar), VER(1,4), Y, N, N, N }, { GL(ARB_texture_env_dot3), VER(1,3), Y, N, N, N }, + { GL(ARB_texture_filter_anisotropic), VER(0,0), Y, N, N, N }, { GL(ARB_texture_mirrored_repeat), VER(1,4), Y, N, N, N }, { GL(ARB_texture_non_power_of_two), VER(1,5), Y, N, N, N }, { GL(ARB_texture_rectangle), VER(0,0), Y, N, N, N }, @@ -216,6 +244,7 @@ static const struct extension_info known_gl_extensions[] = { { GL(EXT_texture_env_combine), VER(1,3), Y, N, N, N }, { GL(EXT_texture_env_dot3), VER(0,0), Y, N, N, N }, { GL(EXT_texture_filter_anisotropic), VER(0,0), Y, N, N, N }, + { GL(EXT_texture_integer), VER(0,0), Y, N, N, N }, { GL(EXT_texture_lod), VER(1,2), Y, N, N, N }, { GL(EXT_texture_lod_bias), VER(1,4), Y, N, N, N }, { GL(EXT_texture_mirror_clamp), VER(0,0), Y, N, N, N }, @@ -550,7 +579,7 @@ __glXGetStringFromTable(const struct extension_info *ext, } } - ext_str = Xmalloc(ext_str_len + 1); + ext_str = malloc(ext_str_len + 1); if (ext_str != NULL) { point = ext_str; @@ -619,7 +648,7 @@ __glXCalculateUsableExtensions(struct glx_screen * psc, * support for GLX 1.3, enable support for the extensions that can be * "emulated" as well. */ - +#ifndef GLX_USE_APPLEGL if (minor_version >= 3) { SET_BIT(server_support, EXT_visual_info_bit); SET_BIT(server_support, EXT_visual_rating_bit); @@ -635,7 +664,7 @@ __glXCalculateUsableExtensions(struct glx_screen * psc, SET_BIT(server_support, EXT_import_context_bit); } - +#endif /* An extension is supported if the client-side (i.e., libGL) supports * it and the "server" supports it. In this case that means that either