From 0fd2d56b0fc0ce74c5f3e5e23cb26b0d1a075ba1 Mon Sep 17 00:00:00 2001 From: marha Date: Sun, 25 Dec 2011 17:27:22 +0100 Subject: mesa xkeyboard-config xserver git update 25 dec 2011 --- mesalib/include/GL/internal/dri_interface.h | 72 +++++++++++++++++++++++++++-- 1 file changed, 69 insertions(+), 3 deletions(-) (limited to 'mesalib/include/GL/internal/dri_interface.h') diff --git a/mesalib/include/GL/internal/dri_interface.h b/mesalib/include/GL/internal/dri_interface.h index 4f768f0c8..b21445f10 100644 --- a/mesalib/include/GL/internal/dri_interface.h +++ b/mesalib/include/GL/internal/dri_interface.h @@ -679,7 +679,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; @@ -699,6 +699,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); }; /** @@ -781,11 +797,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; @@ -820,6 +870,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); }; -- cgit v1.2.3