• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Name
2
3    IMG_context_priority
4
5Name Strings
6
7    EGL_IMG_context_priority
8
9Contributors
10
11    Ben Bowman, Imagination Techonologies
12    Graham Connor, Imagination Techonologies
13
14Contacts
15
16    Ben Bowman, Imagination Technologies (benji 'dot' bowman 'at'
17    imgtec 'dot' com)
18
19Status
20
21    Complete
22
23Version
24
25    Version 1.1, 8 September 2009
26
27Number
28
29    EGL Extension #10
30
31Dependencies
32
33    Requires EGL 1.0.
34
35    This extension is written against the wording of the EGL 1.4
36    Specification - May 2, 2008 (but may be implemented against earlier
37    versions).
38
39Overview
40
41    This extension allows an EGLContext to be created with a priority
42    hint. It is possible that an implementation will not honour the
43    hint, especially if there are constraints on the number of high
44    priority contexts available in the system, or system policy limits
45    access to high priority contexts to appropriate system privilege
46    level. A query is provided to find the real priority level assigned
47    to the context after creation.
48
49New Types
50
51    None
52
53New Procedures and Functions
54
55    None
56
57New Tokens
58
59    New attributes accepted by the <attrib_list> argument of
60    eglCreateContext
61
62        EGL_CONTEXT_PRIORITY_LEVEL_IMG          0x3100
63
64    New attribute values accepted in the <attrib_list> argument
65    of eglCreateContext:
66
67        EGL_CONTEXT_PRIORITY_HIGH_IMG           0x3101
68        EGL_CONTEXT_PRIORITY_MEDIUM_IMG         0x3102
69        EGL_CONTEXT_PRIORITY_LOW_IMG            0x3103
70
71Additions to Chapter 3 of the EGL 1.4 Specification (EGL Functions and Errors)
72
73    Modify the list of attributes supported by eglCreateContext in
74    section 3.7.1 (Creating Rendering Contexts) on p. 42:
75
76       "<attrib_list> specifies a list of attributes for the context.
77        The list has the same structure as described for
78        eglChooseConfig. The only attributes that can be specified in
79        <attrib_list> are EGL_CONTEXT_CLIENT_VERSION and
80        EGL_CONTEXT_PRIORITY_LEVEL_IMG. The EGL_CONTEXT_CLIENT_VERSION
81        attribute may only be specified when creating a OpenGL ES
82        context (e.g. when the current rendering API is
83        EGL_OPENGL_ES_API).
84
85        <attrib_list> may be NULL or empty (first attribute is
86        EGL_NONE), in which case attributes assume their default values
87        as described below.
88
89        EGL_CONTEXT_CLIENT_VERSION determines which version of an OpenGL
90        ES context to create. An attribute value of 1 specifies creation
91        of an OpenGL ES 1.x context. An attribute value of 2 specifies
92        creation of an OpenGL ES 2.x context. The default value for
93        EGL_CONTEXT_CLIENT_VERSION is 1.
94
95        EGL_CONTEXT_PRIORITY_LEVEL_IMG determines the priority level of
96        the context to be created. This attribute is a hint, as an
97        implementation may not support multiple contexts at some
98        priority levels and system policy may limit access to high
99        priority contexts to appropriate system privilege level. The
100        default value for EGL_CONTEXT_PRIORITY_LEVEL_IMG is
101        EGL_CONTEXT_PRIORITY_MEDIUM_IMG."
102
103
104    Modify the list of attributes supported by eglQueryContext in
105    section 3.7.4 (Context Queries) on p. 46:
106
107       "eglQueryContext returns in <value> the value of attribute for
108        <ctx>. <attribute> must be set to EGL_CONFIG_ID,
109        EGL_CONTEXT_CLIENT_TYPE, EGL_CONTEXT_CLIENT_VERSION,
110        EGL_RENDER_BUFFER, or EGL_CONTEXT_PRIORITY_LEVEL_IMG.
111
112        ...
113
114        Querying EGL_CONTEXT_PRIORITY_LEVEL_IMG returns the priority
115        this context was actually created with. Note: this may not be
116        the same as specified at context creation time, due to
117        implementation limits on the number of contexts that can be
118        created at a specific priority level in the system."
119
120ISSUES:
121
122    1) Should the context priority be treated as a hint or a requirement
123
124    RESOLVED: The context priority should be a hint. System policy may
125    limit high priority contexts to appropriate system privilege level.
126    Implementations may have a limit on the number of context supported
127    at each priority, and may require all contexts within a process to
128    have the same priority level.
129
130    2) Can an application find out what priority a context was assigned?
131
132    RESOLVED: Provide a query to find the assigned priority for a
133    context. An application may find that it has a lower (or higher)
134    priority than requested (although it probably cannot do much with
135    the information).
136
137    3) How many priority levels should be defined?
138
139    RESOLVED: Three seems appropriate, as the highest provides the
140    largest GPU timeslice and reduced latency. It might be useful to
141    specify a low priority context which has a small timeslice and high
142    latency. It is possible that a request for LOW will actually return
143    MEDIUM on an implementation that doesn't differentiate between the
144    lower two levels.
145
146    4) What should the default priority level be if not specified?
147
148        OPTION 1: HIGH - This allows applications that are unaware of
149        this extension to get the highest priority possible.
150
151        OPTIONS 2: MEDIUM - This allows truly high priority applications
152        to differentiate themselves from applications which are unaware
153        of this extension.
154
155        RESOLVED:
156            OPTION 2: MEDIUM - Allow truly high priority applications to
157            differentiate themselves.
158
159Revision History
160    Version 1.1, 08/09/2009 (Jon Leech) Assign extension number and
161        publish in the Registry. Formatting cleanup.
162    Version 1.0, 30/04/2009 - Final clean up. Marked issues as resolved,
163        take out draft status
164    Version 0.3, 22/04/2009 - enums assigned from Khronos registry.
165    Version 0.2, 02/04/2009 - feedback from gdc.
166    Version 0.1, 31/03/2009 - first draft.
167