2008-10-11 14:27:07 +02:00
|
|
|
/* -*- mode: c; tab-width: 3; indent-tabs-mode: nil; c-basic-offset: 3; coding: utf-8-unix -*- */
|
2004-10-25 21:09:16 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright IBM Corporation 2002, 2004
|
|
|
|
* All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
|
|
* copy of this software and associated documentation files (the "Software"),
|
|
|
|
* to deal in the Software without restriction, including without limitation
|
|
|
|
* on the rights to use, copy, modify, merge, publish, distribute, sub
|
|
|
|
* license, and/or sell copies of the Software, and to permit persons to whom
|
|
|
|
* the Software is furnished to do so, subject to the following conditions:
|
|
|
|
*
|
|
|
|
* The above copyright notice and this permission notice (including the next
|
|
|
|
* paragraph) shall be included in all copies or substantial portions of the
|
|
|
|
* Software.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
|
|
|
|
* THE COPYRIGHT HOLDERS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
|
|
|
|
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
|
|
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
|
|
* USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \file glxextensions.h
|
|
|
|
*
|
|
|
|
* \author Ian Romanick <idr@us.ibm.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef GLX_GLXEXTENSIONS_H
|
|
|
|
#define GLX_GLXEXTENSIONS_H
|
|
|
|
|
|
|
|
enum {
|
|
|
|
ARB_get_proc_address_bit = 0,
|
|
|
|
ARB_multisample_bit,
|
|
|
|
ARB_render_texture_bit,
|
|
|
|
ATI_pixel_format_float_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 */
|
|
|
|
MESA_copy_sub_buffer_bit,
|
|
|
|
MESA_depth_float_bit,
|
|
|
|
MESA_pixmap_colormap_bit,
|
|
|
|
MESA_release_buffers_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,
|
2006-02-07 00:39:56 +00:00
|
|
|
EXT_texture_from_pixmap_bit
|
2004-10-25 21:09:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum {
|
|
|
|
GL_ARB_depth_texture_bit = 0,
|
2005-03-11 20:55:03 +00:00
|
|
|
GL_ARB_draw_buffers_bit,
|
2004-10-25 21:09:16 +00:00
|
|
|
GL_ARB_fragment_program_bit,
|
Add GLX protocol support for ARB_fragement_program,
ARB_fragment_program_shadow, ARB_vertex_program, NV_fragment_program,
NV_fragment_program_option, NV_fragment_program2, NV_vertex_program,
NV_vertex_program1_1, NV_vertex_program2, NV_vertex_program2_option,
NV_vertex_program3, and ATI_text_fragment_shader.
2005-02-25 22:46:30 +00:00
|
|
|
GL_ARB_fragment_program_shadow_bit,
|
2004-10-25 21:09:16 +00:00
|
|
|
GL_ARB_imaging_bit,
|
|
|
|
GL_ARB_multisample_bit,
|
|
|
|
GL_ARB_multitexture_bit,
|
|
|
|
GL_ARB_occlusion_query_bit,
|
|
|
|
GL_ARB_point_parameters_bit,
|
|
|
|
GL_ARB_point_sprite_bit,
|
|
|
|
GL_ARB_shadow_bit,
|
|
|
|
GL_ARB_shadow_ambient_bit,
|
|
|
|
GL_ARB_texture_border_clamp_bit,
|
|
|
|
GL_ARB_texture_cube_map_bit,
|
|
|
|
GL_ARB_texture_compression_bit,
|
|
|
|
GL_ARB_texture_env_add_bit,
|
|
|
|
GL_ARB_texture_env_combine_bit,
|
|
|
|
GL_ARB_texture_env_crossbar_bit,
|
|
|
|
GL_ARB_texture_env_dot3_bit,
|
|
|
|
GL_ARB_texture_mirrored_repeat_bit,
|
|
|
|
GL_ARB_texture_non_power_of_two_bit,
|
2004-12-01 00:18:01 +00:00
|
|
|
GL_ARB_texture_rectangle_bit,
|
2004-10-25 21:09:16 +00:00
|
|
|
GL_ARB_transpose_matrix_bit,
|
|
|
|
GL_ARB_vertex_buffer_object_bit,
|
|
|
|
GL_ARB_vertex_program_bit,
|
|
|
|
GL_ARB_window_pos_bit,
|
|
|
|
GL_EXT_abgr_bit,
|
|
|
|
GL_EXT_bgra_bit,
|
|
|
|
GL_EXT_blend_color_bit,
|
|
|
|
GL_EXT_blend_equation_separate_bit,
|
|
|
|
GL_EXT_blend_func_separate_bit,
|
|
|
|
GL_EXT_blend_logic_op_bit,
|
|
|
|
GL_EXT_blend_minmax_bit,
|
|
|
|
GL_EXT_blend_subtract_bit,
|
|
|
|
GL_EXT_clip_volume_hint_bit,
|
|
|
|
GL_EXT_compiled_vertex_array_bit,
|
|
|
|
GL_EXT_convolution_bit,
|
|
|
|
GL_EXT_copy_texture_bit,
|
|
|
|
GL_EXT_cull_vertex_bit,
|
|
|
|
GL_EXT_depth_bounds_test_bit,
|
|
|
|
GL_EXT_draw_range_elements_bit,
|
|
|
|
GL_EXT_fog_coord_bit,
|
2006-02-24 15:36:24 +00:00
|
|
|
GL_EXT_framebuffer_object_bit,
|
2004-10-25 21:09:16 +00:00
|
|
|
GL_EXT_multi_draw_arrays_bit,
|
|
|
|
GL_EXT_packed_pixels_bit,
|
|
|
|
GL_EXT_paletted_texture_bit,
|
|
|
|
GL_EXT_pixel_buffer_object_bit,
|
|
|
|
GL_EXT_polygon_offset_bit,
|
|
|
|
GL_EXT_rescale_normal_bit,
|
|
|
|
GL_EXT_secondary_color_bit,
|
|
|
|
GL_EXT_separate_specular_color_bit,
|
|
|
|
GL_EXT_shadow_funcs_bit,
|
|
|
|
GL_EXT_shared_texture_palette_bit,
|
|
|
|
GL_EXT_stencil_two_side_bit,
|
|
|
|
GL_EXT_stencil_wrap_bit,
|
|
|
|
GL_EXT_subtexture_bit,
|
|
|
|
GL_EXT_texture_bit,
|
|
|
|
GL_EXT_texture3D_bit,
|
2005-02-04 19:29:30 +00:00
|
|
|
GL_EXT_texture_compression_dxt1_bit,
|
2004-10-25 21:09:16 +00:00
|
|
|
GL_EXT_texture_compression_s3tc_bit,
|
|
|
|
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_lod_bit,
|
|
|
|
GL_EXT_texture_lod_bias_bit,
|
|
|
|
GL_EXT_texture_mirror_clamp_bit,
|
|
|
|
GL_EXT_texture_object_bit,
|
|
|
|
GL_EXT_vertex_array_bit,
|
|
|
|
GL_3DFX_texture_compression_FXT1_bit,
|
|
|
|
GL_APPLE_packed_pixels_bit,
|
|
|
|
GL_APPLE_ycbcr_422_bit,
|
Add GLX protocol support for ARB_fragement_program,
ARB_fragment_program_shadow, ARB_vertex_program, NV_fragment_program,
NV_fragment_program_option, NV_fragment_program2, NV_vertex_program,
NV_vertex_program1_1, NV_vertex_program2, NV_vertex_program2_option,
NV_vertex_program3, and ATI_text_fragment_shader.
2005-02-25 22:46:30 +00:00
|
|
|
GL_ATI_text_fragment_shader_bit,
|
2004-10-25 21:09:16 +00:00
|
|
|
GL_ATI_texture_env_combine3_bit,
|
|
|
|
GL_ATI_texture_float_bit,
|
|
|
|
GL_ATI_texture_mirror_once_bit,
|
|
|
|
GL_HP_convolution_border_modes_bit,
|
|
|
|
GL_HP_occlusion_test_bit,
|
|
|
|
GL_IBM_cull_vertex_bit,
|
|
|
|
GL_IBM_pixel_filter_hint_bit,
|
|
|
|
GL_IBM_rasterpos_clip_bit,
|
|
|
|
GL_IBM_texture_clamp_nodraw_bit,
|
|
|
|
GL_INGR_interlace_read_bit,
|
|
|
|
GL_MESA_pack_invert_bit,
|
|
|
|
GL_MESA_ycbcr_texture_bit,
|
|
|
|
GL_NV_blend_square_bit,
|
|
|
|
GL_NV_copy_depth_to_color_bit,
|
|
|
|
GL_NV_depth_clamp_bit,
|
|
|
|
GL_NV_fog_distance_bit,
|
Add GLX protocol support for ARB_fragement_program,
ARB_fragment_program_shadow, ARB_vertex_program, NV_fragment_program,
NV_fragment_program_option, NV_fragment_program2, NV_vertex_program,
NV_vertex_program1_1, NV_vertex_program2, NV_vertex_program2_option,
NV_vertex_program3, and ATI_text_fragment_shader.
2005-02-25 22:46:30 +00:00
|
|
|
GL_NV_fragment_program_bit,
|
|
|
|
GL_NV_fragment_program_option_bit,
|
|
|
|
GL_NV_fragment_program2_bit,
|
2004-10-25 21:09:16 +00:00
|
|
|
GL_NV_light_max_exponent_bit,
|
|
|
|
GL_NV_multisample_filter_hint_bit,
|
|
|
|
GL_NV_point_sprite_bit,
|
|
|
|
GL_NV_texgen_reflection_bit,
|
|
|
|
GL_NV_texture_compression_vtc_bit,
|
|
|
|
GL_NV_texture_env_combine4_bit,
|
Add GLX protocol support for ARB_fragement_program,
ARB_fragment_program_shadow, ARB_vertex_program, NV_fragment_program,
NV_fragment_program_option, NV_fragment_program2, NV_vertex_program,
NV_vertex_program1_1, NV_vertex_program2, NV_vertex_program2_option,
NV_vertex_program3, and ATI_text_fragment_shader.
2005-02-25 22:46:30 +00:00
|
|
|
GL_NV_vertex_program_bit,
|
|
|
|
GL_NV_vertex_program1_1_bit,
|
|
|
|
GL_NV_vertex_program2_bit,
|
|
|
|
GL_NV_vertex_program2_option_bit,
|
|
|
|
GL_NV_vertex_program3_bit,
|
2005-02-04 19:29:30 +00:00
|
|
|
GL_OES_compressed_paletted_texture_bit,
|
2004-12-01 00:18:01 +00:00
|
|
|
GL_OES_read_format_bit,
|
2005-02-03 00:38:40 +00:00
|
|
|
GL_SGI_color_matrix_bit,
|
2006-08-24 21:42:38 +00:00
|
|
|
GL_SGI_color_table_bit,
|
2005-02-03 00:38:40 +00:00
|
|
|
GL_SGI_texture_color_table_bit,
|
2004-10-25 21:09:16 +00:00
|
|
|
GL_SGIS_generate_mipmap_bit,
|
|
|
|
GL_SGIS_multisample_bit,
|
|
|
|
GL_SGIS_texture_lod_bit,
|
|
|
|
GL_SGIX_blend_alpha_minmax_bit,
|
|
|
|
GL_SGIX_clipmap_bit,
|
|
|
|
GL_SGIX_depth_texture_bit,
|
|
|
|
GL_SGIX_fog_offset_bit,
|
|
|
|
GL_SGIX_shadow_bit,
|
|
|
|
GL_SGIX_texture_coordinate_clamp_bit,
|
|
|
|
GL_SGIX_texture_lod_bias_bit,
|
|
|
|
GL_SGIX_texture_range_bit,
|
|
|
|
GL_SGIX_texture_scale_bias_bit,
|
|
|
|
GL_SGIX_vertex_preclip_bit,
|
|
|
|
GL_SGIX_vertex_preclip_hint_bit,
|
|
|
|
GL_SGIX_ycrcb_bit,
|
|
|
|
GL_SUN_convolution_border_modes_bit,
|
|
|
|
GL_SUN_slice_accum_bit,
|
|
|
|
|
|
|
|
/* This *MUST* go here. If it gets put after the duplicate values it will
|
|
|
|
* get the value after the last duplicate.
|
|
|
|
*/
|
|
|
|
__NUM_GL_EXTS,
|
|
|
|
|
|
|
|
|
|
|
|
/* 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
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
GL_ATI_blend_equation_separate_bit = GL_EXT_blend_equation_separate_bit,
|
2005-03-11 20:55:03 +00:00
|
|
|
GL_ATI_draw_buffers_bit = GL_ARB_draw_buffers_bit,
|
2004-10-25 21:09:16 +00:00
|
|
|
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,
|
2004-12-01 00:18:01 +00:00
|
|
|
GL_EXT_texture_rectangle_bit = GL_ARB_texture_rectangle_bit,
|
2004-10-25 21:09:16 +00:00
|
|
|
GL_IBM_texture_mirrored_repeat_bit = GL_ARB_texture_mirrored_repeat_bit,
|
|
|
|
GL_INGR_blend_func_separate_bit = GL_EXT_blend_func_separate_bit,
|
|
|
|
GL_MESA_window_pos_bit = GL_ARB_window_pos_bit,
|
2004-12-01 00:18:01 +00:00
|
|
|
GL_NV_texture_rectangle_bit = GL_ARB_texture_rectangle_bit,
|
2004-10-25 21:09:16 +00:00
|
|
|
GL_SGIS_texture_border_clamp_bit = GL_ARB_texture_border_clamp_bit,
|
|
|
|
GL_SGIS_texture_edge_clamp_bit = GL_EXT_texture_edge_clamp_bit,
|
|
|
|
GL_SGIX_shadow_ambient_bit = GL_ARB_shadow_ambient_bit,
|
|
|
|
GL_SUN_multi_draw_arrays_bit = GL_EXT_multi_draw_arrays_bit
|
|
|
|
};
|
|
|
|
|
2005-02-22 22:36:31 +00:00
|
|
|
#define __GL_EXT_BYTES ((__NUM_GL_EXTS + 7) / 8)
|
|
|
|
|
|
|
|
struct __GLXscreenConfigsRec;
|
|
|
|
struct __GLXcontextRec;
|
|
|
|
|
|
|
|
extern GLboolean __glXExtensionBitIsEnabled( struct __GLXscreenConfigsRec *psc, unsigned bit );
|
2004-10-25 21:09:16 +00:00
|
|
|
extern const char * __glXGetClientExtensions( void );
|
2005-02-22 22:36:31 +00:00
|
|
|
extern void __glXCalculateUsableExtensions( struct __GLXscreenConfigsRec *psc,
|
2004-10-25 21:09:16 +00:00
|
|
|
GLboolean display_is_direct_capable, int server_minor_version );
|
2007-05-11 16:11:23 -04:00
|
|
|
|
2005-02-22 22:36:31 +00:00
|
|
|
extern void __glXCalculateUsableGLExtensions( struct __GLXcontextRec * gc,
|
2004-10-25 21:09:16 +00:00
|
|
|
const char * server_string, int major_version, int minor_version );
|
|
|
|
extern void __glXGetGLVersion( int * major_version, int * minor_version );
|
|
|
|
extern char * __glXGetClientGLExtensionString( void );
|
|
|
|
|
2005-02-22 22:36:31 +00:00
|
|
|
extern GLboolean __glExtensionBitIsEnabled( const struct __GLXcontextRec * gc,
|
|
|
|
unsigned bit );
|
|
|
|
|
DRI interface changes and DRI2 direct rendering support.
Add DRI2 direct rendering support to libGL and add DRI2 client side
protocol code. Extend the GLX 1.3 create drawable functions in
glx_pbuffer.c to call into the DRI driver when possible.
Introduce __DRIconfig, opaque struct that represents a DRI driver
configuration. Get's rid of the open coded __GLcontextModes in the
DRI driver interface and the context modes create and destroy
functions that the loader was requires to provide. glcore.h is no
longer part of the DRI driver interface. The DRI config is GL binding
agnostic, that is, not specific to GLX, EGL or other bindings.
The core API is now also an extension, and the driver exports a list
of extensions as the symbol __driDriverExtensions, which the loader
must dlsym() for. The list of extension will always include the DRI
core extension, which allows creating and manipulating DRI screens,
drawables and contexts. The DRI legacy extension, when available,
provides alternative entry points for creating the DRI objects that
work with the XF86DRI infrastructure.
Change DRI2 client code to not use drm drawables or contexts. We
never used drm_drawable_t's and the only use for drm_context_t was as
a unique identifier when taking the lock. We now just allocate a
unique lock ID out of the DRILock sarea block. Once we get rid of the
lock entirely, we can drop this hack.
Change the interface between dri_util.c and the drivers, so that the
drivers now export the DriverAPI struct as driDriverAPI instead of the
InitScreen entry point. This lets us avoid dlsym()'ing for the DRI2
init screen function to see if DRI2 is supported by the driver.
2008-03-26 19:26:59 -04:00
|
|
|
extern void
|
2008-08-08 02:37:14 -07:00
|
|
|
__glXEnableDirectExtension(struct __GLXscreenConfigsRec *psc, const char *name);
|
2005-02-22 22:36:31 +00:00
|
|
|
|
2004-10-25 21:09:16 +00:00
|
|
|
/* Source-level backwards compatibility with old drivers. They won't
|
|
|
|
* find the respective functions, though.
|
|
|
|
*/
|
|
|
|
typedef void (* PFNGLXENABLEEXTENSIONPROC) ( const char * name,
|
|
|
|
GLboolean force_client );
|
|
|
|
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) \
|
2005-07-26 22:53:38 +00:00
|
|
|
return_type real_func proto_args \
|
2004-10-25 21:09:16 +00:00
|
|
|
__attribute__ ((alias( # aliased_func ) ));
|
|
|
|
# define GLX_ALIAS_VOID(real_func, proto_args, args, aliased_func) \
|
|
|
|
GLX_ALIAS(void, real_func, proto_args, args, aliased_func)
|
|
|
|
# else
|
|
|
|
# define GLX_ALIAS(return_type, real_func, proto_args, args, aliased_func) \
|
2005-07-26 22:53:38 +00:00
|
|
|
return_type real_func proto_args \
|
2004-10-25 21:09:16 +00:00
|
|
|
{ return aliased_func args ; }
|
|
|
|
# define GLX_ALIAS_VOID(real_func, proto_args, args, aliased_func) \
|
2005-07-26 22:53:38 +00:00
|
|
|
void real_func proto_args \
|
2004-10-25 21:09:16 +00:00
|
|
|
{ aliased_func args ; }
|
|
|
|
# endif /* __GNUC__ */
|
|
|
|
#endif /* GLX_NO_STATIC_EXTENSION_FUNCTIONS */
|
|
|
|
|
|
|
|
#endif /* GLX_GLXEXTENSIONS_H */
|