xref: /OK3568_Linux_fs/external/xserver/glx/extension_string.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /*
2*4882a593Smuzhiyun  * (C) Copyright IBM Corporation 2002-2006
3*4882a593Smuzhiyun  * All Rights Reserved.
4*4882a593Smuzhiyun  *
5*4882a593Smuzhiyun  * Permission is hereby granted, free of charge, to any person obtaining a
6*4882a593Smuzhiyun  * copy of this software and associated documentation files (the "Software"),
7*4882a593Smuzhiyun  * to deal in the Software without restriction, including without limitation
8*4882a593Smuzhiyun  * on the rights to use, copy, modify, merge, publish, distribute, sub
9*4882a593Smuzhiyun  * license, and/or sell copies of the Software, and to permit persons to whom
10*4882a593Smuzhiyun  * the Software is furnished to do so, subject to the following conditions:
11*4882a593Smuzhiyun  *
12*4882a593Smuzhiyun  * The above copyright notice and this permission notice (including the next
13*4882a593Smuzhiyun  * paragraph) shall be included in all copies or substantial portions of the
14*4882a593Smuzhiyun  * Software.
15*4882a593Smuzhiyun  *
16*4882a593Smuzhiyun  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17*4882a593Smuzhiyun  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18*4882a593Smuzhiyun  * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
19*4882a593Smuzhiyun  * THE COPYRIGHT HOLDERS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
20*4882a593Smuzhiyun  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
21*4882a593Smuzhiyun  * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
22*4882a593Smuzhiyun  * USE OR OTHER DEALINGS IN THE SOFTWARE.
23*4882a593Smuzhiyun  */
24*4882a593Smuzhiyun 
25*4882a593Smuzhiyun /**
26*4882a593Smuzhiyun  * \file extension_string.h
27*4882a593Smuzhiyun  * Routines to manage the GLX extension string and GLX version for AIGLX
28*4882a593Smuzhiyun  * drivers.  This code is loosely based on src/glx/x11/glxextensions.c from
29*4882a593Smuzhiyun  * Mesa.
30*4882a593Smuzhiyun  *
31*4882a593Smuzhiyun  * \author Ian Romanick <idr@us.ibm.com>
32*4882a593Smuzhiyun  */
33*4882a593Smuzhiyun 
34*4882a593Smuzhiyun #ifndef GLX_EXTENSION_STRING_H
35*4882a593Smuzhiyun #define GLX_EXTENSION_STRING_H
36*4882a593Smuzhiyun 
37*4882a593Smuzhiyun enum {
38*4882a593Smuzhiyun /*   GLX_ARB_get_proc_address is implemented on the client. */
39*4882a593Smuzhiyun     ARB_context_flush_control_bit = 0,
40*4882a593Smuzhiyun     ARB_create_context_bit,
41*4882a593Smuzhiyun     ARB_create_context_no_error_bit,
42*4882a593Smuzhiyun     ARB_create_context_profile_bit,
43*4882a593Smuzhiyun     ARB_create_context_robustness_bit,
44*4882a593Smuzhiyun     ARB_fbconfig_float_bit,
45*4882a593Smuzhiyun     ARB_framebuffer_sRGB_bit,
46*4882a593Smuzhiyun     ARB_multisample_bit,
47*4882a593Smuzhiyun     EXT_create_context_es_profile_bit,
48*4882a593Smuzhiyun     EXT_create_context_es2_profile_bit,
49*4882a593Smuzhiyun     EXT_fbconfig_packed_float_bit,
50*4882a593Smuzhiyun     EXT_import_context_bit,
51*4882a593Smuzhiyun     EXT_libglvnd_bit,
52*4882a593Smuzhiyun     EXT_no_config_context_bit,
53*4882a593Smuzhiyun     EXT_stereo_tree_bit,
54*4882a593Smuzhiyun     EXT_texture_from_pixmap_bit,
55*4882a593Smuzhiyun     EXT_visual_info_bit,
56*4882a593Smuzhiyun     EXT_visual_rating_bit,
57*4882a593Smuzhiyun     MESA_copy_sub_buffer_bit,
58*4882a593Smuzhiyun     OML_swap_method_bit,
59*4882a593Smuzhiyun     SGI_make_current_read_bit,
60*4882a593Smuzhiyun     SGI_swap_control_bit,
61*4882a593Smuzhiyun     SGI_video_sync_bit,
62*4882a593Smuzhiyun     SGIS_multisample_bit,
63*4882a593Smuzhiyun     SGIX_fbconfig_bit,
64*4882a593Smuzhiyun     SGIX_pbuffer_bit,
65*4882a593Smuzhiyun     SGIX_visual_select_group_bit,
66*4882a593Smuzhiyun     INTEL_swap_event_bit,
67*4882a593Smuzhiyun     __NUM_GLX_EXTS,
68*4882a593Smuzhiyun };
69*4882a593Smuzhiyun 
70*4882a593Smuzhiyun /* For extensions which have identical ARB and EXT implementation
71*4882a593Smuzhiyun  * in GLX area, use one enabling bit for both. */
72*4882a593Smuzhiyun #define EXT_framebuffer_sRGB_bit ARB_framebuffer_sRGB_bit
73*4882a593Smuzhiyun 
74*4882a593Smuzhiyun #define __GLX_EXT_BYTES ((__NUM_GLX_EXTS + 7) / 8)
75*4882a593Smuzhiyun 
76*4882a593Smuzhiyun extern int __glXGetExtensionString(const unsigned char *enable_bits,
77*4882a593Smuzhiyun                                    char *buffer);
78*4882a593Smuzhiyun extern void __glXEnableExtension(unsigned char *enable_bits, const char *ext);
79*4882a593Smuzhiyun extern void __glXInitExtensionEnableBits(unsigned char *enable_bits);
80*4882a593Smuzhiyun 
81*4882a593Smuzhiyun #endif                          /* GLX_EXTENSION_STRING_H */
82