diff options
Diffstat (limited to 'src/mesa/drivers/dri/common')
-rw-r--r-- | src/mesa/drivers/dri/common/dri_util.h | 15 | ||||
-rw-r--r-- | src/mesa/drivers/dri/common/glcontextmodes.c | 30 | ||||
-rw-r--r-- | src/mesa/drivers/dri/common/glcontextmodes.h | 4 |
3 files changed, 31 insertions, 18 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.h b/src/mesa/drivers/dri/common/dri_util.h index 5ecc39a69b0..276650274d8 100644 --- a/src/mesa/drivers/dri/common/dri_util.h +++ b/src/mesa/drivers/dri/common/dri_util.h @@ -54,10 +54,17 @@ #define CAPI /* XXX this should be globally defined somewhere */ #include <inttypes.h> -#include "glxclient.h" /* for GLXDrawable */ -#include "drm.h" /* for drm_clip_rect_t */ -#include "drm_sarea.h" /* for XF86DRISAREAPtr */ -#include "GL/internal/glcore.h" /* for __GLcontextModes */ +#ifdef DRI_NEW_INTERFACE_ONLY +# include <GL/gl.h> +#else +# include "glxclient.h" +#endif /* DRI_NEW_INTERFACE_ONLY */ +#include "drm.h" +#include "drm_sarea.h" +#include "GL/internal/glcore.h" +#include "GL/internal/dri_interface.h" + +#define GLX_BAD_CONTEXT 5 /* This is a temporary relic. Once all drivers are converted to support * the new interface, it can go away. diff --git a/src/mesa/drivers/dri/common/glcontextmodes.c b/src/mesa/drivers/dri/common/glcontextmodes.c index 448c33d1874..420c597e59c 100644 --- a/src/mesa/drivers/dri/common/glcontextmodes.c +++ b/src/mesa/drivers/dri/common/glcontextmodes.c @@ -31,20 +31,26 @@ * \author Ian Romanick <[email protected]> */ -#include <X11/X.h> -#include <GL/glx.h> -#include "GL/glxint.h" +#ifdef DRI_NEW_INTERFACE_ONLY +# include <stdlib.h> +# include <GL/gl.h> +# include "dri_interface.h" +#else +# include <X11/X.h> +# include <GL/glx.h> +# include "GL/glxint.h" -#ifdef XFree86Server -# include "GL/glx_ansic.h" +# ifdef XFree86Server +# include "GL/glx_ansic.h" extern void * __glXMalloc( size_t size ); extern void __glXFree( void * ptr ); -# define Xmalloc __glXMalloc -# define Xfree __glXFree -#else -# include <X11/Xlibint.h> -# define __glXMemset memset -#endif /* XFree86Server */ +# define Xmalloc __glXMalloc +# define Xfree __glXFree +# else +# include <X11/Xlibint.h> +# define __glXMemset memset +# endif /* XFree86Server */ +#endif /* DRI_NEW_INTERFACE_ONLY */ #include "glcontextmodes.h" @@ -169,7 +175,6 @@ _gl_copy_visual_to_context_mode( __GLcontextModes * mode, mode->swapMethod = GLX_SWAP_UNDEFINED_OML; } -#endif /* DRI_NEW_INTERFACE_ONLY */ /** @@ -310,6 +315,7 @@ _gl_get_context_mode_data(const __GLcontextModes *mode, int attribute, return GLX_BAD_ATTRIBUTE; } } +#endif /* DRI_NEW_INTERFACE_ONLY */ /** diff --git a/src/mesa/drivers/dri/common/glcontextmodes.h b/src/mesa/drivers/dri/common/glcontextmodes.h index 8959e1d4ea9..46b4c68dcaf 100644 --- a/src/mesa/drivers/dri/common/glcontextmodes.h +++ b/src/mesa/drivers/dri/common/glcontextmodes.h @@ -37,10 +37,10 @@ extern GLint _gl_convert_from_x_visual_type( int visualType ); extern GLint _gl_convert_to_x_visual_type( int visualType ); extern void _gl_copy_visual_to_context_mode( __GLcontextModes * mode, const __GLXvisualConfig * config ); -#endif /* DRI_NEW_INTERFACE_ONLY */ - extern int _gl_get_context_mode_data( const __GLcontextModes *mode, int attribute, int *value_return ); +#endif /* DRI_NEW_INTERFACE_ONLY */ + extern __GLcontextModes * _gl_context_modes_create( unsigned count, size_t minimum_size ); extern void _gl_context_modes_destroy( __GLcontextModes * modes ); |