[Webkit-unassigned] [Bug 231354] New: ANGLE Metal RGB textures are slow to initialise compared to RGBA textures when uploading video contents

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 7 04:11:39 PDT 2021


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

            Bug ID: 231354
           Summary: ANGLE Metal RGB textures are slow to initialise
                    compared to RGBA textures when uploading video
                    contents
           Product: WebKit
           Version: WebKit Local Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: ANGLE
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: kkinnunen at apple.com
                CC: dino at apple.com, kbr at google.com, kkinnunen at apple.com,
                    kpiddington at apple.com
            Blocks: 231031

ANGLE Metal RGB textures are slow to initialise compared to RGBA textures

The emulated alpha channel forces very slow path for textures that are initialized as undefined.

This causes very slow video texture uploads, 1ms vs 5ms on macOS Intel.
Video textures allocate texture memory via texImage2D(.., nullptr) and then fully draw over it with a FBO draw.



Sample Count, Samples %, Normalized CPU %, Symbol

1426, 23.6%, 2.0%,         WebCore::GraphicsContextGLOpenGL::copyTextureFromMedia(WebCore::MediaPlayer&, unsigned int, unsigned int, int, unsigned int, unsigned int, unsigned int, bool, bool) (in WebCore)
1287, 21.3%, 1.8%,             WebCore::GraphicsContextGLCVANGLE::copyPixelBufferToTexture(__CVBuffer*, unsigned int, int, unsigned int, unsigned int, unsigned int, WebCore::GraphicsContextGL::FlipY) (in WebCore)
1287, 21.3%, 1.8%,                 WebCore::GraphicsContextGLOpenGL::texImage2DDirect(unsigned int, int, unsigned int, int, int, int, unsigned int, unsigned int, void const*) (in WebCore)
1287, 21.3%, 1.8%,                     gl::TexImage2D(unsigned int, int, int, int, int, int, unsigned int, unsigned int, void const*) (in libANGLE-shared.dylib)
1287, 21.3%, 1.8%,                         gl::Context::texImage2D(gl::TextureTarget, int, int, int, int, int, unsigned int, unsigned int, void const*) (in libANGLE-shared.dylib)
1285, 21.3%, 1.8%,                             gl::Texture::setImage(gl::Context*, gl::PixelUnpackState const&, gl::Buffer*, gl::TextureTarget, int, unsigned int, gl::Extents const&, unsigned int, unsigned int, unsigned char const*) (in libANGLE-shared.dylib)
1283, 21.3%, 1.8%,                                 rx::TextureMtl::setImageImpl(gl::Context const*, gl::ImageIndex const&, gl::InternalFormat const&, gl::Extents const&, unsigned int, unsigned int, gl::PixelUnpackState const&, gl::Buffer*, unsigned char const*) (in libANGLE-shared.dylib)
1282, 21.3%, 1.8%,                                     rx::TextureMtl::redefineImage(gl::Context const*, gl::ImageIndex const&, rx::mtl::Format const&, gl::Extents const&) (in libANGLE-shared.dylib)
1272, 21.1%, 1.8%,                                         rx::TextureMtl::checkForEmulatedChannels(gl::Context const*, rx::mtl::Format const&, std::__1::shared_ptr<rx::mtl::Texture> const&) (in libANGLE-shared.dylib)
1233, 20.4%, 1.7%,                                             rx::mtl::InitializeTextureContents(gl::Context const*, std::__1::shared_ptr<rx::mtl::Texture> const&, rx::mtl::Format const&, rx::mtl::ImageNativeIndex const&) (in libANGLE-shared.dylib)
1029, 17.1%, 1.4%,                                                 rx::mtl::Texture::replaceRegion(rx::ContextMtl*, MTLRegion const&, gl::LevelIndexWrapper<unsigned int> const&, unsigned int, unsigned char const*, unsigned long, unsigned long) (in libANGLE-shared.dylib)


Referenced Bugs:

https://bugs.webkit.org/show_bug.cgi?id=231031
[Bug 231031] REGRESSION (Safari 15): WebGL Video Texture Performance Regression - Looks GPU-process related
-- 
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/20211007/dc9b9ce5/attachment.htm>


More information about the webkit-unassigned mailing list