summaryrefslogtreecommitdiffstats
path: root/include/GL/internal/dri_interface.h
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-07-28 17:30:34 +0200
committerMarek Olšák <[email protected]>2017-07-31 12:49:30 +0200
commit1bf703e4ea5c4f742bc7ba55d01e5afc3f4e11f9 (patch)
tree11fe6774ef619cc9a5f073c58c5cf19ddedb611d /include/GL/internal/dri_interface.h
parent5d8359ff4d8c379fdf1a78758f405bb4cdf69459 (diff)
dri_interface,egl,gallium: only expose RGBA visuals on Android
X/GLX can't handle them. This removes almost 500 GLX visuals that were incorrectly exposed. Add an optional getCapability callback for querying what the loader can do. I'm not splitting this patch, because it's already too small. v2: also add the callback to __DRIimageLoaderExtension Reviewed-by: Nicolai Hähnle <[email protected]> Cc: 17.2 <[email protected]>
Diffstat (limited to 'include/GL/internal/dri_interface.h')
-rw-r--r--include/GL/internal/dri_interface.h28
1 files changed, 26 insertions, 2 deletions
diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
index a8f5af145df..c314a43faad 100644
--- a/include/GL/internal/dri_interface.h
+++ b/include/GL/internal/dri_interface.h
@@ -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);
};
/**