summaryrefslogtreecommitdiffstats
path: root/docs/specs/EGL_MESA_query_driver.txt
blob: 66f3a8a963b98e743004220d3e9faf901bf6435b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
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

    Draft

Version

    Version 1, 2018-11-05

Number

    EGL Extension #TBD

Dependencies

    EGL 1.0 is required.

Overview

    When an application has to query the name of a driver and for
    obtaining driver's option list (UTF-8 encoded XML) of a driver
    the below functions are useful.

    XML file formally describes all available options and also
    includes verbal descriptions in multiple languages. Its main purpose
    is to be automatically processed by configuration GUIs.
    The XML shall respect the following DTD:

    <!ELEMENT driinfo      (section*)>
    <!ELEMENT section      (description+, option+)>
    <!ELEMENT description  (enum*)>
    <!ATTLIST description  lang CDATA #REQUIRED
                           text CDATA #REQUIRED>
    <!ELEMENT option       (description+)>
    <!ATTLIST option       name CDATA #REQUIRED
                           type (bool|enum|int|float) #REQUIRED
                           default CDATA #REQUIRED
                           valid CDATA #IMPLIED>
    <!ELEMENT enum         EMPTY>
    <!ATTLIST enum         value CDATA #REQUIRED
                           text CDATA #REQUIRED>

New Procedures and Functions

    char* eglGetDisplayDriverConfig(EGLDisplay disp);
    const char* eglGetDisplayDriverName(EGLDisplay disp);

Description

    By passing EGLDisplay as parameter to `eglGetDisplayDriverName` one can retrieve
    driverName. Similarly passing EGLDisplay to `eglGetDisplayDriverConfig` we can retrieve
    driverConfig options of the driver in XML format.

    The string returned by `eglGetDisplayDriverConfig` is heap-allocated and caller
    is responsible for freeing it.

    EGL_BAD_DISPLAY is generated if `disp` is not an EGL display connection.

    EGL_NOT_INITIALIZED is generated if `disp` has not been initialized.

    If the implementation does not have enough resources to allocate the XML then an
    EGL_BAD_ALLOC error is generated.

New Tokens

    No new tokens

Issues



Revision History

    Version 1, 2018-11-05