diff options
author | Ian Romanick <[email protected]> | 2011-12-01 13:56:38 -0800 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2011-12-23 08:49:53 -0800 |
commit | b5b2081d75105883c3e7452775c674716b665385 (patch) | |
tree | 56c95f16fcdad4a8679b332d817d456e91b1df91 | |
parent | 1ab545494a6750527cb8b945c286f23a6524826a (diff) |
dri2: Add createContextAttribs entry point for DRISW version 3
Signed-off-by: Ian Romanick <[email protected]>
-rw-r--r-- | include/GL/internal/dri_interface.h | 20 | ||||
-rw-r--r-- | src/mesa/drivers/dri/common/drisw_util.c | 8 |
2 files changed, 25 insertions, 3 deletions
diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h index add03c72147..b21445f1046 100644 --- a/include/GL/internal/dri_interface.h +++ b/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); }; /** @@ -859,6 +875,8 @@ struct __DRIdri2ExtensionRec { * Create a context for a particular API with a set of attributes * * \since version 3 + * + * \sa __DRIswrastExtensionRec::createContextAttribs */ __DRIcontext *(*createContextAttribs)(__DRIscreen *screen, int api, diff --git a/src/mesa/drivers/dri/common/drisw_util.c b/src/mesa/drivers/dri/common/drisw_util.c index 614339eeb42..a19123f7064 100644 --- a/src/mesa/drivers/dri/common/drisw_util.c +++ b/src/mesa/drivers/dri/common/drisw_util.c @@ -288,8 +288,12 @@ const __DRIcoreExtension driCoreExtension = { }; const __DRIswrastExtension driSWRastExtension = { - { __DRI_SWRAST, __DRI_SWRAST_VERSION }, + /* Force the version to 2 because the underlying driver don't (can't!) + * support the extra requirements of CreateContextAttribs. + */ + { __DRI_SWRAST, 2 }, driCreateNewScreen, driCreateNewDrawable, - driCreateNewContextForAPI + driCreateNewContextForAPI, + NULL }; |