RESOLVED FIXED 133561
WEBGL_compressed_texture_pvrtc doesn't accept PVRTC format enums in compressedTexImage2D
https://bugs.webkit.org/show_bug.cgi?id=133561
Summary WEBGL_compressed_texture_pvrtc doesn't accept PVRTC format enums in compresse...
Andre Weissflog
Reported 2014-06-05 15:36:39 PDT
The URL (http://floooh.github.io/oryol/DDSTextureLoading.html) points to an emscripten/WebGL demo which tries to load several texture formats. The upper row loads 3 DXT formats (on platforms supporting DXT), and 2 PVRTC formats (on platforms exposing the PVRTC GL extensions). On iOS8 Safari an error message is printed to the JS console "WebGL: INVALID_ENUM: compressedTexImage2D: invalid internalformat" when trying to create the PVRTC textures for the format codes 0x8C02 (GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG) and 0x8C03 (GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG). Here's another page which crashes when trying to load PVRTC textures: http://toji.github.io/texture-tester/
Attachments
Patch (4.30 KB, patch)
2014-06-17 17:22 PDT, Alex Christensen
no flags
Patch (2.79 KB, patch)
2014-06-18 15:55 PDT, Alex Christensen
dino: review+
Andre Weissflog
Comment 1 2014-06-05 15:39:03 PDT
PS: this is on iOS8 Safari, tested on an iPad4.
Dean Jackson
Comment 2 2014-06-05 23:54:20 PDT
Alex Christensen
Comment 3 2014-06-17 17:22:13 PDT
Alex Christensen
Comment 4 2014-06-17 18:11:36 PDT
Also, the bitmaps in the test from https://bugs.webkit.org/show_bug.cgi?id=110497 don't work correctly, but the images in http://toji.github.io/texture-tester/ show up correctly. Where did these images come from? Would they be a better test than the test, which itself has a FIXME in it?
Alex Christensen
Comment 5 2014-06-18 15:53:38 PDT
I'm going to not worry about updating the test until https://github.com/KhronosGroup/WebGL/pull/527 and hopefully updating the compressed images goes through.
Alex Christensen
Comment 6 2014-06-18 15:55:39 PDT
Alex Christensen
Comment 7 2014-06-18 16:15:43 PDT
Committed with GraphicsContext3D::INVALID_OPERATION instead of GL_INVALID_OPERATION to http://trac.webkit.org/changeset/170128
Alex Christensen
Comment 8 2014-06-18 16:17:07 PDT
Andre, http://floooh.github.io/oryol/DDSTextureLoading.html has two black squares on the top right with this fix, but http://toji.github.io/texture-tester/ shows the images correctly. Could you verify that your images are compressed correctly?
Andre Weissflog
Comment 9 2014-06-18 23:45:10 PDT
The images work in a native iOS version of the same demo and have been compressed with PVRTexToolCLI from the PowerVR SDK. You can download the files here (http://floooh.github.io/oryol/lok_bpp2.pvr) and here (https://github.com/floooh/oryol/lok_bpp4.pvr) for inspection. The pixel formats for these textures should be COMPRESSED_RGBA_PVRTC_2BPPV1_IMG (0x8C03) and COMPRESSED_RGBA_PVRTC_4BPPV1_IMG (0x8C02h Is the JS console message "WebGL: INVALID_ENUM: compressedTexImage2D: invalid internalformat" still showing up with your fix? If Toji's demo works now then the problem is very likely on my side or maybe emscripten's GL translation layer, I'll see if I can find out more over the weekend. Do you know when your fix will go live? iOS8 Beta 3? Cheers & Thanks! -Floh. (In reply to comment #8) > Andre, http://floooh.github.io/oryol/DDSTextureLoading.html has two black squares on the top right with this fix, but http://toji.github.io/texture-tester/ shows the images correctly. Could you verify that your images are compressed correctly?
Alex Christensen
Comment 10 2014-06-19 09:39:36 PDT
(In reply to comment #9) > Is the JS console message "WebGL: INVALID_ENUM: compressedTexImage2D: invalid internalformat" still showing up with your fix? No. The message is gone.
Note You need to log in before you can comment on or make changes to this bug.