Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Side by Side Diff: gpu/GLES2/extensions/CHROMIUM/CHROMIUM_depth_texture.txt

Issue 10441087: Plum through ANGLE_depth_texture (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 Name
2
3 CHROMIUM_depth_texture
4
5 Name Strings
6
7 GL_CHROMIUM_depth_texture
8
9 Status
10
11 DRAFT.
12
13 Version
14
15 Last Modifed Date: June 4, 2012
16 Revision: #1
17
18 Number
19
20 TBD
21
22 Dependencies
23
24 OpenGL ES 2.0 is required.
25 This extension is written against the OpenGL ES 2.0.25 specification
26
27 OES_packed_depth_stencil affects the definition of this extension.
28
29 Overview
30
31 This extension incorporates the depth texturing functionality of
32 OES_depth_texture and OES_packed_depth_stencil, but does not
33 provide the ability to load existing data via TexImage2D or
34 TexSubImage2D and only level 0 is allowed.
35
36 New Procedures and Functions
37
38 None
39
40 New Tokens
41
42 Accepted by the <format> parameter of TexImage2D and TexSubImage2D and
43 <internalformat> parameter of TexImage2D:
44
45 DEPTH_COMPONENT 0x1902
46 DEPTH_STENCIL_OES 0x84F9
47
48 Accepted by the <type> parameter of TexImage2D, TexSubImage2D:
49
50 UNSIGNED_SHORT 0x1403
51 UNSIGNED_INT 0x1405
52 UNSIGNED_INT_24_8_OES 0x84FA
53
54 Additions to Chapter 2 of the OpenGL ES 2.0 Specification (OpenGL Operation)
55
56 Update Section 2.10.5 "Shader Execution" in the subsection titled
57 "Texture Access" add a new paragraph before the last paragraph add
apatrick_chromium 2012/06/07 22:11:36 I think last two words should be this? paragraph.
greggman 2012/06/07 22:53:31 Done.
58 this line:
59
60 "The stencil index texture internal component is ignored if the base
61 internal format is DEPTH_STENCIL_OES.
62
63 If a vertex shader uses..."
64
65 Additions to Chapter 3 of the OpenGL ES 2.0 specification (Rasterizatoin)
66
67 Add the following rows to Table 3.2 (page 62):
68
69 type Parameter GL Data Type Special
70 ------------------------------------------------
71 ... ... ...
72 UNSIGNED_SHORT ushort No
73 UNSIGNED_INT uint No
74 UNSIGNED_INT_24_8_OES uint Yes
75
76 Add the following rows to Table 3.3 (page 62):
77
78 Format Name Element Meaning and Order Target Buffer
79 ------------------------------------------------------------------
80 ... ... ...
81 DEPTH_COMPONENT Depth Depth
82 DEPTH_STENCIL_OES Depth and Stencil Index Depth and Stencil
83 ... ... ...
84
85 Add a row to Table 3.5 "Packed pixel formats" (page 64):
86
87 type Parameter GL Type Components Pixel Formats
88 ------------------------------------------------------------------
89 ... ... ... ...
90 UNSIGNED_INT_24_8_OES uint 2 DEPTH_STENCIL_OES
91
92 Add a new table after Table 3.6 (page 64):
93
94 UNSIGNED_INT_24_8_OES
95
96 31 30 29 28 27 26 ... 12 11 10 9 8 7 6 5 4 3 2 1 0
97 +----------------------------------+---------------+
98 | 1st Component | 2nd Component |
99 +----------------------------------+---------------+
100
101 Table 3.6.B: UNSIGNED_INT formats
102
103 Add a row to Table 3.7 "Packed pixel field assignments" (page 65):
104
105 Format | 1st 2nd 3rd 4th
106 ------------------+-------------------------------
107 ... | ... ... ... ...
108 DEPTH_STENCIL_OES | depth stencil N/A N/A
109
110 Add the following paragraph to the end of the section "Conversion to
111 floating-point" (page 65):
112
113 "For groups of components that contain both standard components and index
114 elements, such as DEPTH_STENCIL_OES, the index elements are not converted."
115
116 In section 3.7.1 "Texture Image Specification", update page 67 to
117 say:
118
119 "The selected groups are processed as described in section 3.6.2, stopping
120 just before final conversion. Each R, G, B, A, or depth value so generated
121 is clamped to [0, 1], while the stencil index values are masked by 2^n-1,
122 where n is the number of stencil bits in the internal format resolution
123 (see below).
124
125 Components are then selected from the resulting R, G, B, A, depth, or
126 stencil index values to obtain a texture with the base internal format
127 specified by <internalformat>. Table 3.8 summarizes the mapping of R, G,
128 B, A, depth, or stencil values to texture components, as a function of the
129 base internal format of the texture image. <internalformat> may be
130 specified as one of the internal format symbolic constants listed in
131 table 3.8. Specifying a value for <internalformat> that is not one of the
132 above values generates the error INVALID_VALUE. If <internalformat> does
133 not match <format>, the error INVALID_OPERATION is generated.
134
135 Textures with a base internal format of DEPTH_COMPONENT or
136 DEPTH_STENCIL_OES are supported by texture image specification commands
137 only if <target> is TEXTURE_2D. Using these formats in conjunction with
138 any other <target> will result in an INVALID_OPERATION error.
139
140 Textures with a base internal format of DEPTH_COMPONENT or DEPTH_STENCIL_OES
141 require either depth component data or depth/stencil component data.
142 Textures with other base internal formats require RGBA component data. The
143 error INVALID_OPERATION is generated if the base internal format is
144 DEPTH_COMPONENT or DEPTH_STENCIL_OES and <format> is not DEPTH_COMPONENT or
145 DEPTH_STENCIL_OES, or if the base internal format is not DEPTH_COMPONENT or
146 DEPTH_STENCIL_OES and <format> is DEPTH_COMPONENT or DEPTH_STENCIL_OES.
147
148 Textures with a base internal format of DEPTH_COMPONENT or
149 DEPTH_STENCIL_OES do not support loading image data via the TexImage
150 commands. They can only have their contents specified by rendering
151 to them. The INVALID_OPERATION error is generated by the TexImage2D
152 command if <data> is not NULL for such textures. The INVALID_VALUE
153 error is generated if level is not 0."
154
155 Add a row to table 3.8 (page 68), and update the title of the
156 second column:
157
158 Base Internal Format RGBA, Depth and Stencil Values Internal Components
159 -------------------------------------------------------------------------
160 ... ... ...
161 DEPTH_COMPONENT Depth D
162 DEPTH_STENCIL_OES Depth,Stencil D,S
163 ... ... ...
164
165 Update the caption for table 3.8 (page 68)
166
167 "Table 3.8: Conversion from RGBA, depth, and stencil pixel components to
168 internal texture components. Texture components R, G, B, A, and L are
169 converted back to RGBA colors during filtering as shown in table 3.12.
170 Texture components D are converted to RGBA colors as described in
171 section 3.7.8-1/2."
172
173 Add the following to section 3.7.2 "Alternate Texture Image Specification
174 Commands":
175
176 "CopyTexImage2D and CopyTexSubImage2D generate the INVALID_OPERATION
177 error if the base internal format of the destination texture is
178 DEPTH_COMPONENT or DEPTH_STENCIL_OES.
179
180 TexSubImage2D generates the INVALID_OPERATION error if the base internal
181 format of the texture is DEPTH_COMPONENT or DEPTH_STENCIL_OES."
182
183 Add a new section between sections 3.7.8 and 3.7.9:
184
185 "3.7.8-1/2 Depth/Stencil Textures
186
187 If the currently bound texture's base internal format is DEPTH_COMPONENT or
188 DEPTH_STENCIL_OES, then the output of the texture unit is as described
189 below. Otherwise, the texture unit operates in the normal manner.
190
191 Let <D_t> be the depth texture value, provided by the shader's texture looku p
192 function. Then the effective texture value, <L_t> or <A_t> is computed
193 as follows:
194 <Tau> = <D_t>
195
196 If the texture image has a base internal format of DEPTH_STENCIL_OES, then
197 the stencil index texture component is ignored. The texture value <Tau> doe s
198 not include a stencil index component, but includes only the depth
199 component.
200
201 The resulting <Tau> is assigned to <L_t>. In some implementations,
202 <Tau> is also assigned to <A_t>. Thus in table 3.12, textures with
203 depth component data behave as if their base internal format is
204 either LUMINANCE or LUMINANCE_ALPHA."
205
206 Add the following to section 3.7.11 "Mipmap Generation":
207
208 "If the level zero array contains depth or depth-stencil data, the
209 error INVALID_OPERATION is generated."
210
211 Insert a new paragraph after the first paragraph of the "Texture Access"
212 subsection of section 3.8.2 on page 87, which says:
213
214 "Texture lookups involving textures with depth component data generate
215 a texture source color by using depth data directly, as described in
216 section 3.7.8-1/2. The stencil texture internal component is ignored
217 if the base internal format is DEPTH_STENCIL_OES."
218
219 Additions to Chapter 4 of the OpenGL ES 2.0 specification (Per-Fragment
220 Operations and the Framebuffer)
221
222 In section 4.4.5 "Framebuffer Completeness", replace the the 3rd
223 paragraph with the following text:
224
225 "* An internal format is color-renderable if it is one of the formats
226 from table 4.5 noted as color-renderable or if it is unsized format
227 RGBA or RGB. No other formats, including compressed internal formats,
228 are color-renderable.
229
230 * An internal format is depth-renderable if it is one of the sized
231 internal formats from table 4.5 noted as depth-renderable, if it
232 is the unsized format DEPTH_COMPONENT or if it is the internal
233 format value of DEPTH24_STENCIL8_OES. No other formats are
234 depth-renderable.
235
236 * An internal format is stencil-renderable if it is one of the sized
237 internal formats from table 4.5 noted as stencil-renderable or if it
238 is DEPTH24_STENCIL8_OES. No other formats are stencil-renderable."
239
240 Additions to Chapter 5 of the OpenGL ES 2.0 Specification (Special
241 Functions)
242
243 None.
244
245 Additions to Chapter 6 of the OpenGL ES 2.0 Specification (State and State
246 Requests)
247
248 None.
249
250 Interactions with OES_packed_depth_stencil
251
252 If OES_packed_depth_stencil is not supported, mentions of
253 DEPTH_STENCIL_OES and UNSIGNED_INT_24_8_OES as a format/type combinations
254 for TexImage2D and TexSubImage2D are omitted. Mentions of
255 the internal format DEPTH24_STENCIL8_OES are also omitted.
256
257 Errors
258
259 The error INVALID_ENUM is generated by TexImage2D if <format> and
260 <internalformat> are DEPTH_COMPONENT and <type> is not UNSIGNED_SHORT,
261 or UNSIGNED_INT.
262
263 The error INVALID_ENUM is generated by TexSubImage2D if <format> is
264 DEPTH_COMPONENT and <type> is not UNSIGNED_SHORT, or UNSIGNED_INT.
265
266 The error INVALID_ENUM is generated by TexImage2D if <format> and
267 <internalformat> are not DEPTH_COMPONENT and <type> is UNSIGNED_SHORT,
268 or UNSIGNED_INT.
269
270 The error INVALID_ENUM is generated by TexSubImage2D if <format> is
271 not DEPTH_COMPONENT and <type> is UNSIGNED_SHORT, or UNSIGNED_INT.
272
273 The error INVALID_ENUM is generated by TexImage2D if <format> and
274 <internalformat> are DEPTH_STENCIL_OES and <type> is not
275 UNSIGNED_INT_24_8_OES.
276
277 The error INVALID_ENUM is generated by TexSubImage2D if <format>
278 is DEPTH_STENCIL_OES and <type> is not UNSIGNED_INT_24_8_OES.
279
280 The error INVALID_ENUM is generated by TexImage2D if <format> and
281 <internalformat> is not DEPTH_STENCIL_OES and <type> is
282 UNSIGNED_INT_24_8_OES.
283
284 The error INVALID_ENUM is generated by TexSubImage2D if <format>
285 is not DEPTH_STENCIL_OES and <type> is UNSIGNED_INT_24_8_OES.
286
287 The error INVALID_OPERATION is generated in the following situations:
288 - TexImage2D is called with <format> and <internalformat> of
289 DEPTH_COMPONENT or DEPTH_STENCIL_OES and
290 - <target> is not TEXTURE_2D, or
291 - <data> is not NULL
292 - TexSubImage2D is called with <format> of DEPTH_COMPONENT or
293 DEPTH_STENCIL_OES.
294 - CopyTexImage2D is called with an <internalformat> that has a base
295 internal format of DEPTH_COMPONENT or DEPTH_STENCIL_OES.
296 - CopyTexSubImage2D is called with a target texture that has a base
297 internal format of DEPTH_COMPONENT or DEPTH_STENCIL_OES.
298 - GenerateMipmap is called on a texture that has a base internal format
299 of DEPTH_COMPONENT or DEPTH_STENCIL_OES.
300
301 New State
302
303 None.
304
305 Revision History
306
307 06/04/2012 gman intial revision based on ANGLE_depth_texture and
308 OES_packed_depth_stencil
309
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/build_gles2_cmd_buffer.py » ('j') | gpu/command_buffer/service/feature_info.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698