diff options
author | marha <marha@users.sourceforge.net> | 2013-11-08 11:09:17 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-11-08 11:09:17 +0100 |
commit | 401eb04e4dfb179291befb19d74e2e3148c4e268 (patch) | |
tree | bb9056b67a7bdf37cba96fecc69ce81b1809fb03 /mesalib/include/GL/internal/dri_interface.h | |
parent | f7050e0ff2d1dd147ff5ef45f8ff7d8d7833db48 (diff) | |
download | vcxsrv-401eb04e4dfb179291befb19d74e2e3148c4e268.tar.gz vcxsrv-401eb04e4dfb179291befb19d74e2e3148c4e268.tar.bz2 vcxsrv-401eb04e4dfb179291befb19d74e2e3148c4e268.zip |
libxtrans libxcb xcb-proto mesa git update 8 nov 2013
libxcb commit e8663a935890ff366f49e356211049dfd0d9756a
libxcb/xcb-proto commit 29beba6bf02bda86a5b163ace63e1d0a4d3eee5b
libxtrans commit 0153d1670e4a1883e1bb6dd971435d6268eac5ba
mesa commit 035cce83f7b3d9a037c9e7cc17a212d6cf7e927f
Diffstat (limited to 'mesalib/include/GL/internal/dri_interface.h')
-rw-r--r-- | mesalib/include/GL/internal/dri_interface.h | 167 |
1 files changed, 145 insertions, 22 deletions
diff --git a/mesalib/include/GL/internal/dri_interface.h b/mesalib/include/GL/internal/dri_interface.h index 48993b939..ed4325764 100644 --- a/mesalib/include/GL/internal/dri_interface.h +++ b/mesalib/include/GL/internal/dri_interface.h @@ -86,6 +86,10 @@ typedef struct __DRIdri2LoaderExtensionRec __DRIdri2LoaderExtension; typedef struct __DRI2flushExtensionRec __DRI2flushExtension; typedef struct __DRI2throttleExtensionRec __DRI2throttleExtension; + +typedef struct __DRIimageLoaderExtensionRec __DRIimageLoaderExtension; +typedef struct __DRIimageDriverExtensionRec __DRIimageDriverExtension; + /*@}*/ @@ -763,6 +767,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 +948,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 +975,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; }; @@ -996,6 +1017,7 @@ struct __DRIdri2ExtensionRec { #define __DRI_IMAGE_FORMAT_NONE 0x1008 #define __DRI_IMAGE_FORMAT_XRGB2101010 0x1009 #define __DRI_IMAGE_FORMAT_ARGB2101010 0x100a +#define __DRI_IMAGE_FORMAT_SARGB8 0x100b #define __DRI_IMAGE_USE_SHARE 0x0001 #define __DRI_IMAGE_USE_SCANOUT 0x0002 @@ -1287,4 +1309,105 @@ typedef struct __DRIDriverVtableExtensionRec { const struct __DriverAPIRec *vtable; } __DRIDriverVtableExtension; +/** + * Query renderer driver extension + * + * This allows the window system layer (either EGL or GLX) to query aspects of + * hardware and driver support without creating a context. + */ +#define __DRI2_RENDERER_QUERY "DRI_RENDERER_QUERY" +#define __DRI2_RENDERER_QUERY_VERSION 1 + +#define __DRI2_RENDERER_VENDOR_ID 0x0000 +#define __DRI2_RENDERER_DEVICE_ID 0x0001 +#define __DRI2_RENDERER_VERSION 0x0002 +#define __DRI2_RENDERER_ACCELERATED 0x0003 +#define __DRI2_RENDERER_VIDEO_MEMORY 0x0004 +#define __DRI2_RENDERER_UNIFIED_MEMORY_ARCHITECTURE 0x0005 +#define __DRI2_RENDERER_PREFERRED_PROFILE 0x0006 +#define __DRI2_RENDERER_OPENGL_CORE_PROFILE_VERSION 0x0007 +#define __DRI2_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION 0x0008 +#define __DRI2_RENDERER_OPENGL_ES_PROFILE_VERSION 0x0009 +#define __DRI2_RENDERER_OPENGL_ES2_PROFILE_VERSION 0x000a + +typedef struct __DRI2rendererQueryExtensionRec __DRI2rendererQueryExtension; +struct __DRI2rendererQueryExtensionRec { + __DRIextension base; + + int (*queryInteger)(__DRIscreen *screen, int attribute, unsigned int *val); + int (*queryString)(__DRIscreen *screen, int attribute, const char **val); +}; + +/** + * Image Loader extension. Drivers use this to allocate color buffers + */ + +enum __DRIimageBufferMask { + __DRI_IMAGE_BUFFER_BACK = (1 << 0), + __DRI_IMAGE_BUFFER_FRONT = (1 << 1) +}; + +struct __DRIimageList { + uint32_t image_mask; + __DRIimage *back; + __DRIimage *front; +}; + +#define __DRI_IMAGE_LOADER "DRI_IMAGE_LOADER" +#define __DRI_IMAGE_LOADER_VERSION 1 + +struct __DRIimageLoaderExtensionRec { + __DRIextension base; + + /** + * Allocate color buffers. + * + * \param driDrawable + * \param width Width of allocated buffers + * \param height Height of allocated buffers + * \param format one of __DRI_IMAGE_FORMAT_* + * \param stamp Address of variable to be updated when + * getBuffers must be called again + * \param loaderPrivate The loaderPrivate for driDrawable + * \param buffer_mask Set of buffers to allocate + * \param buffers Returned buffers + */ + int (*getBuffers)(__DRIdrawable *driDrawable, + unsigned int format, + uint32_t *stamp, + void *loaderPrivate, + uint32_t buffer_mask, + struct __DRIimageList *buffers); + + /** + * Flush pending front-buffer rendering + * + * Any rendering that has been performed to the + * fake front will be flushed to the front + * + * \param driDrawable Drawable whose front-buffer is to be flushed + * \param loaderPrivate Loader's private data that was previously passed + * into __DRIdri2ExtensionRec::createNewDrawable + */ + void (*flushFrontBuffer)(__DRIdrawable *driDrawable, void *loaderPrivate); +}; + +/** + * DRI extension. + */ + +#define __DRI_IMAGE_DRIVER "DRI_IMAGE_DRIVER" +#define __DRI_IMAGE_DRIVER_VERSION 1 + +struct __DRIimageDriverExtensionRec { + __DRIextension base; + + /* Common DRI functions, shared with DRI2 */ + __DRIcreateNewScreen2Func createNewScreen2; + __DRIcreateNewDrawableFunc createNewDrawable; + __DRIcreateNewContextFunc createNewContext; + __DRIcreateContextAttribsFunc createContextAttribs; + __DRIgetAPIMaskFunc getAPIMask; +}; + #endif |