Bug 247240
Summary: | Missing WebGL2 extensions EXT_float_blend and EXT_color_buffer_float (on M1 iOS) | ||
---|---|---|---|
Product: | WebKit | Reporter: | Andre van Kammen <andre> |
Component: | ANGLE | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED CONFIGURATION CHANGED | ||
Severity: | Blocker | CC: | dino, djg, joe, kbr, kkinnunen, kpiddington, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | Safari 16 | ||
Hardware: | iPhone / iPad | ||
OS: | iOS 15 |
Andre van Kammen
Hello,
We are writing an application that uses the WebGL2 for handling audio.
It makes use of the Float32 buffer support (EXT_color_buffer_float) in WebGL2 and the ability to have them added with the (EXT_float_blend) function. I could write a workaround for the missing blend by having a shader do the blending, but on the M1 iPad Pro the EXT_color_buffer_float extension is also missing.
https://webglreport.com/?v=2
Can you give me an indication for when or if these extensions will be supported in Safari for iOS?
Friendly greetings,
André van Kammen
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Kenneth Russell
iOS only supported 16-bit floating-point render targets, at least at the time the original WebGL 2.0 support for iOS was added. Your application should be robust and fall back to the use of half-float render targets when that is what's supported:
https://registry.khronos.org/webgl/extensions/EXT_color_buffer_half_float/
Radar WebKit Bug Importer
<rdar://problem/102010491>
Andre van Kammen
Well iOs currently does support 32 bit float buffers, as was also specified on MDN which reports it's supported from Safari 15 on iOS.
https://developer.mozilla.org/en-US/docs/Web/API/EXT_color_buffer_float
I would like to have a robust application, but processing audio with half precision Float16 is not a good fallback because it would seriously impact the audio quality. Especially because the audio goes trough multiple steps including a Fourier transformation and reverse, the inaccuracy would multiply on each step.
It's the EXT_float_blend extension which I'm missing, and i can also write a workaround doing the blend in a shader.
Currently safari on iOS is the only browser not supporting this extension.
https://developer.mozilla.org/en-US/docs/Web/API/EXT_float_blend
MDN specifies it was removed, I was wondering if that was because of the Metal implementation and if it would be reimplemented in a later stage.
So will this function return? If not I will write code to handle the blend in a shader, but after your previous answer I'm getting the idea you want to remove float32 support as wel from Safari on iOS?
Dan Glastonbury
OpenGL & WebGL handling for floating-point formats has been a mess.
Apple family GPUs don't support blending for 128-bit RGBA32F render targets (https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf). The way the EXT_float_blend extension is written is that it enables blending for all the formats listed in EXT_color_buffer_float, including RGBA32F that these hardware families can't support. Incorrectly allowing EXT_float_blend to be enabled has resulted in bugs in WebGL applications.
A new extension would need to be proposed and adopted to allow blending for a subset of the 32-bit floating-point formats.
Joe Pea
I had this problem with an iPhone 14. Not sure how to reproduce atm.
Kimmo Kinnunen
Andre, thank you for the report.
Commenting in case this comes up for other people.
> the M1 iPad Pro the EXT_color_buffer_float extension is also missing.
The extension should be supported on majority of iOS devices, including the M1 iPad Pro.
Would you be able to check which iOS version are you reporting?
Currently at least iOS 16.4 and iOS beta 16.5 do report the EXT_color_buffer_float.
Note:
iOS 16.4 and earlier mistakenly report OES_texture_float_linear. This has been fixed in beta 16.5. The current iOS devices do not implement this.
Current iOS devices do not implement EXT_float_blend.
For linear texture filtering and float blending, EXT_color_buffer_half_float should be used.
Closing as already working.