Bug 216010 - [WebGL2] Support EXT_color_buffer_half_float on WebGL 2.0 contexts
Summary: [WebGL2] Support EXT_color_buffer_half_float on WebGL 2.0 contexts
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: WebKit Nightly Build
Hardware: iPhone / iPad All
: P2 Major
Assignee: James Darpinian
URL:
Keywords: InRadar
Depends on:
Blocks: 126404 217107
  Show dependency treegraph
 
Reported: 2020-08-31 12:48 PDT by Kenneth Russell
Modified: 2020-09-29 15:47 PDT (History)
11 users (show)

See Also:


Attachments
Patch (6.25 KB, patch)
2020-08-31 17:07 PDT, James Darpinian
no flags Details | Formatted Diff | Diff
Patch (33.94 KB, patch)
2020-09-10 16:34 PDT, James Darpinian
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-08-31 12:48:02 PDT
Per agreement in the WebGL working group, the EXT_color_buffer_half_float extension is being revised to be supported on WebGL 2.0 contexts:
https://github.com/KhronosGroup/WebGL/pull/3146

The reason for this change is principally that iOS devices support 16-bit floating-point render targets but not 32-bit, so the WebGL 2.0 EXT_color_buffer_float extension, which covers both, can not be supported there.

Developers are noticing this functionality gap:
https://github.com/playcanvas/engine/pull/2123#issuecomment-682438222

WebKit's WebGL 2.0 implementation should be updated as soon as possible to track this change so that developers upgrading to WebGL 2.0 can continue to use floating-point render targets on iOS.
Comment 1 Kenneth Russell 2020-08-31 15:10:20 PDT
The update to the extension specification has landed, so implementation of this can proceed. Thanks James for taking this!
Comment 2 James Darpinian 2020-08-31 17:07:15 PDT
Created attachment 407639 [details]
Patch
Comment 3 James Darpinian 2020-08-31 17:08:02 PDT
Working on a test in https://github.com/KhronosGroup/WebGL/pull/3147, will add to this patch tomorrow.
Comment 4 EWS Watchlist 2020-08-31 17:08:09 PDT
Note that there are important steps to take when updating ANGLE. See http://trac.webkit.org/wiki/UpdatingANGLE
Comment 5 Kenneth Russell 2020-09-01 10:40:11 PDT
Looks like webgl/2.0.0/conformance2/extensions/promoted-extensions.html needs to be updated here and upstream as well. Could you please put up another pull request on KhronosGroup/WebGL for that? Thanks!
Comment 6 Kenneth Russell 2020-09-01 10:41:02 PDT
Comment on attachment 407639 [details]
Patch

The code changes look fine. Will wait to r+ until the new tests are uploaded. Thanks again for fixing (and testing) this!
Comment 7 Radar WebKit Bug Importer 2020-09-07 12:48:14 PDT
<rdar://problem/68472384>
Comment 8 James Darpinian 2020-09-10 16:34:23 PDT
Created attachment 408496 [details]
Patch
Comment 9 EWS Watchlist 2020-09-10 16:35:17 PDT
Note that there are important steps to take when updating ANGLE. See https://trac.webkit.org/wiki/UpdatingANGLE
Comment 10 James Darpinian 2020-09-10 16:37:31 PDT
Comment on attachment 408496 [details]
Patch

Test added. Still working on the upstream test as there are issues with the WebGL 1 version. We can commit this version to test the new WebGL 2 functionality and I will update the test later when the WebGL 1 version is finished.
Comment 11 Kenneth Russell 2020-09-11 11:59:59 PDT
Comment on attachment 408496 [details]
Patch

Looks great! Nice work on the thorough test. In the WebKit bug, could you please link to an ANGLE bug in which those changes will be upstreamed, and make sure the conformance test changes are also upstreamed? Thanks! r+
Comment 12 James Darpinian 2020-09-11 15:20:11 PDT
Comment on attachment 408496 [details]
Patch

I filed an ANGLE bug for this here: https://bugs.chromium.org/p/angleproject/issues/detail?id=5038
Comment 13 EWS 2020-09-11 15:24:35 PDT
Committed r266953: <https://trac.webkit.org/changeset/266953>

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