xref: /aosp_15_r20/external/angle/extensions/ANGLE_request_extension.txt (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1Name
2
3    ANGLE_request_extension
4
5Name Strings
6
7    GL_ANGLE_request_extension
8
9Contributors
10
11    Geoff Lang
12    James Darpinian
13
14Contact
15
16    Geoff Lang (geofflang 'at' google.com)
17
18Notice
19
20    Copyright (c) 2016 The Khronos Group Inc. Copyright terms at
21        http://www.khronos.org/registry/speccopyright.html
22
23Status
24
25    Draft
26
27Version
28
29    Version 2, October 4, 2019
30
31Number
32
33    OpenGL ES Extension #??
34
35Dependencies
36
37    Requires OpenGL ES 2.0
38
39    Written against the OpenGL ES 3.0 specification.
40
41Overview
42
43    This extension allows the client to query extensions that can be enabled and
44    explicitly request that an extension be enabled or disabled.
45
46New Procedures and Functions
47
48    void RequestExtension(const char *name)
49
50    void DisableExtension(const char *name)
51
52New Tokens
53
54    Accepted by the <name> parameter of GetString and GetStringi:
55
56        REQUESTABLE_EXTENSIONS_ANGLE      0x93A8
57
58    Accepted by the <value> parameter of the GetInteger* functions:
59
60        NUM_REQUESTABLE_EXTENSIONS_ANGLE  0x93A9
61
62Additions to the OpenGL ES 3.0 Specification
63
64    Add the following paragraph to the end paragraph 4 of section 6.1.6, String
65    Queries:
66
67    "REQUESTABLE_EXTENSIONS_ANGLE returns a list of extensions that can be
68    enabled at runtime by calling RequestExtension."
69
70    Change the following section of paragraph 6 of section 6.1.6, String Queries:
71
72    - "name may only be EXTENSIONS, indicating that the extension name
73    - corresponding to the indexth supported extension should be returned.
74    - <index> may range from zero to the value of NUM_EXTENSIONS minus one"
75    + "name may be EXTENSIONS or REQUESTABLE_EXTENSIONS_ANGLE, indicating that
76    + the extension name corresponding to the indexth supported or requestable
77    + extension should be returned. <index> may range from zero to the value of
78    + NUM_EXTENSIONS and NUM_REQUESTABLE_EXTENSIONS_ANGLE minus one"
79
80    The commands
81
82       void RequestExtension(const char *name)
83       void DisableExtension(const char *name)
84
85    enable or disable the requestable OpenGL ES extension named <name>. If the
86    requested extension was not requestable or disablable, INVALID_OPERATION is
87    generated. Not all requestable extensions can be disabled. There is
88    currently no query for disablable extensions.  This operation is not thread
89    safe, and the application is responsible for ensuring no other context in
90    the share group is accessed by another thread during this operation.
91
92New State
93
94    Add to Table 6.30 (Implementation Dependent Version and Extension Support)
95
96    Get value                        Type Get Cmd     Min Value Description                      Sec.
97    -------------------------------- ---- ----------- --------- -------------------------------- -----
98    NUM_REQUESTABLE_EXTENSIONS_ANGLE Z+   GetIntegerv -         Number of individual requestable 6.1.6
99                                                                extension names
100
101Interactions with the OpenGL ES 2.0 specification:
102
103    Remove all references to GetStringi and NUM_REQUESTABLE_EXTENSIONS_ANGLE.
104
105Issues
106
107    (1) How can the user determine which extensions can be enabled without
108        potentially generating errors?
109
110      This can be solved by:
111      a) Never generate an error in EnableExtensions, simply return false when
112         the extension is not recognized or cannot be enabled.
113      b) Add another query for the extensions that the context supports
114         enabling.
115
116      RESOLVED: Use (b) because it allows the context to explicity advertise
117      which extensions support enabling and doesn't generate errors in the
118      normal use case.
119
120Revision History
121
122    Rev.    Date         Author     Changes
123    ----  -------------  ---------  ----------------------------------------
124      1    Nov 28, 2016  geofflang  Initial version
125      2    Oct 4, 2019   jdarpinian Add DisableExtension
126