From a4b099ae2dbb3a093e29f9a58a2067db9d9280f3 Mon Sep 17 00:00:00 2001 From: marha Date: Sun, 25 Dec 2011 20:23:51 +0100 Subject: Solved compilation error --- gl/internal/dri_interface.h | 74 +++++++++++++++++++++++++++-- mesalib/include/GL/internal/dri_interface.h | 2 + 2 files changed, 73 insertions(+), 3 deletions(-) diff --git a/gl/internal/dri_interface.h b/gl/internal/dri_interface.h index 7de74edb4..035f8e92c 100644 --- a/gl/internal/dri_interface.h +++ b/gl/internal/dri_interface.h @@ -55,6 +55,8 @@ typedef unsigned int drm_drawable_t; typedef struct drm_clip_rect drm_clip_rect_t; #endif +#include + /** * \name DRI interface structures * @@ -681,7 +683,7 @@ struct __DRIlegacyExtensionRec { * conjunction with the core extension. */ #define __DRI_SWRAST "DRI_SWRast" -#define __DRI_SWRAST_VERSION 2 +#define __DRI_SWRAST_VERSION 3 struct __DRIswrastExtensionRec { __DRIextension base; @@ -701,6 +703,22 @@ struct __DRIswrastExtensionRec { const __DRIconfig *config, __DRIcontext *shared, void *data); + + /** + * Create a context for a particular API with a set of attributes + * + * \since version 3 + * + * \sa __DRIdri2ExtensionRec::createContextAttribs + */ + __DRIcontext *(*createContextAttribs)(__DRIscreen *screen, + int api, + const __DRIconfig *config, + __DRIcontext *shared, + unsigned num_attribs, + const uint32_t *attribs, + unsigned *error, + void *loaderPrivate); }; /** @@ -783,11 +801,45 @@ struct __DRIdri2LoaderExtensionRec { * constructors for DRI2. */ #define __DRI_DRI2 "DRI_DRI2" -#define __DRI_DRI2_VERSION 2 +#define __DRI_DRI2_VERSION 3 -#define __DRI_API_OPENGL 0 +#define __DRI_API_OPENGL 0 /**< OpenGL compatibility profile */ #define __DRI_API_GLES 1 #define __DRI_API_GLES2 2 +#define __DRI_API_OPENGL_CORE 3 /**< OpenGL 3.2+ core profile */ + +#define __DRI_CTX_ATTRIB_MAJOR_VERSION 0 +#define __DRI_CTX_ATTRIB_MINOR_VERSION 1 +#define __DRI_CTX_ATTRIB_FLAGS 2 + +#define __DRI_CTX_FLAG_DEBUG 0x00000001 +#define __DRI_CTX_FLAG_FORWARD_COMPATIBLE 0x00000002 + +/** + * \name Reasons that __DRIdri2Extension::createContextAttribs might fail + */ +/*@{*/ +/** Success! */ +#define __DRI_CTX_ERROR_SUCCESS 0 + +/** Memory allocation failure */ +#define __DRI_CTX_ERROR_NO_MEMORY 1 + +/** Client requested an API (e.g., OpenGL ES 2.0) that the driver can't do. */ +#define __DRI_CTX_ERROR_BAD_API 2 + +/** Client requested an API version that the driver can't do. */ +#define __DRI_CTX_ERROR_BAD_VERSION 3 + +/** Client requested a flag or combination of flags the driver can't do. */ +#define __DRI_CTX_ERROR_BAD_FLAG 4 + +/** Client requested an attribute the driver doesn't understand. */ +#define __DRI_CTX_ERROR_UNKNOWN_ATTRIBUTE 5 + +/** Client requested a flag the driver doesn't understand. */ +#define __DRI_CTX_ERROR_UNKNOWN_FLAG 6 +/*@}*/ struct __DRIdri2ExtensionRec { __DRIextension base; @@ -822,6 +874,22 @@ struct __DRIdri2ExtensionRec { int height); void (*releaseBuffer)(__DRIscreen *screen, __DRIbuffer *buffer); + + /** + * Create a context for a particular API with a set of attributes + * + * \since version 3 + * + * \sa __DRIswrastExtensionRec::createContextAttribs + */ + __DRIcontext *(*createContextAttribs)(__DRIscreen *screen, + int api, + const __DRIconfig *config, + __DRIcontext *shared, + unsigned num_attribs, + const uint32_t *attribs, + unsigned *error, + void *loaderPrivate); }; diff --git a/mesalib/include/GL/internal/dri_interface.h b/mesalib/include/GL/internal/dri_interface.h index 6aa6db74a..d14f4d3bf 100644 --- a/mesalib/include/GL/internal/dri_interface.h +++ b/mesalib/include/GL/internal/dri_interface.h @@ -55,6 +55,8 @@ typedef unsigned int drm_drawable_t; typedef struct drm_clip_rect drm_clip_rect_t; #endif +#include + /** * \name DRI interface structures * -- cgit v1.2.3