summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2013-02-14 15:51:52 -0800
committerIan Romanick <ian.d.romanick@intel.com>2013-11-07 18:08:15 -0800
commit64bb1e857a94fb5b709ecb6f11325313cd1cc96d (patch)
tree93ac52348af20981bb7d9e7ad084bd6237cc09b8 /include
parent1f712bdd38294075f294a172174a57f080b17b1f (diff)
dri: Add interface definition for DRI_RENDERER_QUERY extension
This will be used to let apps query hardware and driver limits before creating a GL context. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'include')
-rw-r--r--include/GL/internal/dri_interface.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
index 48993b9393..01233d36f7 100644
--- a/include/GL/internal/dri_interface.h
+++ b/include/GL/internal/dri_interface.h
@@ -1287,4 +1287,33 @@ typedef struct __DRIDriverVtableExtensionRec {
const struct __DriverAPIRec *vtable;
} __DRIDriverVtableExtension;
+/**
+ * Query renderer driver extension
+ *
+ * This allows the window system layer (either EGL or GLX) to query aspects of
+ * hardware and driver support without creating a context.
+ */
+#define __DRI2_RENDERER_QUERY "DRI_RENDERER_QUERY"
+#define __DRI2_RENDERER_QUERY_VERSION 1
+
+#define __DRI2_RENDERER_VENDOR_ID 0x0000
+#define __DRI2_RENDERER_DEVICE_ID 0x0001
+#define __DRI2_RENDERER_VERSION 0x0002
+#define __DRI2_RENDERER_ACCELERATED 0x0003
+#define __DRI2_RENDERER_VIDEO_MEMORY 0x0004
+#define __DRI2_RENDERER_UNIFIED_MEMORY_ARCHITECTURE 0x0005
+#define __DRI2_RENDERER_PREFERRED_PROFILE 0x0006
+#define __DRI2_RENDERER_OPENGL_CORE_PROFILE_VERSION 0x0007
+#define __DRI2_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION 0x0008
+#define __DRI2_RENDERER_OPENGL_ES_PROFILE_VERSION 0x0009
+#define __DRI2_RENDERER_OPENGL_ES2_PROFILE_VERSION 0x000a
+
+typedef struct __DRI2rendererQueryExtensionRec __DRI2rendererQueryExtension;
+struct __DRI2rendererQueryExtensionRec {
+ __DRIextension base;
+
+ int (*queryInteger)(__DRIscreen *screen, int attribute, unsigned int *val);
+ int (*queryString)(__DRIscreen *screen, int attribute, const char **val);
+};
+
#endif