<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[114109] trunk/dports/x11</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/114109">114109</a></dd>
<dt>Author</dt> <dd>jeremyhu@macports.org</dd>
<dt>Date</dt> <dd>2013-11-29 11:41:46 -0800 (Fri, 29 Nov 2013)</dd>
</dl>
<h3>Log Message</h3>
<pre>xorg-server: Update dri_interface.h</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportsx11xorgserverfilesdriGLinternaldri_interfaceh">trunk/dports/x11/xorg-server/files/dri/GL/internal/dri_interface.h</a></li>
<li><a href="#trunkdportsx11xorgserverdevelfilesdriGLinternaldri_interfaceh">trunk/dports/x11/xorg-server-devel/files/dri/GL/internal/dri_interface.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportsx11xorgserverfilesdriGLinternaldri_interfaceh"></a>
<div class="modfile"><h4>Modified: trunk/dports/x11/xorg-server/files/dri/GL/internal/dri_interface.h (114108 => 114109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/x11/xorg-server/files/dri/GL/internal/dri_interface.h        2013-11-29 18:54:58 UTC (rev 114108)
+++ trunk/dports/x11/xorg-server/files/dri/GL/internal/dri_interface.h        2013-11-29 19:41:46 UTC (rev 114109)
</span><span class="lines">@@ -86,6 +86,10 @@
</span><span class="cx"> typedef struct __DRI2flushExtensionRec        __DRI2flushExtension;
</span><span class="cx"> typedef struct __DRI2throttleExtensionRec        __DRI2throttleExtension;
</span><span class="cx">
</span><ins>+
+typedef struct __DRIimageLoaderExtensionRec __DRIimageLoaderExtension;
+typedef struct __DRIimageDriverExtensionRec __DRIimageDriverExtension;
+
</ins><span class="cx"> /*@}*/
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -330,12 +334,6 @@
</span><span class="cx">                  enum __DRI2throttleReason reason);
</span><span class="cx"> };
</span><span class="cx">
</span><del>-/**
- * XML document describing the configuration options supported by the
- * driver.
- */
-extern const char __driConfigOptions[];
-
</del><span class="cx"> /*@}*/
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -494,6 +492,19 @@
</span><span class="cx"> #define __DRI_DRIVER_EXTENSIONS "__driDriverExtensions"
</span><span class="cx">
</span><span class="cx"> /**
</span><ins>+ * This symbol replaces the __DRI_DRIVER_EXTENSIONS symbol, and will be
+ * suffixed by "_drivername", allowing multiple drivers to be built into one
+ * library, and also giving the driver the chance to return a variable driver
+ * extensions struct depending on the driver name being loaded or any other
+ * system state.
+ *
+ * The function prototype is:
+ *
+ * const __DRIextension **__driDriverGetExtensions_drivername(void);
+ */
+#define __DRI_DRIVER_GET_EXTENSIONS "__driDriverGetExtensions"
+
+/**
</ins><span class="cx"> * Tokens for __DRIconfig attribs. A number of attributes defined by
</span><span class="cx"> * GLX or EGL standards are not in the table, as they must be provided
</span><span class="cx"> * by the loader. For example, FBConfig ID or visual ID, drawable type.
</span><span class="lines">@@ -552,6 +563,8 @@
</span><span class="cx"> #define __DRI_ATTRIB_RGBA_BIT                        0x01        
</span><span class="cx"> #define __DRI_ATTRIB_COLOR_INDEX_BIT                0x02
</span><span class="cx"> #define __DRI_ATTRIB_LUMINANCE_BIT                0x04
</span><ins>+#define __DRI_ATTRIB_FLOAT_BIT                        0x08
+#define __DRI_ATTRIB_UNSIGNED_FLOAT_BIT                0x10
</ins><span class="cx">
</span><span class="cx"> /* __DRI_ATTRIB_CONFIG_CAVEAT */
</span><span class="cx"> #define __DRI_ATTRIB_SLOW_BIT                        0x01
</span><span class="lines">@@ -704,7 +717,7 @@
</span><span class="cx"> * conjunction with the core extension.
</span><span class="cx"> */
</span><span class="cx"> #define __DRI_SWRAST "DRI_SWRast"
</span><del>-#define __DRI_SWRAST_VERSION 3
</del><ins>+#define __DRI_SWRAST_VERSION 4
</ins><span class="cx">
</span><span class="cx"> struct __DRIswrastExtensionRec {
</span><span class="cx"> __DRIextension base;
</span><span class="lines">@@ -740,8 +753,48 @@
</span><span class="cx">                                          const uint32_t *attribs,
</span><span class="cx">                                          unsigned *error,
</span><span class="cx">                                          void *loaderPrivate);
</span><ins>+
+ /**
+ * createNewScreen() with the driver extensions passed in.
+ *
+ * \since version 4
+ */
+ __DRIscreen *(*createNewScreen2)(int screen,
+ const __DRIextension **loader_extensions,
+ const __DRIextension **driver_extensions,
+ const __DRIconfig ***driver_configs,
+ void *loaderPrivate);
+
</ins><span class="cx"> };
</span><span class="cx">
</span><ins>+/** 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 *
+(*__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);
+
</ins><span class="cx"> /**
</span><span class="cx"> * DRI2 Loader extension.
</span><span class="cx"> */
</span><span class="lines">@@ -822,7 +875,7 @@
</span><span class="cx"> * constructors for DRI2.
</span><span class="cx"> */
</span><span class="cx"> #define __DRI_DRI2 "DRI_DRI2"
</span><del>-#define __DRI_DRI2_VERSION 3
</del><ins>+#define __DRI_DRI2_VERSION 4
</ins><span class="cx">
</span><span class="cx"> #define __DRI_API_OPENGL        0        /**< OpenGL compatibility profile */
</span><span class="cx"> #define __DRI_API_GLES                1        /**< OpenGL ES 1.x */
</span><span class="lines">@@ -889,17 +942,14 @@
</span><span class="cx">                                  const __DRIconfig ***driver_configs,
</span><span class="cx">                                  void *loaderPrivate);
</span><span class="cx">
</span><del>- __DRIdrawable *(*createNewDrawable)(__DRIscreen *screen,
-                                        const __DRIconfig *config,
-                                        void *loaderPrivate);
</del><ins>+ __DRIcreateNewDrawableFunc createNewDrawable;
+ __DRIcontext *(*createNewContext)(__DRIscreen *screen,
+ const __DRIconfig *config,
+ __DRIcontext *shared,
+ void *loaderPrivate);
</ins><span class="cx">
</span><del>- __DRIcontext *(*createNewContext)(__DRIscreen *screen,
-                                 const __DRIconfig *config,
-                                 __DRIcontext *shared,
-                                 void *loaderPrivate);
-
</del><span class="cx"> /* Since version 2 */
</span><del>- unsigned int (*getAPIMask)(__DRIscreen *screen);
</del><ins>+ __DRIgetAPIMaskFunc getAPIMask;
</ins><span class="cx">
</span><span class="cx"> __DRIcontext *(*createNewContextForAPI)(__DRIscreen *screen,
</span><span class="cx">                                          int api,
</span><span class="lines">@@ -922,14 +972,14 @@
</span><span class="cx"> *
</span><span class="cx"> * \sa __DRIswrastExtensionRec::createContextAttribs
</span><span class="cx"> */
</span><del>- __DRIcontext *(*createContextAttribs)(__DRIscreen *screen,
-                                         int api,
-                                         const __DRIconfig *config,
-                                         __DRIcontext *shared,
-                                         unsigned num_attribs,
-                                         const uint32_t *attribs,
-                                         unsigned *error,
-                                         void *loaderPrivate);
</del><ins>+ __DRIcreateContextAttribsFunc createContextAttribs;
+
+ /**
+ * createNewScreen with the driver's extension list passed in.
+ *
+ * \since version 4
+ */
+ __DRIcreateNewScreen2Func createNewScreen2;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -938,7 +988,7 @@
</span><span class="cx"> * extensions.
</span><span class="cx"> */
</span><span class="cx"> #define __DRI_IMAGE "DRI_IMAGE"
</span><del>-#define __DRI_IMAGE_VERSION 7
</del><ins>+#define __DRI_IMAGE_VERSION 8
</ins><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * These formats correspond to the similarly named MESA_FORMAT_*
</span><span class="lines">@@ -962,10 +1012,14 @@
</span><span class="cx"> #define __DRI_IMAGE_FORMAT_R8 0x1006 /* Since version 5 */
</span><span class="cx"> #define __DRI_IMAGE_FORMAT_GR88 0x1007
</span><span class="cx"> #define __DRI_IMAGE_FORMAT_NONE 0x1008
</span><ins>+#define __DRI_IMAGE_FORMAT_XRGB2101010 0x1009
+#define __DRI_IMAGE_FORMAT_ARGB2101010 0x100a
+#define __DRI_IMAGE_FORMAT_SARGB8 0x100b
</ins><span class="cx">
</span><span class="cx"> #define __DRI_IMAGE_USE_SHARE                0x0001
</span><span class="cx"> #define __DRI_IMAGE_USE_SCANOUT                0x0002
</span><span class="cx"> #define __DRI_IMAGE_USE_CURSOR                0x0004 /* Depricated */
</span><ins>+#define __DRI_IMAGE_USE_LINEAR                0x0008
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -1025,6 +1079,25 @@
</span><span class="cx"> * 7+. Each query will return a
</span><span class="cx"> * new fd. */
</span><span class="cx">
</span><ins>+enum __DRIYUVColorSpace {
+ __DRI_YUV_COLOR_SPACE_UNDEFINED = 0,
+ __DRI_YUV_COLOR_SPACE_ITU_REC601 = 0x327F,
+ __DRI_YUV_COLOR_SPACE_ITU_REC709 = 0x3280,
+ __DRI_YUV_COLOR_SPACE_ITU_REC2020 = 0x3281
+};
+
+enum __DRISampleRange {
+ __DRI_YUV_RANGE_UNDEFINED = 0,
+ __DRI_YUV_FULL_RANGE = 0x3282,
+ __DRI_YUV_NARROW_RANGE = 0x3283
+};
+
+enum __DRIChromaSiting {
+ __DRI_YUV_CHROMA_SITING_UNDEFINED = 0,
+ __DRI_YUV_CHROMA_SITING_0 = 0x3284,
+ __DRI_YUV_CHROMA_SITING_0_5 = 0x3285
+};
+
</ins><span class="cx"> /**
</span><span class="cx"> * \name Reasons that __DRIimageExtensionRec::createImageFromTexture might fail
</span><span class="cx"> */
</span><span class="lines">@@ -1130,6 +1203,24 @@
</span><span class="cx"> int *fds, int num_fds,
</span><span class="cx"> int *strides, int *offsets,
</span><span class="cx"> void *loaderPrivate);
</span><ins>+
+ /**
+ * Like createImageFromFds, but takes additional attributes.
+ *
+ * For EGL_EXT_image_dma_buf_import.
+ *
+ * \since 8
+ */
+ __DRIimage *(*createImageFromDmaBufs)(__DRIscreen *screen,
+ int width, int height, int fourcc,
+ int *fds, int num_fds,
+ int *strides, int *offsets,
+ enum __DRIYUVColorSpace color_space,
+ enum __DRISampleRange sample_range,
+ enum __DRIChromaSiting horiz_siting,
+ enum __DRIChromaSiting vert_siting,
+ unsigned *error,
+ void *loaderPrivate);
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -1184,4 +1275,135 @@
</span><span class="cx"> __DRIextension base;
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+/**
+ * DRI config options extension.
+ *
+ * This extension provides the XML string containing driver options for use by
+ * the loader in supporting the driconf application.
+ */
+#define __DRI_CONFIG_OPTIONS "DRI_ConfigOptions"
+#define __DRI_CONFIG_OPTIONS_VERSION 1
+
+typedef struct __DRIconfigOptionsExtensionRec {
+ __DRIextension base;
+ const char *xml;
+} __DRIconfigOptionsExtension;
+
+/**
+ * This extension provides a driver vtable to a set of common driver helper
+ * functions (driCoreExtension, driDRI2Extension) within the driver
+ * implementation, as opposed to having to pass them through a global
+ * variable.
+ *
+ * It is not intended to be public API to the actual loader, and the vtable
+ * layout may change at any time.
+ */
+#define __DRI_DRIVER_VTABLE "DRI_DriverVtable"
+#define __DRI_DRIVER_VTABLE_VERSION 1
+
+typedef struct __DRIDriverVtableExtensionRec {
+ __DRIextension base;
+ 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;
+ __DRIcreateContextAttribsFunc createContextAttribs;
+ __DRIgetAPIMaskFunc getAPIMask;
+};
+
</ins><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkdportsx11xorgserverdevelfilesdriGLinternaldri_interfaceh"></a>
<div class="modfile"><h4>Modified: trunk/dports/x11/xorg-server-devel/files/dri/GL/internal/dri_interface.h (114108 => 114109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/x11/xorg-server-devel/files/dri/GL/internal/dri_interface.h        2013-11-29 18:54:58 UTC (rev 114108)
+++ trunk/dports/x11/xorg-server-devel/files/dri/GL/internal/dri_interface.h        2013-11-29 19:41:46 UTC (rev 114109)
</span><span class="lines">@@ -86,6 +86,10 @@
</span><span class="cx"> typedef struct __DRI2flushExtensionRec        __DRI2flushExtension;
</span><span class="cx"> typedef struct __DRI2throttleExtensionRec        __DRI2throttleExtension;
</span><span class="cx">
</span><ins>+
+typedef struct __DRIimageLoaderExtensionRec __DRIimageLoaderExtension;
+typedef struct __DRIimageDriverExtensionRec __DRIimageDriverExtension;
+
</ins><span class="cx"> /*@}*/
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -330,12 +334,6 @@
</span><span class="cx">                  enum __DRI2throttleReason reason);
</span><span class="cx"> };
</span><span class="cx">
</span><del>-/**
- * XML document describing the configuration options supported by the
- * driver.
- */
-extern const char __driConfigOptions[];
-
</del><span class="cx"> /*@}*/
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -494,6 +492,19 @@
</span><span class="cx"> #define __DRI_DRIVER_EXTENSIONS "__driDriverExtensions"
</span><span class="cx">
</span><span class="cx"> /**
</span><ins>+ * This symbol replaces the __DRI_DRIVER_EXTENSIONS symbol, and will be
+ * suffixed by "_drivername", allowing multiple drivers to be built into one
+ * library, and also giving the driver the chance to return a variable driver
+ * extensions struct depending on the driver name being loaded or any other
+ * system state.
+ *
+ * The function prototype is:
+ *
+ * const __DRIextension **__driDriverGetExtensions_drivername(void);
+ */
+#define __DRI_DRIVER_GET_EXTENSIONS "__driDriverGetExtensions"
+
+/**
</ins><span class="cx"> * Tokens for __DRIconfig attribs. A number of attributes defined by
</span><span class="cx"> * GLX or EGL standards are not in the table, as they must be provided
</span><span class="cx"> * by the loader. For example, FBConfig ID or visual ID, drawable type.
</span><span class="lines">@@ -552,6 +563,8 @@
</span><span class="cx"> #define __DRI_ATTRIB_RGBA_BIT                        0x01        
</span><span class="cx"> #define __DRI_ATTRIB_COLOR_INDEX_BIT                0x02
</span><span class="cx"> #define __DRI_ATTRIB_LUMINANCE_BIT                0x04
</span><ins>+#define __DRI_ATTRIB_FLOAT_BIT                        0x08
+#define __DRI_ATTRIB_UNSIGNED_FLOAT_BIT                0x10
</ins><span class="cx">
</span><span class="cx"> /* __DRI_ATTRIB_CONFIG_CAVEAT */
</span><span class="cx"> #define __DRI_ATTRIB_SLOW_BIT                        0x01
</span><span class="lines">@@ -704,7 +717,7 @@
</span><span class="cx"> * conjunction with the core extension.
</span><span class="cx"> */
</span><span class="cx"> #define __DRI_SWRAST "DRI_SWRast"
</span><del>-#define __DRI_SWRAST_VERSION 3
</del><ins>+#define __DRI_SWRAST_VERSION 4
</ins><span class="cx">
</span><span class="cx"> struct __DRIswrastExtensionRec {
</span><span class="cx"> __DRIextension base;
</span><span class="lines">@@ -740,8 +753,48 @@
</span><span class="cx">                                          const uint32_t *attribs,
</span><span class="cx">                                          unsigned *error,
</span><span class="cx">                                          void *loaderPrivate);
</span><ins>+
+ /**
+ * createNewScreen() with the driver extensions passed in.
+ *
+ * \since version 4
+ */
+ __DRIscreen *(*createNewScreen2)(int screen,
+ const __DRIextension **loader_extensions,
+ const __DRIextension **driver_extensions,
+ const __DRIconfig ***driver_configs,
+ void *loaderPrivate);
+
</ins><span class="cx"> };
</span><span class="cx">
</span><ins>+/** 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 *
+(*__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);
+
</ins><span class="cx"> /**
</span><span class="cx"> * DRI2 Loader extension.
</span><span class="cx"> */
</span><span class="lines">@@ -822,7 +875,7 @@
</span><span class="cx"> * constructors for DRI2.
</span><span class="cx"> */
</span><span class="cx"> #define __DRI_DRI2 "DRI_DRI2"
</span><del>-#define __DRI_DRI2_VERSION 3
</del><ins>+#define __DRI_DRI2_VERSION 4
</ins><span class="cx">
</span><span class="cx"> #define __DRI_API_OPENGL        0        /**< OpenGL compatibility profile */
</span><span class="cx"> #define __DRI_API_GLES                1        /**< OpenGL ES 1.x */
</span><span class="lines">@@ -889,17 +942,14 @@
</span><span class="cx">                                  const __DRIconfig ***driver_configs,
</span><span class="cx">                                  void *loaderPrivate);
</span><span class="cx">
</span><del>- __DRIdrawable *(*createNewDrawable)(__DRIscreen *screen,
-                                        const __DRIconfig *config,
-                                        void *loaderPrivate);
</del><ins>+ __DRIcreateNewDrawableFunc createNewDrawable;
+ __DRIcontext *(*createNewContext)(__DRIscreen *screen,
+ const __DRIconfig *config,
+ __DRIcontext *shared,
+ void *loaderPrivate);
</ins><span class="cx">
</span><del>- __DRIcontext *(*createNewContext)(__DRIscreen *screen,
-                                 const __DRIconfig *config,
-                                 __DRIcontext *shared,
-                                 void *loaderPrivate);
-
</del><span class="cx"> /* Since version 2 */
</span><del>- unsigned int (*getAPIMask)(__DRIscreen *screen);
</del><ins>+ __DRIgetAPIMaskFunc getAPIMask;
</ins><span class="cx">
</span><span class="cx"> __DRIcontext *(*createNewContextForAPI)(__DRIscreen *screen,
</span><span class="cx">                                          int api,
</span><span class="lines">@@ -922,14 +972,14 @@
</span><span class="cx"> *
</span><span class="cx"> * \sa __DRIswrastExtensionRec::createContextAttribs
</span><span class="cx"> */
</span><del>- __DRIcontext *(*createContextAttribs)(__DRIscreen *screen,
-                                         int api,
-                                         const __DRIconfig *config,
-                                         __DRIcontext *shared,
-                                         unsigned num_attribs,
-                                         const uint32_t *attribs,
-                                         unsigned *error,
-                                         void *loaderPrivate);
</del><ins>+ __DRIcreateContextAttribsFunc createContextAttribs;
+
+ /**
+ * createNewScreen with the driver's extension list passed in.
+ *
+ * \since version 4
+ */
+ __DRIcreateNewScreen2Func createNewScreen2;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -938,7 +988,7 @@
</span><span class="cx"> * extensions.
</span><span class="cx"> */
</span><span class="cx"> #define __DRI_IMAGE "DRI_IMAGE"
</span><del>-#define __DRI_IMAGE_VERSION 7
</del><ins>+#define __DRI_IMAGE_VERSION 8
</ins><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * These formats correspond to the similarly named MESA_FORMAT_*
</span><span class="lines">@@ -962,10 +1012,14 @@
</span><span class="cx"> #define __DRI_IMAGE_FORMAT_R8 0x1006 /* Since version 5 */
</span><span class="cx"> #define __DRI_IMAGE_FORMAT_GR88 0x1007
</span><span class="cx"> #define __DRI_IMAGE_FORMAT_NONE 0x1008
</span><ins>+#define __DRI_IMAGE_FORMAT_XRGB2101010 0x1009
+#define __DRI_IMAGE_FORMAT_ARGB2101010 0x100a
+#define __DRI_IMAGE_FORMAT_SARGB8 0x100b
</ins><span class="cx">
</span><span class="cx"> #define __DRI_IMAGE_USE_SHARE                0x0001
</span><span class="cx"> #define __DRI_IMAGE_USE_SCANOUT                0x0002
</span><span class="cx"> #define __DRI_IMAGE_USE_CURSOR                0x0004 /* Depricated */
</span><ins>+#define __DRI_IMAGE_USE_LINEAR                0x0008
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -1025,6 +1079,25 @@
</span><span class="cx"> * 7+. Each query will return a
</span><span class="cx"> * new fd. */
</span><span class="cx">
</span><ins>+enum __DRIYUVColorSpace {
+ __DRI_YUV_COLOR_SPACE_UNDEFINED = 0,
+ __DRI_YUV_COLOR_SPACE_ITU_REC601 = 0x327F,
+ __DRI_YUV_COLOR_SPACE_ITU_REC709 = 0x3280,
+ __DRI_YUV_COLOR_SPACE_ITU_REC2020 = 0x3281
+};
+
+enum __DRISampleRange {
+ __DRI_YUV_RANGE_UNDEFINED = 0,
+ __DRI_YUV_FULL_RANGE = 0x3282,
+ __DRI_YUV_NARROW_RANGE = 0x3283
+};
+
+enum __DRIChromaSiting {
+ __DRI_YUV_CHROMA_SITING_UNDEFINED = 0,
+ __DRI_YUV_CHROMA_SITING_0 = 0x3284,
+ __DRI_YUV_CHROMA_SITING_0_5 = 0x3285
+};
+
</ins><span class="cx"> /**
</span><span class="cx"> * \name Reasons that __DRIimageExtensionRec::createImageFromTexture might fail
</span><span class="cx"> */
</span><span class="lines">@@ -1130,6 +1203,24 @@
</span><span class="cx"> int *fds, int num_fds,
</span><span class="cx"> int *strides, int *offsets,
</span><span class="cx"> void *loaderPrivate);
</span><ins>+
+ /**
+ * Like createImageFromFds, but takes additional attributes.
+ *
+ * For EGL_EXT_image_dma_buf_import.
+ *
+ * \since 8
+ */
+ __DRIimage *(*createImageFromDmaBufs)(__DRIscreen *screen,
+ int width, int height, int fourcc,
+ int *fds, int num_fds,
+ int *strides, int *offsets,
+ enum __DRIYUVColorSpace color_space,
+ enum __DRISampleRange sample_range,
+ enum __DRIChromaSiting horiz_siting,
+ enum __DRIChromaSiting vert_siting,
+ unsigned *error,
+ void *loaderPrivate);
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -1184,4 +1275,135 @@
</span><span class="cx"> __DRIextension base;
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+/**
+ * DRI config options extension.
+ *
+ * This extension provides the XML string containing driver options for use by
+ * the loader in supporting the driconf application.
+ */
+#define __DRI_CONFIG_OPTIONS "DRI_ConfigOptions"
+#define __DRI_CONFIG_OPTIONS_VERSION 1
+
+typedef struct __DRIconfigOptionsExtensionRec {
+ __DRIextension base;
+ const char *xml;
+} __DRIconfigOptionsExtension;
+
+/**
+ * This extension provides a driver vtable to a set of common driver helper
+ * functions (driCoreExtension, driDRI2Extension) within the driver
+ * implementation, as opposed to having to pass them through a global
+ * variable.
+ *
+ * It is not intended to be public API to the actual loader, and the vtable
+ * layout may change at any time.
+ */
+#define __DRI_DRIVER_VTABLE "DRI_DriverVtable"
+#define __DRI_DRIVER_VTABLE_VERSION 1
+
+typedef struct __DRIDriverVtableExtensionRec {
+ __DRIextension base;
+ 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;
+ __DRIcreateContextAttribsFunc createContextAttribs;
+ __DRIgetAPIMaskFunc getAPIMask;
+};
+
</ins><span class="cx"> #endif
</span></span></pre>
</div>
</div>
</body>
</html>