Bug 87029 - Expose WEBGL_depth_texture extension to WebGL
Summary: Expose WEBGL_depth_texture extension to WebGL
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Gregg Tavares
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-21 10:23 PDT by Kenneth Russell
Modified: 2012-06-18 21:34 PDT (History)
12 users (show)

See Also:


Attachments
Patch (76.06 KB, patch)
2012-06-18 10:59 PDT, Gregg Tavares
no flags Details | Formatted Diff | Diff
Patch (63.59 KB, patch)
2012-06-18 13:03 PDT, Gregg Tavares
no flags Details | Formatted Diff | Diff
Patch (62.69 KB, patch)
2012-06-18 13:14 PDT, Gregg Tavares
no flags Details | Formatted Diff | Diff
Patch (63.01 KB, patch)
2012-06-18 18:48 PDT, Gregg Tavares
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kenneth Russell 2012-05-21 10:23:56 PDT
Customers have requested the OES_depth_texture WebGL extension be exposed in the near term for some deliverables for upcoming conferences. It is in draft status in the WebGL extension registry; for the time being it should be exposed via getExtension("WEBKIT_OES_depth_texture").
Comment 1 Dean Jackson 2012-05-21 16:17:52 PDT
Sounds good. In general is there any process for how stable an extension should be before we land it in trunk? Since it's prefixed it is protected to some extent.

(BTW - I have no opinion either way. I tend to think it's better to land features soon because you get more feedback that way)
Comment 2 Kenneth Russell 2012-05-21 16:32:37 PDT
(In reply to comment #1)
> Sounds good. In general is there any process for how stable an extension should be before we land it in trunk? Since it's prefixed it is protected to some extent.

An extension should have Draft status in the WebGL extension registry before implementation. Collectively the WG and community have agreed that extension "proposals" shouldn't be implemented, not even under vendor prefixes.
Comment 3 Kenneth Russell 2012-05-30 18:06:04 PDT
Gregg, did you mention you might have time to do this?
Comment 4 Gregg Tavares 2012-05-30 21:45:03 PDT
Me? I suppose I can but we don't have OES_depth_texture. We have ANGLE_depth_texture which has different restrictions.

No cubemaps
No uploading data (TexImage2D must be passed NULL, TexSubImage2D always generats INVALID_OP)
No copying (CopyTexImage2D, CopySubTexImage2D) always generate INVALID_OP

I don't think that should be exposed as OES_depth_texture since it's not OES_depth_texture
Comment 5 Kenneth Russell 2012-06-04 16:16:32 PDT
Agreed about the naming; in the process of renaming the extension to WEBGL_depth_texture and imposing the ANGLE limitations. Gregg indicated he's working on this, so marking Assigned to prevent accidental duplicated work.
Comment 6 Gregg Tavares 2012-06-18 10:59:22 PDT
Created attachment 148128 [details]
Patch
Comment 7 Gregg Tavares 2012-06-18 11:00:09 PDT
Note: This page does not support DEPTH_STENCIL formats for depth textures. I'll add that in another patch.
Comment 8 Gregg Tavares 2012-06-18 13:03:56 PDT
Created attachment 148154 [details]
Patch
Comment 9 Gregg Tavares 2012-06-18 13:14:37 PDT
Created attachment 148156 [details]
Patch
Comment 10 Kenneth Russell 2012-06-18 18:20:56 PDT
Comment on attachment 148156 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=148156&action=review

Looks great overall. Nice test. Two minor questions. Marking r+, but not touching cq bit in case you want or need to address either.

> Source/WebCore/html/canvas/WebGLRenderingContext.cpp:3560
> +                                                             border, format, type, m_unpackAlignment);

A little subtle given the offline discussions about ANGLE_depth_texture and the fact that it can't upload data to the texture. Is it worth a comment here that on some platforms, it may be tricky to implement initialization of depth or depth/stencil textures?

> LayoutTests/fast/canvas/webgl/webgl-depth-texture.html:1
> +<!DOCTYPE html>

Are there a few garbage characters here?
Comment 11 Gregg Tavares 2012-06-18 18:48:21 PDT
Created attachment 148223 [details]
Patch
Comment 12 WebKit Review Bot 2012-06-18 21:34:53 PDT
Comment on attachment 148223 [details]
Patch

Clearing flags on attachment: 148223

Committed r120668: <http://trac.webkit.org/changeset/120668>
Comment 13 WebKit Review Bot 2012-06-18 21:34:59 PDT
All reviewed patches have been landed.  Closing bug.