dri: Add a flushSwapBuffers method to the image loader extension
authorThomas Hellstrom <thellstrom@vmware.com>
Tue, 20 Jun 2017 16:24:34 +0000 (18:24 +0200)
committerThomas Hellstrom <thellstrom@vmware.com>
Thu, 3 Aug 2017 05:57:27 +0000 (07:57 +0200)
This method may be used by dri drivers to make sure all outstanding
buffer swaps have been flushed to hardware.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
include/GL/internal/dri_interface.h

index 31f1eba98711353ad31da1d3a5b4628ec0a11165..f676ac541953defdbd861ba3d1fb7ec609c81307 100644 (file)
@@ -1747,7 +1747,7 @@ struct __DRIimageList {
 };
 
 #define __DRI_IMAGE_LOADER "DRI_IMAGE_LOADER"
-#define __DRI_IMAGE_LOADER_VERSION 2
+#define __DRI_IMAGE_LOADER_VERSION 3
 
 struct __DRIimageLoaderExtensionRec {
     __DRIextension base;
@@ -1791,6 +1791,20 @@ struct __DRIimageLoaderExtensionRec {
      * \since 2
      */
     unsigned (*getCapability)(void *loaderPrivate, enum dri_loader_cap cap);
+
+    /**
+     * Flush swap buffers
+     *
+     * Make sure any outstanding swap buffers have been submitted to the
+     * device.
+     *
+     * \param driDrawable    Drawable whose swaps need to be flushed
+     * \param loaderPrivate  Loader's private data that was previously passed
+     *                       into __DRIdri2ExtensionRec::createNewDrawable
+     *
+     * \since 3
+     */
+    void (*flushSwapBuffers)(__DRIdrawable *driDrawable, void *loaderPrivate);
 };
 
 /**