[Webkit-unassigned] [Bug 244172] New: WebGL performance issue. <10fps for simple shader. Resolves with tiny tweaks to shader

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Aug 21 13:04:29 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=244172

            Bug ID: 244172
           Summary: WebGL performance issue. <10fps for simple shader.
                    Resolves with tiny tweaks to shader
           Product: WebKit
           Version: Other
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebGL
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: Ian.kettlewell at gmail.com
                CC: dino at apple.com, kbr at google.com, kkinnunen at apple.com

Created attachment 461779

  --> https://bugs.webkit.org/attachment.cgi?id=461779&action=review

A minimal index.html that reproduces the performance issue

Attached is an ~160 line index.html / shader that contains a reduced self-contained example of a performance issue with Safari WebGL2.

The original context where I discovered this bug is within rendering code with visuals, but in the process of reducing the repro case the visuals were removed.

When viewing this page the canvas will remain black but Safari will become extremely laggy.

Chrome and Firefox run this page at 60fps.

There are three comments in the shader that begin with "NOTE: " and call out locations
where the shader can be slightly tweaked to increase performance to 60fps. 

The most interesting (to me) tweak that improves performance is simply changing the for loop from
 `for (int i = 0; i < 10; i++) {`  to for (int i = 0; i < 9; i++) {` 
makes the page run at 60 fps again.


This repro case was reduced with help from `webgl-capture` (https://github.com/greggman/webgl-capture)

I have tested this exclusively on an M1 Macbook Air. I have tested this is Safari 15.6 and Safari Technology Preview 16.0.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220821/47d5f2ca/attachment-0001.htm>


More information about the webkit-unassigned mailing list