<?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>233825</bug_id>
          
          <creation_ts>2021-12-03 10:21:37 -0800</creation_ts>
          <short_desc>https://oskarstalberg.com/Townscaper/ is slower than it should be</short_desc>
          <delta_ts>2021-12-10 10:22:18 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebGL</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>220896</dependson>
          <blocked>223434</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Kimmo Kinnunen">kkinnunen</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>dino</cc>
    
    <cc>geofflang</cc>
    
    <cc>gman</cc>
    
    <cc>jonahr</cc>
    
    <cc>kbr</cc>
    
    <cc>kkinnunen</cc>
    
    <cc>kpiddington</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1820202</commentid>
    <comment_count>0</comment_count>
    <who name="Kimmo Kinnunen">kkinnunen</who>
    <bug_when>2021-12-03 10:21:37 -0800</bug_when>
    <thetext>https://oskarstalberg.com/Townscaper/ is slower than it should be</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1820203</commentid>
    <comment_count>1</comment_count>
    <who name="Kimmo Kinnunen">kkinnunen</who>
    <bug_when>2021-12-03 10:22:11 -0800</bug_when>
    <thetext>Seems to spend most of its time in initialising blited-to textures:
Sample Count, Samples %, Normalized CPU %, Symbol
4981, 17.7%, 3.1%, WebCore::jsWebGL2RenderingContextPrototypeFunction_blitFramebuffer(JSC::JSGlobalObject*, JSC::CallFrame*) (in WebCore)
4981, 17.7%, 3.1%,     WebCore::GraphicsContextGLOpenGL::blitFramebuffer(int, int, int, int, int, int, int, int, unsigned int, unsigned int) (in WebCore)
4981, 17.7%, 3.1%,         gl::BlitFramebuffer(int, int, int, int, int, int, int, int, unsigned int, unsigned int) (in libANGLE-shared.dylib)
4981, 17.7%, 3.1%,             gl::Context::blitFramebuffer(int, int, int, int, int, int, int, int, unsigned int, unsigned int) (in libANGLE-shared.dylib)
4981, 17.7%, 3.1%,                 gl::Context::syncState(angle::IterableBitSet&lt;63ul&gt; const&amp;, angle::BitSetT&lt;12ul, unsigned int, unsigned long&gt; const&amp;, gl::Command) (in libANGLE-shared.dylib)
4952, 17.6%, 3.1%,                     gl::Framebuffer::ensureDrawAttachmentsInitialized(gl::Context const*) (in libANGLE-shared.dylib)
4952, 17.6%, 3.1%,                         gl::(anonymous namespace)::InitAttachment(gl::Context const*, gl::FramebufferAttachment*) (in libANGLE-shared.dylib)
4952, 17.6%, 3.1%,                             gl::FramebufferAttachment::initializeContents(gl::Context const*) (in libANGLE-shared.dylib)
4952, 17.6%, 3.1%,                                 rx::TextureMtl::initializeContents(gl::Context const*, gl::ImageIndex const&amp;) (in libANGLE-shared.dylib)
4930, 17.5%, 3.0%,                                     rx::mtl::InitializeTextureContents(gl::Context const*, std::__1::shared_ptr&lt;rx::mtl::Texture&gt; const&amp;, rx::mtl::Format const&amp;, rx::mtl::ImageNativeIndex const&amp;) (in libANGLE-shared.dylib)
4921, 17.5%, 3.0%,                                         rx::mtl::Texture::replaceRegion(rx::ContextMtl*, MTLRegion const&amp;, gl::LevelIndexWrapper&lt;unsigned int&gt; const&amp;, unsigned int, unsigned char const*, unsigned long, unsigned long) (in libANGLE-shared.dylib)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1820283</commentid>
    <comment_count>2</comment_count>
    <who name="Kenneth Russell">kbr</who>
    <bug_when>2021-12-03 13:06:41 -0800</bug_when>
    <thetext>Wonder whether this may have already been addressed upstream in ANGLE. Let&apos;s let the mega ANGLE upgrade in Bug 220896 land and see whether this still reproduces.

If it hasn&apos;t been, let&apos;s definitely skip initialization when overwriting the complete destination texture. Will that address this issue?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1822786</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-12-10 10:22:18 -0800</bug_when>
    <thetext>&lt;rdar://problem/86328437&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>