• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Name
2
3    EXT_EGL_image_external_wrap_modes
4
5Name Strings
6
7    GL_EXT_EGL_image_external_wrap_modes
8
9Contributors
10
11    Jeff Leger, Qualcomm
12    Rob VanReenen, Qualcomm
13    Jonathan Wicks, Qualcomm
14    John Carmack, Oculus
15    Cass Everitt, Oculus
16    Graeme Leese, Broadcom
17
18Contacts
19
20    Jeff Leger, Qualcomm  (jleger 'at' qti.qualcomm.com)
21
22Status
23
24    Complete
25
26Version
27
28    Last Modified Date: Feb 06, 2018
29    Revision: #4
30
31Number
32
33    OpenGL ES Extension #298
34
35Dependencies
36
37    Requires OES_EGL_image_external.
38
39    Interacts with OES_EGL_image_external_essl3.
40
41    OES_texture_border_clamp affects the definition of this extension.
42
43    The portions of this extension that modify/extend
44    OES_EGL_image_external are written against OpenGL ES 2.0.
45    The portions of this extension that modify/extend
46    OES_texture_border_clamp are written against OpenGL ES 3.0.
47    The portions of this extension that modify/extend OES_EGL_image_external_essl3 are
48    written against OpenGL ES 3.0.
49
50Overview
51
52    This extension builds on OES_EGL_image_external, which only allows
53    a external images to use a single clamping wrap mode:  CLAMP_TO_EDGE.
54    This extension relaxes that restriction, allowing wrap modes REPEAT
55    and MIRRORED_REPEAT.  If OES_texture_border_clamp is supported, then
56    CLAMP_TO_BORDER is also allowed.
57
58    This extension similarly adds to the capabilities of OES_EGL_image_external_essl3,
59    allowing the same additional wrap modes.
60
61    Since external images can be non-RGB, this extension clarifies how
62    border color values are specified for non-RGB external images.
63
64IP Status
65
66    No known IP claims.
67
68New Procedures and Functions
69
70    None.
71
72New Types
73
74    None.
75
76New Tokens
77
78     None.
79
80Changes to Chapter 3 of the OpenGL ES 2.0 Specification
81
82    Modify the fourth sentence of the first paragraph of Section 3.7.14,
83    as added by OES_EGL_image_external
84
85    from:
86         "The default s and t wrap modes are CLAMP_TO_EDGE and it is an
87         INVALID_ENUM error to set the wrap mode to any other value."
88    to:
89        [[ The following applies if OES_texture_border_clamp is not supported. ]]
90
91        "The default s and t wrap modes are CLAMP_TO_EDGE and it is an
92        INVALID_ENUM error to set the wrap mode to any value other than
93        CLAMP_TO_EDGE, REPEAT, or MIRRORED_REPEAT."
94
95        [[ The following applies if OES_texture_border_clamp is supported. ]]
96
97        "The default s and t wrap modes are CLAMP_TO_EDGE and it is an
98        INVALID_ENUM error to set the wrap mode to any value other than
99        CLAMP_TO_EDGE, REPEAT, MIRRORED_REPEAT, or CLAMP_TO_BORDER."
100
101    [[ The following applies if OES_texture_border_clamp is supported. ]]
102
103    Add the following paragraph to the end of Section 3.7.14, as added
104    by OES_EGL_image_external:
105
106        The state TEXTURE_BORDER_COLOR_OES is specified as an RGBA color
107        in linear color space.  For example, if the original image is stored
108        in(non-linear) ITU-R Rec. 601 YV12, the TEXTURE_BORDER_COLOR_OES
109        must still be specified as an RGBA color in linear color space.
110
111Changes to section "3.7.4 Texture Parameters" of the OpenGL ES 2.0
112Specification
113
114    Modify the paragraph as added by OES_EGL_image_external
115
116    from:
117            "When <target> is TEXTURE_EXTERNAL_OES only NEAREST and
118        LINEAR are accepted as TEXTURE_MIN_FILTER and only CLAMP_TO_EDGE
119        is accepted as TEXTURE_WRAP_S and TEXTURE_WRAP_T."
120    to:
121        [[ The following applies if OES_texture_border_clamp is not supported. ]]
122
123            "When <target> is TEXTURE_EXTERNAL_OES only NEAREST and
124        LINEAR are accepted as TEXTURE_MIN_FILTER and only CLAMP_TO_EDGE,
125        REPEAT, or MIRRORED_REPEAT are accepted as TEXTURE_WRAP_S and
126        TEXTURE_WRAP_T."
127
128        [[ The following applies if OES_texture_border_clamp is supported. ]]
129
130            "When <target> is TEXTURE_EXTERNAL_OES only NEAREST and
131        LINEAR are accepted as TEXTURE_MIN_FILTER and only CLAMP_TO_EDGE,
132        REPEAT, MIRRORED_REPEAT, or CLAMP_TO_BORDER are accepted as
133        TEXTURE_WRAP_S and TEXTURE_WRAP_T."
134
135[[ The following applies if OES_texture_border_clamp is supported. ]]
136
137Changes to section 3.8.10 "Texture Minification" of the OpenGL ES 3.0
138Specification
139
140    Modify the sentence added by OES_texture_border_clamp
141
142    From:
143        "If the texture contains color components, the values of
144        TEXTURE_BORDER_COLOR_OES are interpreted as an RGBA color to
145        match the texture's internal format in a manner consistent with
146        table 3.11."
147
148    To:
149         "If the texture contains color components, the values of
150        TEXTURE_BORDER_COLOR_OES are interpreted as an RGBA color in
151        linear color space to match the texture's internal format in a
152        manner consistent with table 3.11, except that if an external
153        texture stores YUV values then the linear RGBA border value is
154        first converted into a YUVA value in the colorspace of the
155        texture."
156
157[[ The following applies if OES_EGL_image_external_essl3 is supported. ]]
158
159Changes to section 3.8.2 "Sampler Objects" of the OpenGL ES 3.0.2
160Specification
161
162    Modify the the following sentence added by OES_EGL_image_external_essl3
163
164    From:
165        "For example, if TEXTURE_WRAP_S or TEXTURE_WRAP_T is set to
166         anything but CLAMP_TO_EDGE on the sampler object bound to a
167         texture unit and the texture bound to that unit is an external
168         texture, the texture will be considered incomplete."
169
170    To:
171
172        [[ The following applies if OES_texture_border_clamp is not supported. ]]
173
174         "For example, if TEXTURE_WRAP_S or TEXTURE_WRAP_T is set to
175          anything but CLAMP_TO_EDGE, REPEAT, or MIRRORED_REPEAT on the
176          sampler object bound to a texture unit and the texture bound
177          to that unit is an external texture, the texture will be
178          considered incomplete."
179
180        [[ The following applies if OES_texture_border_clamp is supported. ]]
181
182         "For example, if TEXTURE_WRAP_S or TEXTURE_WRAP_T is set to
183          anything but CLAMP_TO_EDGE, REPEAT, MIRRORED_REPEAT, or
184          CLAMP_TO_BORDER on the sampler object bound to a texture unit
185          and the texture bound to that unit is an external texture,
186          the texture will be considered incomplete."
187
188Issues
189
190    1) For YUV texture formats, should the should the border color be
191    specified as RGBA or YUVA ?
192
193    Resolved:  The border color should be specified as linear RGBA since the
194    application may not know the underlying texture format/colorspace.  The
195    color should be converted by the implementation to a colorspace (e.g.,
196    ITU-R Rec. 601) matching the texture's internal format.
197
198
199Revision History
200
201    Rev.    Date     Author    Changes
202    ----  --------  --------  ----------------------------------------------
203     1    12/19/17   jwicks    Initial spec
204     2.   01/03/18   jleger    Updates and cleanup.
205     3.   01/05/18   jleger    Allow additional wrap modes.  Rename the extension.
206     4.   02/06/18   jleger    Added interactions with OES_EGL_image_external_essl3.
207