Merge pull request #73 from velurimithun/master
Add EGL_MESA_query_driver extension
diff --git a/api/EGL/egl.h b/api/EGL/egl.h
index 3e2f7e7..353b14d 100644
--- a/api/EGL/egl.h
+++ b/api/EGL/egl.h
@@ -33,12 +33,12 @@
** used to make the header, and the header can be found at
** http://www.khronos.org/registry/egl
**
-** Khronos $Git commit SHA1: 726475c203 $ on $Git commit date: 2018-10-03 23:51:49 -0700 $
+** Khronos $Git commit SHA1: f7b95d002a $ on $Git commit date: 2018-12-28 20:22:59 +0530 $
*/
#include <EGL/eglplatform.h>
-/* Generated on date 20181204 */
+/* Generated on date 20181230 */
/* Generated C header for:
* API: egl
diff --git a/api/EGL/eglext.h b/api/EGL/eglext.h
index 501bf58..279bc58 100644
--- a/api/EGL/eglext.h
+++ b/api/EGL/eglext.h
@@ -33,12 +33,12 @@
** used to make the header, and the header can be found at
** http://www.khronos.org/registry/egl
**
-** Khronos $Git commit SHA1: 726475c203 $ on $Git commit date: 2018-10-03 23:51:49 -0700 $
+** Khronos $Git commit SHA1: f7b95d002a $ on $Git commit date: 2018-12-28 20:22:59 +0530 $
*/
#include <EGL/eglplatform.h>
-#define EGL_EGLEXT_VERSION 20181204
+#define EGL_EGLEXT_VERSION 20181230
/* Generated C header for:
* API: egl
@@ -1031,6 +1031,16 @@
#define EGL_PLATFORM_SURFACELESS_MESA 0x31DD
#endif /* EGL_MESA_platform_surfaceless */
+#ifndef EGL_MESA_query_driver
+#define EGL_MESA_query_driver 1
+typedef const char* (EGLAPIENTRYP PFNEGLGETDISPLAYDRIVERCONFIGPROC) (EGLDisplay dpy, const char* driverName);
+typedef const char* (EGLAPIENTRYP PFNEGLGETDISPLAYDRIVERNAMEPROC) (EGLDisplay dpy);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI const char* EGLAPIENTRY eglGetDisplayDriverConfig (EGLDisplay dpy, const char* driverName);
+EGLAPI const char* EGLAPIENTRY eglGetDisplayDriverName (EGLDisplay dpy);
+#endif
+#endif /* EGL_MESA_query_driver */
+
#ifndef EGL_NOK_swap_region
#define EGL_NOK_swap_region 1
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGIONNOKPROC) (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects);
diff --git a/api/egl.xml b/api/egl.xml
index bb3cbef..8a4f6c6 100644
--- a/api/egl.xml
+++ b/api/egl.xml
@@ -1228,6 +1228,15 @@
<param><ptype>EGLNativeDisplayType</ptype> <name>display_id</name></param>
</command>
<command>
+ <proto> const char* <name>eglGetDisplayDriverConfig</name></proto>
+ <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+ <param> const char* <name>driverName</name></param>
+ </command>
+ <command>
+ <proto> const char* <name>eglGetDisplayDriverName</name></proto>
+ <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+ </command>
+ <command>
<proto><ptype>EGLint</ptype> <name>eglGetError</name></proto>
</command>
<command>
@@ -2852,6 +2861,12 @@
<enum name="EGL_PLATFORM_SURFACELESS_MESA"/>
</require>
</extension>
+ <extension name="EGL_MESA_query_driver" supported="egl">
+ <require>
+ <command name="eglGetDisplayDriverConfig"/>
+ <command name="eglGetDisplayDriverName"/>
+ </require>
+ </extension>
<extension name="EGL_NOK_swap_region" supported="egl">
<require>
<command name="eglSwapBuffersRegionNOK"/>
diff --git a/extensions/MESA/EGL_MESA_query_driver.txt b/extensions/MESA/EGL_MESA_query_driver.txt
new file mode 100644
index 0000000..4ec4740
--- /dev/null
+++ b/extensions/MESA/EGL_MESA_query_driver.txt
@@ -0,0 +1,65 @@
+Name
+
+ MESA_query_driver
+
+Name Strings
+
+ EGL_MESA_query_driver
+
+Contact
+
+ Rob Clark <robdclark 'at' gmail.com>
+ Nicolai Hähnle <Nicolai.Haehnle 'at' amd.com>
+
+Contibutors
+
+ Veluri Mithun <velurimithun38 'at' gmail.com>
+
+Status
+
+ Completed
+
+Version
+
+ Version 1, 2018-11-05
+
+Number
+
+ EGL Extension #131
+
+Dependencies
+
+ EGL 1.4 is required.
+
+Overview
+
+ When an application has to query the name of a DRI driver and for
+ obtaining driver's option list (UTF-8 encoded XML) of a DRI
+ driver the below functions are useful.
+
+New Procedures and Functions
+
+ const char* eglGetDisplayDriverConfig(EGLDisplay disp, const char *driverName);
+ const char* eglGetDisplayDriverName(EGLDisplay disp);
+
+Description
+
+ First, create an EGLDisplay, EGLContext, EGLSurface then `eglMakeCurrent()` and
+ pass this EGLDisplay as parameter to `eglGetDisplayDriverName`
+
+ After we get the driverName to obtain configs pass it to `eglGetDisplayDriverConfig`
+
+ If the EGLDisplay is not queryable like on haiku systems these new functions will
+ return NULL
+
+New Tokens
+
+ No new tokens
+
+Issues
+
+
+
+Revision History
+
+ Version 1, 2018-11-05
diff --git a/index.php b/index.php
index f01c61a..ae6b329 100644
--- a/index.php
+++ b/index.php
@@ -327,6 +327,9 @@
</li>
<li value=130> <a href="extensions/EXT/EGL_EXT_gl_colorspace_display_p3_passthrough.txt">EGL_EXT_gl_colorspace_display_p3_passthrough</a>
</li>
+</li>
+<li value=131> <a href="extensions/MESA/EGL_MESA_query_driver.txt">EGL_MESA_query_driver</a>
+</li>
</ol>
<h6> Providing Feedback on the Registry </h6>
diff --git a/registry.tcl b/registry.tcl
index d579e50..ec0a982 100644
--- a/registry.tcl
+++ b/registry.tcl
@@ -674,4 +674,9 @@
flags public
filename extensions/EXT/EGL_EXT_gl_colorspace_display_p3_passthrough.txt
}
-# Next free extension number: 131
+extension EGL_MESA_query_driver {
+ number 131
+ flags public
+ filename extensions/MESA/EGL_MESA_query_driver.txt
+}
+# Next free extension number: 132