summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-06-03 20:49:25 -0700
committerEric Anholt <eric@anholt.net>2013-11-07 19:08:09 -0800
commitf66a6c5fe7dad343c73c8d772c6363599dfd6b43 (patch)
tree92b60c77231ea9302a3077f2cf943dae201905f6 /include
parentea1f7d289430ec4815bf0b3398d0815a310c2aa3 (diff)
drivers/dri/common: A few dri2 functions are not actually DRI2 specific
This just renames them so that they can be used with the DRI3 extension without causing too much confusion. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/GL/internal/dri_interface.h61
1 files changed, 39 insertions, 22 deletions
diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
index 01233d36f72..b0fa02f7847 100644
--- a/include/GL/internal/dri_interface.h
+++ b/include/GL/internal/dri_interface.h
@@ -763,6 +763,40 @@ struct __DRIswrastExtensionRec {
};
+/** Common DRI function definitions, shared among DRI2 and Image extensions
+ */
+
+typedef __DRIscreen *
+(*__DRIcreateNewScreen2Func)(int screen, int fd,
+ const __DRIextension **extensions,
+ const __DRIextension **driver_extensions,
+ const __DRIconfig ***driver_configs,
+ void *loaderPrivate);
+
+typedef __DRIdrawable *
+(*__DRIcreateNewDrawableFunc)(__DRIscreen *screen,
+ const __DRIconfig *config,
+ void *loaderPrivate);
+
+typedef __DRIcontext *
+(*__DRIcreateNewContextFunc)(__DRIscreen *screen,
+ const __DRIconfig *config,
+ __DRIcontext *shared,
+ void *loaderPrivate);
+
+typedef __DRIcontext *
+(*__DRIcreateContextAttribsFunc)(__DRIscreen *screen,
+ int api,
+ const __DRIconfig *config,
+ __DRIcontext *shared,
+ unsigned num_attribs,
+ const uint32_t *attribs,
+ unsigned *error,
+ void *loaderPrivate);
+
+typedef unsigned int
+(*__DRIgetAPIMaskFunc)(__DRIscreen *screen);
+
/**
* DRI2 Loader extension.
*/
@@ -910,17 +944,11 @@ struct __DRIdri2ExtensionRec {
const __DRIconfig ***driver_configs,
void *loaderPrivate);
- __DRIdrawable *(*createNewDrawable)(__DRIscreen *screen,
- const __DRIconfig *config,
- void *loaderPrivate);
-
- __DRIcontext *(*createNewContext)(__DRIscreen *screen,
- const __DRIconfig *config,
- __DRIcontext *shared,
- void *loaderPrivate);
+ __DRIcreateNewDrawableFunc createNewDrawable;
+ __DRIcreateNewContextFunc createNewContext;
/* Since version 2 */
- unsigned int (*getAPIMask)(__DRIscreen *screen);
+ __DRIgetAPIMaskFunc getAPIMask;
__DRIcontext *(*createNewContextForAPI)(__DRIscreen *screen,
int api,
@@ -943,25 +971,14 @@ struct __DRIdri2ExtensionRec {
*
* \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);
+ __DRIcreateContextAttribsFunc createContextAttribs;
/**
* createNewScreen with the driver's extension list passed in.
*
* \since version 4
*/
- __DRIscreen *(*createNewScreen2)(int screen, int fd,
- const __DRIextension **loader_extensions,
- const __DRIextension **driver_extensions,
- const __DRIconfig ***driver_configs,
- void *loaderPrivate);
+ __DRIcreateNewScreen2Func createNewScreen2;
};