Bug 210524 - OES_texture_float / OES_texture_half_float unavailable in WebGL 1.0 on iOS Simulator with ANGLE
Summary: OES_texture_float / OES_texture_half_float unavailable in WebGL 1.0 on iOS Si...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: WebKit Nightly Build
Hardware: iPhone / iPad All
: P2 Normal
Assignee: Kenneth Russell
URL:
Keywords: InRadar
Depends on: 210994 211971
Blocks: 126404 207858 212005 212170 212181 212228
  Show dependency treegraph
 
Reported: 2020-04-14 16:47 PDT by Kenneth Russell
Modified: 2020-05-21 13:55 PDT (History)
8 users (show)

See Also:


Attachments
Logging output (27.41 KB, text/plain)
2020-05-13 23:09 PDT, Kenneth Russell
no flags Details
Patch (15.78 KB, patch)
2020-05-14 20:40 PDT, Kenneth Russell
no flags Details | Formatted Diff | Diff
Patch (20.94 KB, patch)
2020-05-15 15:44 PDT, Kenneth Russell
no flags Details | Formatted Diff | Diff
Patch (22.48 KB, patch)
2020-05-20 12:38 PDT, Kenneth Russell
no flags Details | Formatted Diff | Diff
Patch (22.48 KB, patch)
2020-05-20 16:04 PDT, 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 Kenneth Russell 2020-04-14 16:47:23 PDT
Visiting https://webglreport.com/ on the iOS Simulator with both the current OpenGL ES and the forthcoming ANGLE backend, it appears that OES_texture_float and OES_texture_half_float are supported on the old (non-ANGLE) backend, but not supported on the ANGLE backend.

This might be related indirectly to Chromium bug http://crbug.com/1067122 , where these extensions are not showing up on some other mobile devices, either.

The problem might be overly strict renderability checks than required according to the extension specification - since framebuffer completeness is essentially allowed to fail per specification for almost any reason in OpenGL ES 2.0. In particular, RGB32F and RGB16F textures might not be color-renderable on this hardware, and ANGLE might be requiring them to be in order to expose these extensions.
Comment 1 Kenneth Russell 2020-05-13 23:09:20 PDT
Created attachment 399334 [details]
Logging output
Comment 2 Kenneth Russell 2020-05-13 23:09:35 PDT
Following the logging suggested by Geoff Lang from the ANGLE project in https://bugs.chromium.org/p/angleproject/issues/detail?id=4591 , here are the logs for why OES_texture_float and OES_texture_half_float aren't supported in the iOS Simulator.

OES_texture_float is initially not supported because GL_LUMINANCE_ALPHA32F_EXT isn't texturable, and OES_texture_half_float is not supported because GL_LUMINANCE_ALPHA16F_EXT is not texturable.
Comment 3 Kenneth Russell 2020-05-13 23:17:46 PDT
Filed ANGLE bug https://bugs.chromium.org/p/angleproject/issues/detail?id=4636 about this.
Comment 4 Kenneth Russell 2020-05-14 17:00:10 PDT
Sidestepping the requirement of the texture formats that are supplied by EXT_texture_storage - which iOS doesn't provide - and fixing a bug caused by the fix for Bug 210994, the next issue is that support for luminance/alpha floating-point textures are going to need to be emulated inside ANGLE on top of red/green textures.
Comment 5 Kenneth Russell 2020-05-14 20:40:05 PDT
Created attachment 399451 [details]
Patch
Comment 6 EWS Watchlist 2020-05-14 20:40:40 PDT
Note that there are important steps to take when updating ANGLE. See http://trac.webkit.org/wiki/UpdatingANGLE
Comment 7 Dean Jackson 2020-05-15 14:32:45 PDT
I've checked this on device and it passes the oes-texture-float tests.
Comment 8 Kenneth Russell 2020-05-15 15:44:57 PDT
Created attachment 399521 [details]
Patch
Comment 9 Kenneth Russell 2020-05-15 15:46:00 PDT
Comment on attachment 399521 [details]
Patch

Updating this patch only for testing purposes - not for review or commit. Part of this change is being split off in Bug 211971. The other will likely be landed upstream in ANGLE and then rolled forward into WebKit.
Comment 10 Dean Jackson 2020-05-17 15:51:30 PDT
Unfortunately OES_texture_float_linear will need some work to enable too. ANGLE won't enable that because it believes RGBA32F is not filterable, based on the fact that iOS does not advertise the extension either. Since it is part of core in ES3, it shouldn't need to check for the extension (assuming it is using an ES3 context).

https://bugs.webkit.org/show_bug.cgi?id=212005
Comment 11 Radar WebKit Bug Importer 2020-05-17 15:51:58 PDT
<rdar://problem/63321618>
Comment 12 Justin Fan 2020-05-19 15:28:38 PDT
It appears fast/canvas/webgl/oes-texture-half-float-uint16.html is regressed on ANGLE due to this.
Comment 13 Kenneth Russell 2020-05-20 10:18:16 PDT
Thanks for the heads up Justin. On what platform did you see the regression?
Comment 14 Kenneth Russell 2020-05-20 11:24:39 PDT
Never mind, I see it's on iOS. Blocking Bug 207858.
Comment 15 Kenneth Russell 2020-05-20 12:38:33 PDT
Created attachment 399874 [details]
Patch
Comment 16 Kenneth Russell 2020-05-20 12:50:15 PDT
Comment on attachment 399874 [details]
Patch

Uploaded this latest patch for testing purposes on the bots only. Will pick up this fix by rolling ANGLE forward instead.
Comment 17 Kenneth Russell 2020-05-20 16:03:04 PDT
Comment on attachment 399874 [details]
Patch

Not sure whether my own r- blocked some of the EWS bots from running. Removing it to see.
Comment 18 Kenneth Russell 2020-05-20 16:04:49 PDT
Created attachment 399904 [details]
Patch
Comment 19 Kenneth Russell 2020-05-20 16:05:12 PDT
Clearly I shouldn't have used r- on the earlier patch.
Comment 20 Kenneth Russell 2020-05-20 16:36:08 PDT
Comment on attachment 399904 [details]
Patch

After offline discussion, we've decided to merge this fix directly into WebKit rather than roll ANGLE forward to pick it up. We'll roll ANGLE forward soon and subsume this individual patch.

Requesting review.
Comment 21 EWS 2020-05-20 17:16:51 PDT
Committed r261975: <https://trac.webkit.org/changeset/261975>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 399904 [details].