dri_interface,egl,gallium: only expose RGBA visuals on Android
[mesa.git] / include / GL / internal / dri_interface.h
index a8f5af145df079143b54d1a4b4966e02b047bc93..c314a43faad09547cfb5310ec6158d48e1b611fd 100644 (file)
@@ -967,7 +967,15 @@ struct __DRIbufferRec {
 };
 
 #define __DRI_DRI2_LOADER "DRI_DRI2Loader"
-#define __DRI_DRI2_LOADER_VERSION 3
+#define __DRI_DRI2_LOADER_VERSION 4
+
+enum dri_loader_cap {
+   /* Whether the loader handles RGBA channel ordering correctly. If not,
+    * only BGRA ordering can be exposed.
+    */
+   DRI_LOADER_CAP_RGBA_ORDERING,
+};
+
 struct __DRIdri2LoaderExtensionRec {
     __DRIextension base;
 
@@ -1017,6 +1025,14 @@ struct __DRIdri2LoaderExtensionRec {
                                         int *width, int *height,
                                         unsigned int *attachments, int count,
                                         int *out_count, void *loaderPrivate);
+
+    /**
+     * Return a loader capability value. If the loader doesn't know the enum,
+     * it will return 0.
+     *
+     * \since 4
+     */
+    unsigned (*getCapability)(void *loaderPrivate, enum dri_loader_cap cap);
 };
 
 /**
@@ -1711,7 +1727,7 @@ struct __DRIimageList {
 };
 
 #define __DRI_IMAGE_LOADER "DRI_IMAGE_LOADER"
-#define __DRI_IMAGE_LOADER_VERSION 1
+#define __DRI_IMAGE_LOADER_VERSION 2
 
 struct __DRIimageLoaderExtensionRec {
     __DRIextension base;
@@ -1747,6 +1763,14 @@ struct __DRIimageLoaderExtensionRec {
      *                       into __DRIdri2ExtensionRec::createNewDrawable
      */
     void (*flushFrontBuffer)(__DRIdrawable *driDrawable, void *loaderPrivate);
+
+    /**
+     * Return a loader capability value. If the loader doesn't know the enum,
+     * it will return 0.
+     *
+     * \since 2
+     */
+    unsigned (*getCapability)(void *loaderPrivate, enum dri_loader_cap cap);
 };
 
 /**