Index: src/glx/x11/glxclient.h =================================================================== RCS file: /cvs/mesa/Mesa/src/glx/x11/glxclient.h,v retrieving revision 1.13 diff -u -p -r1.13 glxclient.h --- src/glx/x11/glxclient.h 3 Aug 2005 23:05:25 -0000 1.13 +++ src/glx/x11/glxclient.h 11 Jul 2006 18:50:19 -0000 @@ -471,7 +471,7 @@ typedef struct __GLXscreenConfigsRec { * libGL. */ /*@{*/ - unsigned char direct_support[8]; + unsigned char direct_support[ __GLX_EXT_BYTES ]; GLboolean ext_list_first_time; /*@}*/ Index: src/glx/x11/glxextensions.c =================================================================== RCS file: /cvs/mesa/Mesa/src/glx/x11/glxextensions.c,v retrieving revision 1.14 diff -u -p -r1.14 glxextensions.c --- src/glx/x11/glxextensions.c 31 Mar 2006 15:48:04 -0000 1.14 +++ src/glx/x11/glxextensions.c 11 Jul 2006 18:50:20 -0000 @@ -28,6 +28,7 @@ * \author Ian Romanick */ +#include #include "glxclient.h" #include #include @@ -253,9 +254,9 @@ static const struct extension_info known /* global bit-fields of available extensions and their characteristics */ -static unsigned char client_glx_support[8]; -static unsigned char client_glx_only[8]; -static unsigned char direct_glx_only[8]; +static unsigned char client_glx_support[ __GLX_EXT_BYTES ]; +static unsigned char client_glx_only[ __GLX_EXT_BYTES ]; +static unsigned char direct_glx_only[ __GLX_EXT_BYTES ]; static unsigned char client_gl_support[ __GL_EXT_BYTES ]; static unsigned char client_gl_only[ __GL_EXT_BYTES ]; @@ -263,7 +264,7 @@ static unsigned char client_gl_only[ __G * Bits representing the set of extensions that are enabled by default in all * direct rendering drivers. */ -static unsigned char direct_glx_support[8]; +static unsigned char direct_glx_support[ __GLX_EXT_BYTES ]; /** * Highest core GL version that can be supported for indirect rendering. @@ -328,7 +329,7 @@ __glXProcessServerString( const struct e unsigned base; unsigned len; - (void) memset( server_support, 0, sizeof( server_support ) ); + (void) memset( server_support, 0, __GLX_EXT_BYTES ); for ( base = 0 ; server_string[ base ] != NUL ; /* empty */ ) { /* Determine the length of the next extension name. @@ -574,8 +575,8 @@ __glXCalculateUsableExtensions( __GLXscr GLboolean display_is_direct_capable, int minor_version ) { - unsigned char server_support[8]; - unsigned char usable[8]; + unsigned char server_support[ __GLX_EXT_BYTES ]; + unsigned char usable[ __GLX_EXT_BYTES ]; unsigned i; __glXExtensionsCtr(); Index: src/glx/x11/glxextensions.h =================================================================== RCS file: /cvs/mesa/Mesa/src/glx/x11/glxextensions.h,v retrieving revision 1.10 diff -u -p -r1.10 glxextensions.h --- src/glx/x11/glxextensions.h 24 Feb 2006 15:36:24 -0000 1.10 +++ src/glx/x11/glxextensions.h 11 Jul 2006 18:50:20 -0000 @@ -232,6 +232,12 @@ enum { #define __GL_EXT_BYTES ((__NUM_GL_EXTS + 7) / 8) +/* Define maximal amount of GLX extensions and number of bytes + * capable store flag about presence/absence of every one. + */ +#define __NUM_GLX_MAX_EXTS 64 +#define __GLX_EXT_BYTES ((__NUM_GLX_MAX_EXTS + 7) / 8) + struct __GLXscreenConfigsRec; struct __GLXcontextRec;