Re: [Mesa-dev] [PATCH 3/7] dri: Define DRI_MutableRenderBuffer extensions

2018-08-17 Thread Chad Versace
On Tue 14 Aug 2018, Tapani Pälli wrote:
> Hi Chad;
> 
> On 08/08/2018 06:53 PM, Tapani Pälli wrote:
> > 
> > 
> > On 07.08.2018 21:16, Chad Versace wrote:
> > > On Mon 06 Aug 2018, Chad Versace wrote:
> > > > On Fri 03 Aug 2018, Tapani Pälli wrote:
> > > > > One tiny nit below but for patches 3,4 and 5:
> > > > > 
> > > > > Reviewed-by: Tapani Pälli 
> > > > > 
> > > > > Special thanks for the documentation. I want to go through
> > > > > rest of changes
> > > > > within Android but I'm currently experiencing some horrible
> > > > > issues with the
> > > > > image building. I'm hoping to resolve those soon and get
> > > > > back to business.
> > > 
> > > Any luck with the Android patches?
> > 
> > I have the build working (for O) now but can test stuff only tomorrow,
> > will get back to you then.
> > 
> > > btw, I plan to start working on and/or reviewing
> > > VK_ANDROID_external_memory_android_hardware_buffer this week.
> > > I'll coordinate with you when I start.
> > 
> > OK cool, Celadon is in process of migrating to P and when that is
> > successfully done I'll get back to looking at this too.
> > 
> 
> As an update, I have P building and running fine now. I've run dEQP tests
> and noticed at least these 3 things I've missed and require
> changes/implementation:
> 
> * vkGetPhysicalDeviceImageFormatProperties2
> * vkGetPhysicalDeviceExternalBufferProperties
> * usage of AHardwareBuffer as backing store for VkBuffer objects
> 
> I'm going to work on these areas and try to get dEQP happier. My test app
> using the extension still seems to work fine, it does not use any APIs above
> but just import/export AHardwareBuffer in context of vkImage.

Great! Thanks for the update. (I will be travelling to Europe all next
week, and was out for most of this week. So, I'm behind on reviewing
everything, and may remain behind until I return from Europe).
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 3/7] dri: Define DRI_MutableRenderBuffer extensions

2018-08-14 Thread Tapani Pälli

Hi Chad;

On 08/08/2018 06:53 PM, Tapani Pälli wrote:



On 07.08.2018 21:16, Chad Versace wrote:

On Mon 06 Aug 2018, Chad Versace wrote:

On Fri 03 Aug 2018, Tapani Pälli wrote:

One tiny nit below but for patches 3,4 and 5:

Reviewed-by: Tapani Pälli 

Special thanks for the documentation. I want to go through rest of 
changes
within Android but I'm currently experiencing some horrible issues 
with the
image building. I'm hoping to resolve those soon and get back to 
business.


Any luck with the Android patches?


I have the build working (for O) now but can test stuff only tomorrow, 
will get back to you then.



btw, I plan to start working on and/or reviewing
VK_ANDROID_external_memory_android_hardware_buffer this week.
I'll coordinate with you when I start.


OK cool, Celadon is in process of migrating to P and when that is 
successfully done I'll get back to looking at this too.




As an update, I have P building and running fine now. I've run dEQP 
tests and noticed at least these 3 things I've missed and require 
changes/implementation:


* vkGetPhysicalDeviceImageFormatProperties2
* vkGetPhysicalDeviceExternalBufferProperties
* usage of AHardwareBuffer as backing store for VkBuffer objects

I'm going to work on these areas and try to get dEQP happier. My test 
app using the extension still seems to work fine, it does not use any 
APIs above but just import/export AHardwareBuffer in context of vkImage.


// Tapani
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 3/7] dri: Define DRI_MutableRenderBuffer extensions

2018-08-08 Thread Tapani Pälli



On 07.08.2018 21:16, Chad Versace wrote:

On Mon 06 Aug 2018, Chad Versace wrote:

On Fri 03 Aug 2018, Tapani Pälli wrote:

One tiny nit below but for patches 3,4 and 5:

Reviewed-by: Tapani Pälli 

Special thanks for the documentation. I want to go through rest of changes
within Android but I'm currently experiencing some horrible issues with the
image building. I'm hoping to resolve those soon and get back to business.


Any luck with the Android patches?


I have the build working (for O) now but can test stuff only tomorrow, 
will get back to you then.



btw, I plan to start working on and/or reviewing
VK_ANDROID_external_memory_android_hardware_buffer this week.
I'll coordinate with you when I start.


OK cool, Celadon is in process of migrating to P and when that is 
successfully done I'll get back to looking at this too.


// Tapani
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 3/7] dri: Define DRI_MutableRenderBuffer extensions

2018-08-07 Thread Chad Versace
On Mon 06 Aug 2018, Chad Versace wrote:
> On Fri 03 Aug 2018, Tapani Pälli wrote:
> > One tiny nit below but for patches 3,4 and 5:
> > 
> > Reviewed-by: Tapani Pälli 
> > 
> > Special thanks for the documentation. I want to go through rest of changes
> > within Android but I'm currently experiencing some horrible issues with the
> > image building. I'm hoping to resolve those soon and get back to business.

Any luck with the Android patches?

btw, I plan to start working on and/or reviewing
VK_ANDROID_external_memory_android_hardware_buffer this week.
I'll coordinate with you when I start.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 3/7] dri: Define DRI_MutableRenderBuffer extensions

2018-08-06 Thread Chad Versace
On Fri 03 Aug 2018, Tapani Pälli wrote:
> One tiny nit below but for patches 3,4 and 5:
> 
> Reviewed-by: Tapani Pälli 
> 
> Special thanks for the documentation. I want to go through rest of changes
> within Android but I'm currently experiencing some horrible issues with the
> image building. I'm hoping to resolve those soon and get back to business.
> 
> On 07/31/2018 09:18 PM, Chad Versace wrote:
> > Define extensions DRI_MutableRenderBufferDriver and
> > DRI_MutableRenderBufferLoader. These are the two halves for
> > EGL_KHR_mutable_render_buffer.
> > 
> > Outside the DRI code there is one additional change.  Add
> > gl_config::mutableRenderBuffer to match
> > __DRI_ATTRIB_MUTABLE_RENDER_BUFFER. Neither are used yet.
> > ---
> >   include/GL/internal/dri_interface.h| 138 -
> >   src/mesa/drivers/dri/common/dri_util.c |   2 +
> >   src/mesa/drivers/dri/common/dri_util.h |   4 +
> >   src/mesa/drivers/dri/common/utils.c|   1 +
> >   src/mesa/main/mtypes.h |   3 +
> >   5 files changed, 145 insertions(+), 3 deletions(-)



> > @@ -48,6 +48,7 @@ typedef unsigned int drm_drawable_t;
> >   typedef struct drm_clip_rect drm_clip_rect_t;
> >   #endif
> > +#include 
> 
> This does not look necessary change.

Thanks. This was a leftover from an earlier version.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 3/7] dri: Define DRI_MutableRenderBuffer extensions

2018-08-03 Thread Tapani Pälli

One tiny nit below but for patches 3,4 and 5:

Reviewed-by: Tapani Pälli 

Special thanks for the documentation. I want to go through rest of 
changes within Android but I'm currently experiencing some horrible 
issues with the image building. I'm hoping to resolve those soon and get 
back to business.


On 07/31/2018 09:18 PM, Chad Versace wrote:

Define extensions DRI_MutableRenderBufferDriver and
DRI_MutableRenderBufferLoader. These are the two halves for
EGL_KHR_mutable_render_buffer.

Outside the DRI code there is one additional change.  Add
gl_config::mutableRenderBuffer to match
__DRI_ATTRIB_MUTABLE_RENDER_BUFFER. Neither are used yet.
---
  include/GL/internal/dri_interface.h| 138 -
  src/mesa/drivers/dri/common/dri_util.c |   2 +
  src/mesa/drivers/dri/common/dri_util.h |   4 +
  src/mesa/drivers/dri/common/utils.c|   1 +
  src/mesa/main/mtypes.h |   3 +
  5 files changed, 145 insertions(+), 3 deletions(-)

diff --git a/include/GL/internal/dri_interface.h 
b/include/GL/internal/dri_interface.h
index c32cdd3767a..245c845832b 100644
--- a/include/GL/internal/dri_interface.h
+++ b/include/GL/internal/dri_interface.h
@@ -48,6 +48,7 @@ typedef unsigned int drm_drawable_t;
  typedef struct drm_clip_rect drm_clip_rect_t;
  #endif
  
+#include 


This does not look necessary change.


  #include 
  
  /**

@@ -746,7 +747,8 @@ struct __DRIuseInvalidateExtensionRec {
  #define __DRI_ATTRIB_BIND_TO_TEXTURE_TARGETS  46
  #define __DRI_ATTRIB_YINVERTED47
  #define __DRI_ATTRIB_FRAMEBUFFER_SRGB_CAPABLE 48
-#define __DRI_ATTRIB_MAX   
(__DRI_ATTRIB_FRAMEBUFFER_SRGB_CAPABLE + 1)
+#define __DRI_ATTRIB_MUTABLE_RENDER_BUFFER 49 /* 
EGL_MUTABLE_RENDER_BUFFER_BIT_KHR */
+#define __DRI_ATTRIB_MAX   50
  
  /* __DRI_ATTRIB_RENDER_TYPE */

  #define __DRI_ATTRIB_RGBA_BIT 0x01
@@ -1888,9 +1890,57 @@ struct __DRI2rendererQueryExtensionRec {
   * Image Loader extension. Drivers use this to allocate color buffers
   */
  
+/**

+ * See __DRIimageLoaderExtensionRec::getBuffers::buffer_mask.
+ */
  enum __DRIimageBufferMask {
 __DRI_IMAGE_BUFFER_BACK = (1 << 0),
-   __DRI_IMAGE_BUFFER_FRONT = (1 << 1)
+   __DRI_IMAGE_BUFFER_FRONT = (1 << 1),
+
+   /**
+* A buffer shared between application and compositor. The buffer may be
+* simultaneously accessed by each.
+*
+* A shared buffer is equivalent to an EGLSurface whose EGLConfig contains
+* EGL_MUTABLE_RENDER_BUFFER_BIT_KHR and whose active EGL_RENDER_BUFFER (as
+* opposed to any pending, requested change to EGL_RENDER_BUFFER) is
+* EGL_SINGLE_BUFFER.
+*
+* If buffer_mask contains __DRI_IMAGE_BUFFER_SHARED, then must contains no
+* other bits. As a corollary, a __DRIdrawable that has a "shared" buffer
+* has no front nor back buffer.
+*
+* The loader returns __DRI_IMAGE_BUFFER_SHARED in buffer_mask if and only
+* if:
+* - The loader supports __DRI_MUTABLE_RENDER_BUFFER_LOADER.
+* - The driver supports __DRI_MUTABLE_RENDER_BUFFER_DRIVER.
+* - The EGLConfig of the drawable EGLSurface contains
+*   EGL_MUTABLE_RENDER_BUFFER_BIT_KHR.
+* - The EGLContext's EGL_RENDER_BUFFER is EGL_SINGLE_BUFFER.
+*   Equivalently, the EGLSurface's active EGL_RENDER_BUFFER (as
+*   opposed to any pending, requested change to EGL_RENDER_BUFFER) is
+*   EGL_SINGLE_BUFFER. (See the EGL 1.5 and
+*   EGL_KHR_mutable_render_buffer spec for details about "pending" vs
+*   "active" EGL_RENDER_BUFFER state).
+*
+* A shared buffer is similar to a front buffer in that all rendering to the
+* buffer should appear promptly on the screen. It is different from
+* a front buffer in that its behavior is independent from the
+* GL_DRAW_BUFFER state. Specifically, if GL_DRAW_FRAMEBUFFER is 0 and the
+* __DRIdrawable's buffer_mask is __DRI_IMAGE_BUFFER_SHARED, then all
+* rendering should appear promptly on the screen if GL_DRAW_BUFFER is not
+* GL_NONE.
+*
+* The difference between a shared buffer and a front buffer is motivated
+* by the constraints of Android and OpenGL ES. OpenGL ES does not support
+* front-buffer rendering. Android's SurfaceFlinger protocol provides the
+* EGL driver only a back buffer and no front buffer. The shared buffer
+* mode introduced by EGL_KHR_mutable_render_buffer is a backdoor though
+* EGL that allows Android OpenGL ES applications to render to what is
+* effectively the front buffer, a backdoor that required no change to the
+* OpenGL ES API and little change to the SurfaceFlinger API.
+*/
+   __DRI_IMAGE_BUFFER_SHARED = (1 << 2),
  };
  
  struct __DRIimageList {

@@ -1915,7 +1965,8 @@ struct __DRIimageLoaderExtensionRec {
  * \param stamp  Address of variable to be updated when
  *   getBuffers 

[Mesa-dev] [PATCH 3/7] dri: Define DRI_MutableRenderBuffer extensions

2018-07-31 Thread Chad Versace
Define extensions DRI_MutableRenderBufferDriver and
DRI_MutableRenderBufferLoader. These are the two halves for
EGL_KHR_mutable_render_buffer.

Outside the DRI code there is one additional change.  Add
gl_config::mutableRenderBuffer to match
__DRI_ATTRIB_MUTABLE_RENDER_BUFFER. Neither are used yet.
---
 include/GL/internal/dri_interface.h| 138 -
 src/mesa/drivers/dri/common/dri_util.c |   2 +
 src/mesa/drivers/dri/common/dri_util.h |   4 +
 src/mesa/drivers/dri/common/utils.c|   1 +
 src/mesa/main/mtypes.h |   3 +
 5 files changed, 145 insertions(+), 3 deletions(-)

diff --git a/include/GL/internal/dri_interface.h 
b/include/GL/internal/dri_interface.h
index c32cdd3767a..245c845832b 100644
--- a/include/GL/internal/dri_interface.h
+++ b/include/GL/internal/dri_interface.h
@@ -48,6 +48,7 @@ typedef unsigned int drm_drawable_t;
 typedef struct drm_clip_rect drm_clip_rect_t;
 #endif
 
+#include 
 #include 
 
 /**
@@ -746,7 +747,8 @@ struct __DRIuseInvalidateExtensionRec {
 #define __DRI_ATTRIB_BIND_TO_TEXTURE_TARGETS   46
 #define __DRI_ATTRIB_YINVERTED 47
 #define __DRI_ATTRIB_FRAMEBUFFER_SRGB_CAPABLE  48
-#define __DRI_ATTRIB_MAX   
(__DRI_ATTRIB_FRAMEBUFFER_SRGB_CAPABLE + 1)
+#define __DRI_ATTRIB_MUTABLE_RENDER_BUFFER 49 /* 
EGL_MUTABLE_RENDER_BUFFER_BIT_KHR */
+#define __DRI_ATTRIB_MAX   50
 
 /* __DRI_ATTRIB_RENDER_TYPE */
 #define __DRI_ATTRIB_RGBA_BIT  0x01
@@ -1888,9 +1890,57 @@ struct __DRI2rendererQueryExtensionRec {
  * Image Loader extension. Drivers use this to allocate color buffers
  */
 
+/**
+ * See __DRIimageLoaderExtensionRec::getBuffers::buffer_mask.
+ */
 enum __DRIimageBufferMask {
__DRI_IMAGE_BUFFER_BACK = (1 << 0),
-   __DRI_IMAGE_BUFFER_FRONT = (1 << 1)
+   __DRI_IMAGE_BUFFER_FRONT = (1 << 1),
+
+   /**
+* A buffer shared between application and compositor. The buffer may be
+* simultaneously accessed by each.
+*
+* A shared buffer is equivalent to an EGLSurface whose EGLConfig contains
+* EGL_MUTABLE_RENDER_BUFFER_BIT_KHR and whose active EGL_RENDER_BUFFER (as
+* opposed to any pending, requested change to EGL_RENDER_BUFFER) is
+* EGL_SINGLE_BUFFER.
+*
+* If buffer_mask contains __DRI_IMAGE_BUFFER_SHARED, then must contains no
+* other bits. As a corollary, a __DRIdrawable that has a "shared" buffer
+* has no front nor back buffer.
+*
+* The loader returns __DRI_IMAGE_BUFFER_SHARED in buffer_mask if and only
+* if:
+* - The loader supports __DRI_MUTABLE_RENDER_BUFFER_LOADER.
+* - The driver supports __DRI_MUTABLE_RENDER_BUFFER_DRIVER.
+* - The EGLConfig of the drawable EGLSurface contains
+*   EGL_MUTABLE_RENDER_BUFFER_BIT_KHR.
+* - The EGLContext's EGL_RENDER_BUFFER is EGL_SINGLE_BUFFER.
+*   Equivalently, the EGLSurface's active EGL_RENDER_BUFFER (as
+*   opposed to any pending, requested change to EGL_RENDER_BUFFER) is
+*   EGL_SINGLE_BUFFER. (See the EGL 1.5 and
+*   EGL_KHR_mutable_render_buffer spec for details about "pending" vs
+*   "active" EGL_RENDER_BUFFER state).
+*
+* A shared buffer is similar to a front buffer in that all rendering to the
+* buffer should appear promptly on the screen. It is different from
+* a front buffer in that its behavior is independent from the
+* GL_DRAW_BUFFER state. Specifically, if GL_DRAW_FRAMEBUFFER is 0 and the
+* __DRIdrawable's buffer_mask is __DRI_IMAGE_BUFFER_SHARED, then all
+* rendering should appear promptly on the screen if GL_DRAW_BUFFER is not
+* GL_NONE.
+*
+* The difference between a shared buffer and a front buffer is motivated
+* by the constraints of Android and OpenGL ES. OpenGL ES does not support
+* front-buffer rendering. Android's SurfaceFlinger protocol provides the
+* EGL driver only a back buffer and no front buffer. The shared buffer
+* mode introduced by EGL_KHR_mutable_render_buffer is a backdoor though
+* EGL that allows Android OpenGL ES applications to render to what is
+* effectively the front buffer, a backdoor that required no change to the
+* OpenGL ES API and little change to the SurfaceFlinger API.
+*/
+   __DRI_IMAGE_BUFFER_SHARED = (1 << 2),
 };
 
 struct __DRIimageList {
@@ -1915,7 +1965,8 @@ struct __DRIimageLoaderExtensionRec {
 * \param stamp  Address of variable to be updated when
 *   getBuffers must be called again
 * \param loaderPrivate  The loaderPrivate for driDrawable
-* \param buffer_maskSet of buffers to allocate
+* \param buffer_maskSet of buffers to allocate. A bitmask of
+*   __DRIimageBufferMask.
 * \param buffersReturned buffers
 */
int (*getBuffers)(__DRIdrawable *driDrawable,
@@ -2029,4 +2080,85 @@ struct 

[Mesa-dev] [PATCH 3/7] dri: Define DRI_MutableRenderBuffer extensions

2018-07-30 Thread Chad Versace
Define extensions DRI_MutableRenderBufferDriver and
DRI_MutableRenderBufferLoader. These are the two halves for
EGL_KHR_mutable_render_buffer.

Outside the DRI code there is one additional change.  Add
gl_config::mutableRenderBuffer to match
__DRI_ATTRIB_MUTABLE_RENDER_BUFFER. Neither are used yet.
---
 include/GL/internal/dri_interface.h| 138 -
 src/mesa/drivers/dri/common/dri_util.c |   2 +
 src/mesa/drivers/dri/common/dri_util.h |   4 +
 src/mesa/drivers/dri/common/utils.c|   1 +
 src/mesa/main/mtypes.h |   3 +
 5 files changed, 145 insertions(+), 3 deletions(-)

diff --git a/include/GL/internal/dri_interface.h 
b/include/GL/internal/dri_interface.h
index c32cdd3767a..245c845832b 100644
--- a/include/GL/internal/dri_interface.h
+++ b/include/GL/internal/dri_interface.h
@@ -48,6 +48,7 @@ typedef unsigned int drm_drawable_t;
 typedef struct drm_clip_rect drm_clip_rect_t;
 #endif
 
+#include 
 #include 
 
 /**
@@ -746,7 +747,8 @@ struct __DRIuseInvalidateExtensionRec {
 #define __DRI_ATTRIB_BIND_TO_TEXTURE_TARGETS   46
 #define __DRI_ATTRIB_YINVERTED 47
 #define __DRI_ATTRIB_FRAMEBUFFER_SRGB_CAPABLE  48
-#define __DRI_ATTRIB_MAX   
(__DRI_ATTRIB_FRAMEBUFFER_SRGB_CAPABLE + 1)
+#define __DRI_ATTRIB_MUTABLE_RENDER_BUFFER 49 /* 
EGL_MUTABLE_RENDER_BUFFER_BIT_KHR */
+#define __DRI_ATTRIB_MAX   50
 
 /* __DRI_ATTRIB_RENDER_TYPE */
 #define __DRI_ATTRIB_RGBA_BIT  0x01
@@ -1888,9 +1890,57 @@ struct __DRI2rendererQueryExtensionRec {
  * Image Loader extension. Drivers use this to allocate color buffers
  */
 
+/**
+ * See __DRIimageLoaderExtensionRec::getBuffers::buffer_mask.
+ */
 enum __DRIimageBufferMask {
__DRI_IMAGE_BUFFER_BACK = (1 << 0),
-   __DRI_IMAGE_BUFFER_FRONT = (1 << 1)
+   __DRI_IMAGE_BUFFER_FRONT = (1 << 1),
+
+   /**
+* A buffer shared between application and compositor. The buffer may be
+* simultaneously accessed by each.
+*
+* A shared buffer is equivalent to an EGLSurface whose EGLConfig contains
+* EGL_MUTABLE_RENDER_BUFFER_BIT_KHR and whose active EGL_RENDER_BUFFER (as
+* opposed to any pending, requested change to EGL_RENDER_BUFFER) is
+* EGL_SINGLE_BUFFER.
+*
+* If buffer_mask contains __DRI_IMAGE_BUFFER_SHARED, then must contains no
+* other bits. As a corollary, a __DRIdrawable that has a "shared" buffer
+* has no front nor back buffer.
+*
+* The loader returns __DRI_IMAGE_BUFFER_SHARED in buffer_mask if and only
+* if:
+* - The loader supports __DRI_MUTABLE_RENDER_BUFFER_LOADER.
+* - The driver supports __DRI_MUTABLE_RENDER_BUFFER_DRIVER.
+* - The EGLConfig of the drawable EGLSurface contains
+*   EGL_MUTABLE_RENDER_BUFFER_BIT_KHR.
+* - The EGLContext's EGL_RENDER_BUFFER is EGL_SINGLE_BUFFER.
+*   Equivalently, the EGLSurface's active EGL_RENDER_BUFFER (as
+*   opposed to any pending, requested change to EGL_RENDER_BUFFER) is
+*   EGL_SINGLE_BUFFER. (See the EGL 1.5 and
+*   EGL_KHR_mutable_render_buffer spec for details about "pending" vs
+*   "active" EGL_RENDER_BUFFER state).
+*
+* A shared buffer is similar to a front buffer in that all rendering to the
+* buffer should appear promptly on the screen. It is different from
+* a front buffer in that its behavior is independent from the
+* GL_DRAW_BUFFER state. Specifically, if GL_DRAW_FRAMEBUFFER is 0 and the
+* __DRIdrawable's buffer_mask is __DRI_IMAGE_BUFFER_SHARED, then all
+* rendering should appear promptly on the screen if GL_DRAW_BUFFER is not
+* GL_NONE.
+*
+* The difference between a shared buffer and a front buffer is motivated
+* by the constraints of Android and OpenGL ES. OpenGL ES does not support
+* front-buffer rendering. Android's SurfaceFlinger protocol provides the
+* EGL driver only a back buffer and no front buffer. The shared buffer
+* mode introduced by EGL_KHR_mutable_render_buffer is a backdoor though
+* EGL that allows Android OpenGL ES applications to render to what is
+* effectively the front buffer, a backdoor that required no change to the
+* OpenGL ES API and little change to the SurfaceFlinger API.
+*/
+   __DRI_IMAGE_BUFFER_SHARED = (1 << 2),
 };
 
 struct __DRIimageList {
@@ -1915,7 +1965,8 @@ struct __DRIimageLoaderExtensionRec {
 * \param stamp  Address of variable to be updated when
 *   getBuffers must be called again
 * \param loaderPrivate  The loaderPrivate for driDrawable
-* \param buffer_maskSet of buffers to allocate
+* \param buffer_maskSet of buffers to allocate. A bitmask of
+*   __DRIimageBufferMask.
 * \param buffersReturned buffers
 */
int (*getBuffers)(__DRIdrawable *driDrawable,
@@ -2029,4 +2080,85 @@ struct