Path: blob/21.2-virgl/docs/_extra/specs/EGL_MESA_query_driver.txt
4564 views
Name12MESA_query_driver34Name Strings56EGL_MESA_query_driver78Contact910Rob Clark <robdclark 'at' gmail.com>11Nicolai Hähnle <Nicolai.Haehnle 'at' amd.com>1213Contibutors1415Veluri Mithun <velurimithun38 'at' gmail.com>1617Status1819Complete2021Version2223Version 3, 2019-01-242425Number2627EGL Extension 1312829Dependencies3031EGL 1.0 is required.3233Overview3435When an application has to query the name of a driver and for36obtaining driver's option list (UTF-8 encoded XML) of a driver37the below functions are useful.3839XML file formally describes all available options and also40includes verbal descriptions in multiple languages. Its main purpose41is to be automatically processed by configuration GUIs.42The XML shall respect the following DTD:4344<!ELEMENT driinfo (section*)>45<!ELEMENT section (description+, option+)>46<!ELEMENT description (enum*)>47<!ATTLIST description lang CDATA #REQUIRED48text CDATA #REQUIRED>49<!ELEMENT option (description+)>50<!ATTLIST option name CDATA #REQUIRED51type (bool|enum|int|float) #REQUIRED52default CDATA #REQUIRED53valid CDATA #IMPLIED>54<!ELEMENT enum EMPTY>55<!ATTLIST enum value CDATA #REQUIRED56text CDATA #REQUIRED>5758New Procedures and Functions5960char* eglGetDisplayDriverConfig(EGLDisplay dpy);61const char* eglGetDisplayDriverName(EGLDisplay dpy);6263Description6465By passing EGLDisplay as parameter to `eglGetDisplayDriverName` one can retrieve66driverName. Similarly passing EGLDisplay to `eglGetDisplayDriverConfig` we can retrieve67driverConfig options of the driver in XML format.6869The string returned by `eglGetDisplayDriverConfig` is heap-allocated and caller70is responsible for freeing it.7172EGL_BAD_DISPLAY is generated if `disp` is not an EGL display connection.7374EGL_NOT_INITIALIZED is generated if `disp` has not been initialized.7576If the implementation does not have enough resources to allocate the XML then an77EGL_BAD_ALLOC error is generated.7879New Tokens8081No new tokens8283Issues8485None868788Revision History8990Version 1, 2018-11-05 - First draft (Veluri Mithun)91Version 2, 2019-01-23 - Final version (Veluri Mithun)92Version 3, 2019-01-24 - Mark as complete, add Khronos extension93number, fix parameter name in prototypes,94write revision history (Eric Engestrom)959697