Bug 241399

Summary: EXT_float_blend is missing on iOS starting from version 15.4
Product: WebKit Reporter: Nikita Rokotyan <nrokotyan>
Component: WebGLAssignee: Kimmo Kinnunen <kkinnunen>
Status: RESOLVED WORKSFORME    
Severity: Major CC: bfulgham, dino, kbr, kkinnunen, kpiddington, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 15   
Hardware: iPhone / iPad   
OS: iOS 15   
Attachments:
Description Flags
WebGL supported extensions list on iPhone 13 Pro, iOS 15.6 beta 2 none

Description Nikita Rokotyan 2022-06-07 19:19:51 PDT
Created attachment 460080 [details]
WebGL supported extensions list on iPhone 13 Pro, iOS 15.6 beta 2

The support for the EXT_float_blend extension is missing on iOS starting from version 15.4, which breaks blending for floating point textures.

How to reproduce:
Open https://www.geeks3d.com/webgl/ from an iOS 15.4+ device and you'll see that EXT_float_blend is missing from the supported extensions list.
Comment 1 Kenneth Russell 2022-06-10 16:56:16 PDT
iOS 15.4 included the large Metal backend roll-forward. Kimmo, could you triage this on iOS hardware?
Comment 2 Radar WebKit Bug Importer 2022-06-14 19:20:13 PDT
<rdar://problem/95162938>
Comment 3 Kimmo Kinnunen 2022-06-15 04:43:08 PDT
EXT_float_blend needs capability to render with blend to 32-bit float (RGBA32F).
Unfortunately none of the iPhone GPUs have this capability.
I believe it was a bug on our behalf to ship EXT_float_blend on prior iOS releases.

The clients could check if they can use EXT_color_buffer_float to render to RGBA16F render targets when blending is needed.


https://www.khronos.org/registry/webgl/extensions/EXT_float_blend/

https://www.khronos.org/registry/webgl/extensions/EXT_color_buffer_float/


GPU Texture Capabilities by Pixel Format, RGBA32Float, lacks "Blend" for GPUFamilyApple cases:
https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf
Comment 4 Kenneth Russell 2022-06-15 15:34:41 PDT
Thanks Kimmo. Yes, confirming, this was a longstanding bug in the WebGL implementation on iOS. A bug must have also been fixed in ANGLE in the iOS 15.4 release.

https://www.khronos.org/registry/webgl/extensions/EXT_color_buffer_half_float/ is now exposed on iOS devices in both the WebGL 1.0 and 2.0 APIs. Please adjust code to explicitly use 16-bit floating-point textures when available.
Comment 5 Nikita Rokotyan 2022-06-16 23:12:33 PDT
Thanks for the clarification!

Am I right that blending should work with half_float textures on iOS? We did a quick test and was still not working. We can probably create a small example that reproduces the issue.

Just to add a little bit of context: we're using float blending for our force graph simulation algorithm https://cosmograph.app.
Comment 6 Kimmo Kinnunen 2022-06-17 03:13:56 PDT
> Am I right that blending should work with half_float textures on iOS? We did a quick test and was still not working. 

Yes, it should. Note that RGB16F support in WebGL is not universal, so for maximum compatibility, use RGBA16F.

> We can probably create a small example that reproduces the issue.

This would be appreciated, thanks!
Comment 7 Brent Fulgham 2022-06-23 11:28:18 PDT
Resolving based on Kimmo and Kenneth's statements.