The WebGL conformance test suite generates an error for the Mac WebGL implementation because our implementation of glGenerateMipmaps accepts compressed textures as inputs. The specification calls for this to generate a GL INVALID_OPERATION error with the message ""trying to generate mipmaps from compressed texture".
This bug enforces the WebGL 1.0 constraint on our software.
Created attachment 216212 [details]
Comment on attachment 216212 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=216212&action=review
> +#if OS(DARWIN)
Considering this is WebGL conformance, do you think this should be on all platforms?
(In reply to comment #3)
> (From update of attachment 216212 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=216212&action=review
> > Source/WebCore/html/canvas/WebGLRenderingContext.cpp:2227
> > +#if OS(DARWIN)
> Considering this is WebGL conformance, do you think this should be on all platforms?
Good question! I changed from "glGenerateMipmapEXT" to "glGenerateMipmap", which might be all that is necessary on most platforms. In those cases, GL itself should generate the error.
However, our own Apple implementation sneakily maps glGenerateMipmap -> glGenerateMipMapEXT so we can never get the desired error behavior.
It probably wouldn't hurt to remove the #if/def, since it just causes WebGL to generate the error, rather than the underlying GL implementation.
I'll go ahead and remove it while landing.
Committed r158798: <http://trac.webkit.org/changeset/158798>