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
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: WebKit Nightly Build
Hardware: iPhone / iPad All
: P2 Major
Assignee: James Darpinian
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:

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:

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:

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]
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]

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
Comment 8 James Darpinian 2020-09-10 16:34:23 PDT
Created attachment 408496 [details]
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]

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]

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]

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].