X-Git-Url: https://git.libre-soc.org/?p=mesa.git;a=blobdiff_plain;f=src%2Fglx%2Fglxextensions.h;h=bbdb00dd63173adebae6fa5a61e018820583e4eb;hp=f556b1239c9109d9298c0db7e01cc0da1f00113a;hb=HEAD;hpb=bcc13b74443137043e8a34f8cb64a5add0d8af93 diff --git a/src/glx/glxextensions.h b/src/glx/glxextensions.h index f556b1239c9..bbdb00dd631 100644 --- a/src/glx/glxextensions.h +++ b/src/glx/glxextensions.h @@ -31,44 +31,54 @@ #ifndef GLX_GLXEXTENSIONS_H #define GLX_GLXEXTENSIONS_H +#ifdef __cplusplus +extern "C" { +#endif + enum { - ARB_get_proc_address_bit = 0, + ARB_context_flush_control_bit = 0, + ARB_create_context_bit, + ARB_create_context_no_error_bit, + ARB_create_context_profile_bit, + ARB_create_context_robustness_bit, + ARB_fbconfig_float_bit, + ARB_get_proc_address_bit, ARB_multisample_bit, - ARB_render_texture_bit, - ATI_pixel_format_float_bit, + EXT_buffer_age_bit, + EXT_create_context_es2_profile_bit, + EXT_create_context_es_profile_bit, + EXT_fbconfig_packed_float_bit, + EXT_framebuffer_sRGB_bit, + EXT_import_context_bit, + EXT_texture_from_pixmap_bit, EXT_visual_info_bit, EXT_visual_rating_bit, - EXT_import_context_bit, - MESA_agp_offset_bit, - MESA_allocate_memory_bit, /* Replaces MESA_agp_offset & NV_vertex_array_range */ + ATI_pixel_format_float_bit, + INTEL_swap_event_bit, MESA_copy_sub_buffer_bit, MESA_depth_float_bit, - MESA_pixmap_colormap_bit, - MESA_release_buffers_bit, + MESA_multithread_makecurrent_bit, + MESA_query_renderer_bit, MESA_swap_control_bit, MESA_swap_frame_usage_bit, NV_float_buffer_bit, - NV_render_depth_texture_bit, - NV_render_texture_rectangle_bit, - NV_vertex_array_range_bit, OML_swap_method_bit, OML_sync_control_bit, - SGI_make_current_read_bit, - SGI_swap_control_bit, - SGI_video_sync_bit, - SGIS_blended_overlay_bit, - SGIS_color_range_bit, SGIS_multisample_bit, SGIX_fbconfig_bit, SGIX_pbuffer_bit, - SGIX_swap_barrier_bit, - SGIX_swap_group_bit, SGIX_visual_select_group_bit, - EXT_texture_from_pixmap_bit, - INTEL_swap_event_bit, + SGI_make_current_read_bit, + SGI_swap_control_bit, + SGI_video_sync_bit, }; +/* From the GLX perspective, the ARB and EXT extensions are identical. Use a + * single bit for both. + */ +#define ARB_framebuffer_sRGB_bit EXT_framebuffer_sRGB_bit + enum { GL_ARB_depth_texture_bit = 0, @@ -91,9 +101,11 @@ enum GL_ARB_texture_env_combine_bit, GL_ARB_texture_env_crossbar_bit, GL_ARB_texture_env_dot3_bit, + GL_ARB_texture_filter_anisotropic_bit, GL_ARB_texture_mirrored_repeat_bit, GL_ARB_texture_non_power_of_two_bit, GL_ARB_texture_rectangle_bit, + GL_ARB_texture_rg_bit, GL_ARB_transpose_matrix_bit, GL_ARB_vertex_buffer_object_bit, GL_ARB_vertex_program_bit, @@ -117,6 +129,7 @@ enum GL_EXT_framebuffer_blit_bit, GL_EXT_framebuffer_multisample_bit, GL_EXT_framebuffer_object_bit, + GL_EXT_framebuffer_sRGB_bit, GL_EXT_multi_draw_arrays_bit, GL_EXT_packed_depth_stencil_bit, GL_EXT_packed_pixels_bit, @@ -138,7 +151,7 @@ enum GL_EXT_texture_edge_clamp_bit, GL_EXT_texture_env_combine_bit, GL_EXT_texture_env_dot3_bit, - GL_EXT_texture_filter_anisotropic_bit, + GL_EXT_texture_integer_bit, GL_EXT_texture_lod_bit, GL_EXT_texture_lod_bias_bit, GL_EXT_texture_mirror_clamp_bit, @@ -210,11 +223,10 @@ enum /* Alias extension bits. These extensions exist in either vendor-specific * or EXT form and were later promoted to either EXT or ARB form. In all - * cases, the meaning is *exactly* the same. That's why + * cases, the meaning (to GLX) is *exactly* the same. That's why * EXT_texture_env_combine is *NOT* an alias of ARB_texture_env_combine and * EXT_texture_env_dot3 is *NOT* an alias of ARB_texture_env_dot3. Be - * careful! When in doubt, src/mesa/main/extensions.c in the Mesa tree - * is a great reference. + * careful! When in doubt, src/mesa/main/extensions.c is a great reference. */ GL_ATI_blend_equation_separate_bit = GL_EXT_blend_equation_separate_bit, @@ -222,6 +234,7 @@ enum GL_ATIX_texture_env_combine3_bit = GL_ATI_texture_env_combine3_bit, GL_EXT_point_parameters_bit = GL_ARB_point_parameters_bit, GL_EXT_texture_env_add_bit = GL_ARB_texture_env_add_bit, + GL_EXT_texture_filter_anisotropic_bit = GL_ARB_texture_filter_anisotropic_bit, GL_EXT_texture_rectangle_bit = GL_ARB_texture_rectangle_bit, GL_IBM_texture_mirrored_repeat_bit = GL_ARB_texture_mirrored_repeat_bit, GL_INGR_blend_func_separate_bit = GL_EXT_blend_func_separate_bit, @@ -235,30 +248,29 @@ enum #define __GL_EXT_BYTES ((__NUM_GL_EXTS + 7) / 8) -struct __GLXscreenConfigsRec; -struct __GLXcontextRec; +struct glx_screen; +struct glx_context; -extern GLboolean __glXExtensionBitIsEnabled(struct __GLXscreenConfigsRec *psc, +extern GLboolean __glXExtensionBitIsEnabled(struct glx_screen *psc, unsigned bit); extern const char *__glXGetClientExtensions(void); -extern void __glXCalculateUsableExtensions(struct __GLXscreenConfigsRec *psc, +extern void __glXCalculateUsableExtensions(struct glx_screen *psc, GLboolean display_is_direct_capable, int server_minor_version); -extern void __glXCalculateUsableGLExtensions(struct __GLXcontextRec *gc, +extern void __glXCalculateUsableGLExtensions(struct glx_context *gc, const char *server_string, int major_version, int minor_version); extern void __glXGetGLVersion(int *major_version, int *minor_version); extern char *__glXGetClientGLExtensionString(void); -extern GLboolean __glExtensionBitIsEnabled(const struct __GLXcontextRec *gc, +extern GLboolean __glExtensionBitIsEnabled(struct glx_context *gc, unsigned bit); extern void -__glXEnableDirectExtension(struct __GLXscreenConfigsRec *psc, - const char *name); +__glXEnableDirectExtension(struct glx_screen *psc, const char *name); /* Source-level backwards compatibility with old drivers. They won't * find the respective functions, though. @@ -269,16 +281,18 @@ typedef void (*PFNGLXDISABLEEXTENSIONPROC) (const char *name); /* GLX_ALIAS should be used for functions with a non-void return type. GLX_ALIAS_VOID is for functions with a void return type. */ -#ifdef GLX_NO_STATIC_EXTENSION_FUNCTIONS -# define GLX_ALIAS(return_type, real_func, proto_args, args, aliased_func) -# define GLX_ALIAS_VOID(real_func, proto_args, args, aliased_func) -#else -# if defined(__GNUC__) && !defined(GLX_ALIAS_UNSUPPORTED) -# define GLX_ALIAS(return_type, real_func, proto_args, args, aliased_func) \ +# ifdef HAVE_FUNC_ATTRIBUTE_ALIAS +/* GLX_ALIAS and GLX_ALIAS_VOID both expand to the macro GLX_ALIAS2. Using the + * extra expansion means that the name mangling macros in glx_mangle.h will + * apply before stringification, so the alias attribute will have a string like + * "mglXFoo" instead of "glXFoo". */ +# define GLX_ALIAS2(return_type, real_func, proto_args, args, aliased_func) \ return_type real_func proto_args \ __attribute__ ((alias( # aliased_func ) )); +# define GLX_ALIAS(return_type, real_func, proto_args, args, aliased_func) \ + GLX_ALIAS2(return_type, real_func, proto_args, args, aliased_func) # define GLX_ALIAS_VOID(real_func, proto_args, args, aliased_func) \ - GLX_ALIAS(void, real_func, proto_args, args, aliased_func) + GLX_ALIAS2(void, real_func, proto_args, args, aliased_func) # else # define GLX_ALIAS(return_type, real_func, proto_args, args, aliased_func) \ return_type real_func proto_args \ @@ -286,7 +300,10 @@ typedef void (*PFNGLXDISABLEEXTENSIONPROC) (const char *name); # define GLX_ALIAS_VOID(real_func, proto_args, args, aliased_func) \ void real_func proto_args \ { aliased_func args ; } -# endif /* __GNUC__ */ -#endif /* GLX_NO_STATIC_EXTENSION_FUNCTIONS */ +# endif /* HAVE_FUNC_ATTRIBUTE_ALIAS */ + +#ifdef __cplusplus +} +#endif #endif /* GLX_GLXEXTENSIONS_H */