Bug 72086 - Implement WEBGL_compressed_textures WebGL extension
Summary: Implement WEBGL_compressed_textures WebGL extension
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Gregg Tavares
URL:
Keywords:
Depends on: 72309 72310
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-10 18:52 PST by Gregg Tavares
Modified: 2011-12-10 02:31 PST (History)
14 users (show)

See Also:


Attachments
Patch (45.56 KB, patch)
2011-11-10 20:59 PST, Gregg Tavares
no flags Details | Formatted Diff | Diff
Patch (45.70 KB, patch)
2011-11-11 14:53 PST, Gregg Tavares
no flags Details | Formatted Diff | Diff
Patch (45.71 KB, patch)
2011-11-11 17:33 PST, Gregg Tavares
no flags Details | Formatted Diff | Diff
Patch (45.32 KB, patch)
2011-11-11 21:40 PST, Gregg Tavares
no flags Details | Formatted Diff | Diff
Patch (50.70 KB, patch)
2011-11-15 20:43 PST, Kenneth Russell
no flags Details | Formatted Diff | Diff
Patch (50.67 KB, patch)
2011-11-16 16:23 PST, Kenneth Russell
no flags Details | Formatted Diff | Diff
Patch after extension rename (50.01 KB, patch)
2011-11-30 15:39 PST, Kenneth Russell
no flags Details | Formatted Diff | Diff
Fixed more build issues (50.01 KB, patch)
2011-11-30 16:41 PST, Kenneth Russell
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gregg Tavares 2011-11-10 18:52:20 PST
Implement WEBGL_EXPERIMENTAL_compressed_textures WebGL extension
Comment 1 Gregg Tavares 2011-11-10 20:59:09 PST
Created attachment 114619 [details]
Patch
Comment 2 WebKit Review Bot 2011-11-10 21:01:41 PST
Please wait for approval from fishd@chromium.org before submitting because this patch contains changes to the Chromium public API.
Comment 3 Early Warning System Bot 2011-11-10 22:08:19 PST
Comment on attachment 114619 [details]
Patch

Attachment 114619 [details] did not pass qt-ews (qt):
Output: http://queues.webkit.org/results/10429290
Comment 4 Kenneth Russell 2011-11-11 12:12:15 PST
Comment on attachment 114619 [details]
Patch

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

Looks great overall. A few minor comments, plus the GraphicsContext3DOpenGL build fix we discussed offline.

> Source/WebCore/html/canvas/WebGLExperimentalCompressedTextures.cpp:48
> +    if (gc3DContext->getExtensions()->supports("GL_EXT_texture_compression_dxt1")) {

Consider caching the result of getExtensions() in a local variable.

> Source/WebCore/html/canvas/WebGLExperimentalCompressedTextures.cpp:104
> +    return gc3DContext->getExtensions()->supports("GL_EXT_texture_compression_dxt1")

Here too.

> Source/WebCore/html/canvas/WebGLExperimentalCompressedTextures.cpp:116
> +        if (m_supportsDxt1)

Could just return m_supportsDxt1. Here and below.

> Source/WebCore/platform/graphics/efl/GraphicsContext3DEfl.cpp:200
> +    // m_internal->compressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);

Add a FIXME here and below.

> Source/WebKit/chromium/public/WebGraphicsContext3D.h:226
> +    virtual void compressedTexSubImage2D(WGC3Denum target, WGC3Dint level, WGC3Dint xoffset, WGC3Dint yoffset, WGC3Dsizei width, WGC3Dsizei height, WGC3Denum format, WGC3Dsizei imageSize, const void* data) = 0;

Since these are pure virtual, you'll need to roll forward chromium_rev in Source/WebKit/chromium/DEPS to the revision where you added these entry points, if it hasn't been already.
Comment 5 Gregg Tavares 2011-11-11 14:53:49 PST
Created attachment 114775 [details]
Patch
Comment 6 Gregg Tavares 2011-11-11 17:33:09 PST
Created attachment 114806 [details]
Patch
Comment 7 Kenneth Russell 2011-11-11 17:52:13 PST
Comment on attachment 114806 [details]
Patch

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

Looks great. Did you want this submitted via the commit queue? Please mark the patch cq? if so.

> Source/WebKit/chromium/DEPS:35
> +  'chromium_rev': '109568'

I heard from someone else today that there was a problem rolling forward the Chromium revision, and that the most recent roll was reverted. Could you check on IRC with the Chromium WebKit gardener to see if that problem was resolved?
Comment 8 Tony Chang 2011-11-11 18:37:05 PST
(In reply to comment #7)
> (From update of attachment 114806 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=114806&action=review
> 
> > Source/WebKit/chromium/DEPS:35
> > +  'chromium_rev': '109568'
> 
> I heard from someone else today that there was a problem rolling forward the Chromium revision, and that the most recent roll was reverted. Could you check on IRC with the Chromium WebKit gardener to see if that problem was resolved?

Ojan is about to roll to 109696 in https://bugs.webkit.org/attachment.cgi?id=114762&action=prettypatch .
Comment 9 Kenneth Russell 2011-11-11 18:45:13 PST
(In reply to comment #8)
> (In reply to comment #7)
> > (From update of attachment 114806 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=114806&action=review
> > 
> > > Source/WebKit/chromium/DEPS:35
> > > +  'chromium_rev': '109568'
> > 
> > I heard from someone else today that there was a problem rolling forward the Chromium revision, and that the most recent roll was reverted. Could you check on IRC with the Chromium WebKit gardener to see if that problem was resolved?
> 
> Ojan is about to roll to 109696 in https://bugs.webkit.org/attachment.cgi?id=114762&action=prettypatch .

Great, thanks. In that case, Gregg, could you re-upload the patch with that section removed? Any committer should be able to cq+ that without needing a re-review.
Comment 10 Gregg Tavares 2011-11-11 21:40:05 PST
Created attachment 114818 [details]
Patch
Comment 11 Kenneth Russell 2011-11-14 12:01:59 PST
Comment on attachment 114818 [details]
Patch

Looks great.
Comment 12 WebKit Review Bot 2011-11-14 12:24:37 PST
Comment on attachment 114818 [details]
Patch

Clearing flags on attachment: 114818

Committed r100176: <http://trac.webkit.org/changeset/100176>
Comment 13 WebKit Review Bot 2011-11-14 12:24:43 PST
All reviewed patches have been landed.  Closing bug.
Comment 14 Adam Roben (:aroben) 2011-11-14 13:20:46 PST
This broke the Lion build:

http://build.webkit.org/builders/Lion%20Intel%20Debug%20%28Build%29/builds/3595/steps/compile-webkit/logs/stdio

Undefined symbols for architecture x86_64:
  "__ZN7WebCore35WebGLExperimentalCompressedTextures6createEPNS_21WebGLRenderingContextE", referenced from:
      __ZN7WebCore21WebGLRenderingContext12getExtensionERKN3WTF6StringE in WebGLRenderingContext.o
  "__ZN7WebCore35WebGLExperimentalCompressedTextures27getCompressedTextureFormatsEv", referenced from:
      __ZN7WebCore21WebGLRenderingContext12getParameterEjRi in WebGLRenderingContext.o
  "__ZN7WebCore35WebGLExperimentalCompressedTextures9supportedEPNS_21WebGLRenderingContextE", referenced from:
      __ZN7WebCore21WebGLRenderingContext22getSupportedExtensionsEv in WebGLRenderingContext.o
Comment 15 David Kilzer (:ddkilzer) 2011-11-14 14:15:06 PST
(In reply to comment #14)
> This broke the Lion build:
> 
> http://build.webkit.org/builders/Lion%20Intel%20Debug%20%28Build%29/builds/3595/steps/compile-webkit/logs/stdio
> 
> Undefined symbols for architecture x86_64:
>   "__ZN7WebCore35WebGLExperimentalCompressedTextures6createEPNS_21WebGLRenderingContextE", referenced from:
>       __ZN7WebCore21WebGLRenderingContext12getExtensionERKN3WTF6StringE in WebGLRenderingContext.o
>   "__ZN7WebCore35WebGLExperimentalCompressedTextures27getCompressedTextureFormatsEv", referenced from:
>       __ZN7WebCore21WebGLRenderingContext12getParameterEjRi in WebGLRenderingContext.o
>   "__ZN7WebCore35WebGLExperimentalCompressedTextures9supportedEPNS_21WebGLRenderingContextE", referenced from:
>       __ZN7WebCore21WebGLRenderingContext22getSupportedExtensionsEv in WebGLRenderingContext.o

How did this patch make it past the commit queue?
Comment 16 David Kilzer (:ddkilzer) 2011-11-14 14:20:50 PST
(In reply to comment #15)
> (In reply to comment #14)
> > This broke the Lion build:
> > 
> > http://build.webkit.org/builders/Lion%20Intel%20Debug%20%28Build%29/builds/3595/steps/compile-webkit/logs/stdio
> > 
> > Undefined symbols for architecture x86_64:
> >   "__ZN7WebCore35WebGLExperimentalCompressedTextures6createEPNS_21WebGLRenderingContextE", referenced from:
> >       __ZN7WebCore21WebGLRenderingContext12getExtensionERKN3WTF6StringE in WebGLRenderingContext.o
> >   "__ZN7WebCore35WebGLExperimentalCompressedTextures27getCompressedTextureFormatsEv", referenced from:
> >       __ZN7WebCore21WebGLRenderingContext12getParameterEjRi in WebGLRenderingContext.o
> >   "__ZN7WebCore35WebGLExperimentalCompressedTextures9supportedEPNS_21WebGLRenderingContextE", referenced from:
> >       __ZN7WebCore21WebGLRenderingContext22getSupportedExtensionsEv in WebGLRenderingContext.o
> 
> How did this patch make it past the commit queue?

Oh it's the bots-can't-check-patches-by-non-committers rule.  If we land the patch, it seems like the buildbots will be building the patch anyway, so why not test it before landing via the commit bot?  At least it's had a review by a trusted person.
Comment 17 Julien Chaffraix 2011-11-14 14:28:32 PST
Rolled the patch in http://trac.webkit.org/changeset/100191 because of the previous missing symbols.
Comment 18 Kenneth Russell 2011-11-14 14:30:01 PST
I'll figure out the missing symbol problem and resubmit the patch. It really shouldn't have made it through the commit queue.
Comment 19 Kenneth Russell 2011-11-15 20:43:21 PST
Created attachment 115313 [details]
Patch
Comment 20 Kenneth Russell 2011-11-15 20:44:16 PST
Updated DerivedSources.make and WebCore.xcodeproj to fix Mac build.
Comment 21 WebKit Review Bot 2011-11-15 21:22:24 PST
Comment on attachment 115313 [details]
Patch

Attachment 115313 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/10484643
Comment 22 Kenneth Russell 2011-11-16 16:23:21 PST
Created attachment 115476 [details]
Patch
Comment 23 Kenneth Russell 2011-11-16 16:24:11 PST
Merged with move of ArrayBufferView from WebCore to WTF.
Comment 24 Chris Marrin 2011-11-16 17:35:54 PST
Comment on attachment 115476 [details]
Patch

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

> Source/WebCore/html/canvas/WebGLRenderingContext.cpp:2117
> +    if (equalIgnoringCase(name, "WEBGL_EXPERIMENTAL_compressed_textures")) {

Based on the discussions on the WebGL mailing list, we should hold off adding an extension with this name. My feeling is that this should be called WEBKIT_WEBGL_compressed_textures, but I know we haven't made a decision. So until we do, we shouldn't go forward with this name.
Comment 25 Kenneth Russell 2011-11-30 15:39:43 PST
Created attachment 117286 [details]
Patch after extension rename
Comment 26 Kenneth Russell 2011-11-30 15:43:28 PST
Per feedback above and after discussion on public_webgl mailing list, exposed the extension under the name WEBKIT_WEBGL_compressed_textures. Submitting to EWS bots before committing. Further feedback welcome, but review not necessary; it's Gregg's patch and I've already reviewed it.
Comment 27 Early Warning System Bot 2011-11-30 15:45:22 PST
Comment on attachment 117286 [details]
Patch after extension rename

Attachment 117286 [details] did not pass qt-ews (qt):
Output: http://queues.webkit.org/results/10687354
Comment 28 Kenneth Russell 2011-11-30 16:41:14 PST
Created attachment 117293 [details]
Fixed more build issues
Comment 29 Kenneth Russell 2011-11-30 17:37:30 PST
Committed r101578: <http://trac.webkit.org/changeset/101578>
Comment 30 Ben Adams 2011-12-10 02:31:25 PST
Probably not the right place - but...

Thank you, thank you, thank you!

Ben