From ae93d534a864e407cb452a675ee4b135d40bdb30 Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Tue, 20 Jun 2017 18:24:34 +0200 Subject: [PATCH] dri: Add a flushSwapBuffers method to the image loader extension 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 Reviewed-by: Sinclair Yeh Reviewed-by: Emil Velikov --- include/GL/internal/dri_interface.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h index 31f1eba9871..f676ac54195 100644 --- a/include/GL/internal/dri_interface.h +++ b/include/GL/internal/dri_interface.h @@ -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); }; /** -- 2.30.2