Bug 251506

Summary: WebGL in <iframe> is very slow with Metal
Product: WebKit Reporter: Marcin <msokalski>
Component: WebGLAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: dino, kbr, kkinnunen
Priority: P2    
Version: Safari 16   
Hardware: iPhone / iPad   
OS: iOS 16   

Description Marcin 2023-02-01 04:37:53 PST
WebGL in <iframe> is very slow with Metal backend enabled.

- Disabling Metal backend solves the problem.

- I've tried limiting resolution to the minimum 160x90, but it does not help.

- I've observed massive battery drain, so it is probably not just Safari is throttling the RAF inside iframe.
Comment 1 Kimmo Kinnunen 2023-02-01 06:38:33 PST
Thanks for the report. If you have set of .html files for a simple repro, that would be very helpful.
Comment 2 Marcin 2023-02-01 08:07:01 PST
My mistake Kimmo. While preparing the test files for you, I realized that I am using flat variables in the shaders (inside the test iframe). The slowdown has nothing to do with iframes but with https://bugs.webkit.org/show_bug.cgi?id=246335

I apologize for submitting this false report.
Comment 3 Kimmo Kinnunen 2023-02-01 23:10:14 PST
Thanks for letting us know.
Once bug 251259 ships, many algorithms using flat shading can use provoking vertex extension to select the most performant configuration for particular platform.

*** This bug has been marked as a duplicate of bug 246335 ***