From 401eb04e4dfb179291befb19d74e2e3148c4e268 Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 8 Nov 2013 11:09:17 +0100 Subject: libxtrans libxcb xcb-proto mesa git update 8 nov 2013 libxcb commit e8663a935890ff366f49e356211049dfd0d9756a libxcb/xcb-proto commit 29beba6bf02bda86a5b163ace63e1d0a4d3eee5b libxtrans commit 0153d1670e4a1883e1bb6dd971435d6268eac5ba mesa commit 035cce83f7b3d9a037c9e7cc17a212d6cf7e927f --- mesalib/include/GL/glx.h | 27 ++++- mesalib/include/GL/internal/dri_interface.h | 167 ++++++++++++++++++++++++---- 2 files changed, 171 insertions(+), 23 deletions(-) (limited to 'mesalib/include/GL') diff --git a/mesalib/include/GL/glx.h b/mesalib/include/GL/glx.h index fa5a8eda9..62d0ede9e 100644 --- a/mesalib/include/GL/glx.h +++ b/mesalib/include/GL/glx.h @@ -467,7 +467,32 @@ extern void glXReleaseTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer #endif /* GLX_EXT_texture_from_pixmap */ - +#ifndef GLX_MESA_query_renderer +#define GLX_MESA_query_renderer 1 + +#define GLX_RENDERER_VENDOR_ID_MESA 0x8183 +#define GLX_RENDERER_DEVICE_ID_MESA 0x8184 +#define GLX_RENDERER_VERSION_MESA 0x8185 +#define GLX_RENDERER_ACCELERATED_MESA 0x8186 +#define GLX_RENDERER_VIDEO_MEMORY_MESA 0x8187 +#define GLX_RENDERER_UNIFIED_MEMORY_ARCHITECTURE_MESA 0x8188 +#define GLX_RENDERER_PREFERRED_PROFILE_MESA 0x8189 +#define GLX_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA 0x818A +#define GLX_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA 0x818B +#define GLX_RENDERER_OPENGL_ES_PROFILE_VERSION_MESA 0x818C +#define GLX_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA 0x818D +#define GLX_RENDERER_ID_MESA 0x818E + +Bool glXQueryRendererIntegerMESA(Display *dpy, int screen, int renderer, int attribute, unsigned int *value); +Bool glXQueryCurrentRendererIntegerMESA(int attribute, unsigned int *value); +const char *glXQueryRendererStringMESA(Display *dpy, int screen, int renderer, int attribute); +const char *glXQueryCurrentRendererStringMESA(int attribute); + +typedef Bool (*PFNGLXQUERYRENDERERINTEGERMESAPROC) (Display *dpy, int screen, int renderer, int attribute, unsigned int *value); +typedef Bool (*PFNGLXQUERYCURRENTRENDERERINTEGERMESAPROC) (int attribute, unsigned int *value); +typedef const char *(*PFNGLXQUERYRENDERERSTRINGMESAPROC) (Display *dpy, int screen, int renderer, int attribute); +typedef const char *(*PFNGLXQUERYCURRENTRENDERERSTRINGMESAPROC) (int attribute); +#endif /* GLX_MESA_query_renderer */ /*** Should these go here, or in another header? */ /* 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 -- cgit v1.2.3