<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>301627</bug_id>
          
          <creation_ts>2025-10-29 08:14:16 -0700</creation_ts>
          <short_desc>[WebGPU] Canvas flickers while rendering WebGPU game</short_desc>
          <delta_ts>2026-03-26 09:51:20 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebGPU</component>
          <version>Safari 26</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 26</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>302711</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Blocker</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ashley Gullen">ashley</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>drew</cc>
    
    <cc>lingcherd_ho</cc>
    
    <cc>mwyrzykowski</cc>
    
    <cc>tzagallo</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2154967</commentid>
    <comment_count>0</comment_count>
    <who name="Ashley Gullen">ashley</who>
    <bug_when>2025-10-29 08:14:16 -0700</bug_when>
    <thetext>Safari on iOS 26 adds support for WebGPU. We now use this in our browser-based game engine Construct (https://www.construct.net). However whe rendering with WebGPU, the canvas appears to flicker, as if it is becoming invisible for some frames. This makes WebGPU unusable in Safari.

Reproduction links:

WebGPU demo: https://downloads.scirra.com/labs/bugs/flying-along/webgpu/
WebGL demo: https://downloads.scirra.com/labs/bugs/flying-along/webgl/

Just tap and hold to move the pig. Observe the rendering. Try starting in portrait orientation.

Expected result: Smooth rendering with WebGPU as it does with WebGL.
Observed result: when using WebGPU only, the entire canvas flickers. Sometimes it settles down after a few seconds and stops, but in other cases it flickers continuously. If it settles down, reloading the page usually reproduces it again.

This reproduces in Safari on iOS 26.0.1 on an iPhone 12 Pro Max.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2154987</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2025-10-29 09:27:19 -0700</bug_when>
    <thetext>&lt;rdar://problem/163647932&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2154988</commentid>
    <comment_count>2</comment_count>
    <who name="Mike Wyrzykowski">mwyrzykowski</who>
    <bug_when>2025-10-29 09:28:12 -0700</bug_when>
    <thetext>Seems ok on Safari Technology Preview 230. Going to check on iPhone</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2154989</commentid>
    <comment_count>3</comment_count>
    <who name="Mike Wyrzykowski">mwyrzykowski</who>
    <bug_when>2025-10-29 09:29:43 -0700</bug_when>
    <thetext>Reproduces on iPhone</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2154990</commentid>
    <comment_count>4</comment_count>
    <who name="Mike Wyrzykowski">mwyrzykowski</who>
    <bug_when>2025-10-29 09:29:54 -0700</bug_when>
    <thetext>going to try with ToT WebKit</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2155003</commentid>
    <comment_count>5</comment_count>
    <who name="Mike Wyrzykowski">mwyrzykowski</who>
    <bug_when>2025-10-29 10:02:26 -0700</bug_when>
    <thetext>This seems fixed on ToT WebKit</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2155004</commentid>
    <comment_count>6</comment_count>
    <who name="Mike Wyrzykowski">mwyrzykowski</who>
    <bug_when>2025-10-29 10:03:00 -0700</bug_when>
    <thetext>Possibly fixed by https://commits.webkit.org/302128@main</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2155005</commentid>
    <comment_count>7</comment_count>
    <who name="Mike Wyrzykowski">mwyrzykowski</who>
    <bug_when>2025-10-29 10:03:22 -0700</bug_when>
    <thetext>Going to confirm that was the commit which fixed the issue</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2155034</commentid>
    <comment_count>8</comment_count>
    <who name="Mike Wyrzykowski">mwyrzykowski</who>
    <bug_when>2025-10-29 11:21:30 -0700</bug_when>
    <thetext>I can still reproduce on 302212@main so I don&apos;t think its related</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2167767</commentid>
    <comment_count>9</comment_count>
    <who name="">drew</who>
    <bug_when>2025-12-22 07:07:38 -0800</bug_when>
    <thetext>When I encountered the same problem on a different engine, I eventually uncovered two causes.  May not be your particular causes, but typical &quot;why does my custom engine flicker only on Safari&quot; problems.

1.  requestAnimationFrame.  In particular, you want to a) call it at all, b) inside that callback produce a frame synchronously, which can be nontrivial to do with async WebGPU APIs, c) profile your calls and callbacks to ensure you&apos;re not encountering queueing delay, d) but also expect pretty much fixed 16ms vsync delay on WebKit.
2.  The callback GPUQueue: onSubmittedWorkDone() arrives for me in roughly 32ms (2 v-sycs) which tends to be later than some other browsers.  If you are like me and ran the napkin math on &quot;obviously we can do a trivial GPU pass in a few ms) you may want to consider if this is the source of the flicker.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2170216</commentid>
    <comment_count>10</comment_count>
    <who name="Ashley Gullen">ashley</who>
    <bug_when>2026-01-08 03:32:58 -0800</bug_when>
    <thetext>This issue still reproduces for me in Safari 26.2. It makes WebGPU completely unusable, and so we&apos;re going to have to disable WebGPU entirely on iOS and fall back to WebGL rendering only for the time being.

FWIW our engine does already synchronously render in requestAnimationFrame and does not rely on onSubmittedWorkDone.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2170217</commentid>
    <comment_count>11</comment_count>
    <who name="Ashley Gullen">ashley</who>
    <bug_when>2026-01-08 03:37:48 -0800</bug_when>
    <thetext>It looks like the issue also reproduces in Safari 26.2 on macOS, which means WebGPU is currently completely unusable for us on all Apple platforms.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2170221</commentid>
    <comment_count>12</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2026-01-08 03:41:20 -0800</bug_when>
    <thetext>(In reply to Ashley Gullen from comment #11)
&gt; It looks like the issue also reproduces in Safari 26.2 on macOS, which means
&gt; WebGPU is currently completely unusable for us on all Apple platforms.

Can you share macOS hardware details? Apple Silicon M1 etc? It would be good to know.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2170307</commentid>
    <comment_count>13</comment_count>
    <who name="Mike Wyrzykowski">mwyrzykowski</who>
    <bug_when>2026-01-08 08:43:09 -0800</bug_when>
    <thetext>This might be fixed on WebKit main. I don’t reproduce on my iPhone Air with ToT WebKit when viewing https://downloads.scirra.com/labs/bugs/flying-along/webgpu/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2170308</commentid>
    <comment_count>14</comment_count>
    <who name="Mike Wyrzykowski">mwyrzykowski</who>
    <bug_when>2026-01-08 08:43:26 -0800</bug_when>
    <thetext>Going to try some other devices to be sure</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2170328</commentid>
    <comment_count>15</comment_count>
    <who name="Mike Wyrzykowski">mwyrzykowski</who>
    <bug_when>2026-01-08 09:39:37 -0800</bug_when>
    <thetext>I’m able to reproduce on an iPhone 13 Mini on shipping iOS 26.2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2170352</commentid>
    <comment_count>16</comment_count>
    <who name="Mike Wyrzykowski">mwyrzykowski</who>
    <bug_when>2026-01-08 11:07:47 -0800</bug_when>
    <thetext>Installing ToT webkit on the iPhone 13 mini and I don&apos;t reproduce. 

To fully close out this bug we should bisect from 26.2 and dupe to the change which resolved this</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2170380</commentid>
    <comment_count>18</comment_count>
    <who name="Mike Wyrzykowski">mwyrzykowski</who>
    <bug_when>2026-01-08 12:26:39 -0800</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 302711 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2181279</commentid>
    <comment_count>19</comment_count>
    <who name="Ashley Gullen">ashley</who>
    <bug_when>2026-02-13 07:04:06 -0800</bug_when>
    <thetext>This still reproduces for me on macOS, iPadOS and iOS 26.3. I don&apos;t know if the fix  for this is meant to be in that release. Should I file a new issue?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2181361</commentid>
    <comment_count>20</comment_count>
    <who name="Mike Wyrzykowski">mwyrzykowski</who>
    <bug_when>2026-02-13 09:59:01 -0800</bug_when>
    <thetext>Sorry my wording was potentially confusing. 

There was a bug fix after 26.2 https://bugs.webkit.org/show_bug.cgi?id=302711 which addressed this. 

It is only in STP right now. I will update you when it’s in a public beta of iOS.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2182126</commentid>
    <comment_count>21</comment_count>
    <who name="Mike Wyrzykowski">mwyrzykowski</who>
    <bug_when>2026-02-16 10:57:13 -0800</bug_when>
    <thetext>Thanks again for the bug report, I just wanted to let you know this should be resolved in beta 1 of iOS 26.4 which is now available to developers.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2193984</commentid>
    <comment_count>22</comment_count>
    <who name="Ashley Gullen">ashley</who>
    <bug_when>2026-03-26 09:49:34 -0700</bug_when>
    <thetext>Looks like it&apos;s working correctly in Safari 26.4 now. Thanks for the fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2193985</commentid>
    <comment_count>23</comment_count>
    <who name="Mike Wyrzykowski">mwyrzykowski</who>
    <bug_when>2026-03-26 09:51:20 -0700</bug_when>
    <thetext>That’s great! Thank you for confirming</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>