[webkit-changes] [WebKit/WebKit] 13571d: [WebGL] Use shmem for getBufferSubData over 64 KB

Dan Glastonbury noreply at github.com
Tue Jun 18 21:23:24 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 13571d41220ab567f2f19ebf40c417f4d1b26e06
      https://github.com/WebKit/WebKit/commit/13571d41220ab567f2f19ebf40c417f4d1b26e06
  Author: Dan Glastonbury <djg at apple.com>
  Date:   2024-06-18 (Tue, 18 Jun 2024)

  Changed paths:
    A LayoutTests/fast/canvas/webgl/webgl2-large-getbuffersubdata-expected.txt
    A LayoutTests/fast/canvas/webgl/webgl2-large-getbuffersubdata.html
    M Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp
    M Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.h
    M Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.cpp
    M Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.h
    M Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.messages.in
    M Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGLFunctionsGenerated.h
    M Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp
    M Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h
    M Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp
    M Tools/Scripts/generate-gpup-webgl

  Log Message:
  -----------
  [WebGL] Use shmem for getBufferSubData over 64 KB
https://bugs.webkit.org/show_bug.cgi?id=275472
rdar://129831454

Reviewed by Kimmo Kinnunen.

RemoteGraphicsContextGLProxy::readPixels is optimized to return data transfers
over 64 KB via shared memory. This change implements the same behavior for
RemoteGraphicsContextGLProxy::getBufferSubData, which is a companion to
readPixels, used to transfer texture data via pixel pack buffers.

Tested by webgl2-large-getbuffersubdata.html which exercises fragmented and
unfragmented transfer for both inline and shared memory transfers.

* LayoutTests/fast/canvas/webgl/webgl2-large-getbuffersubdata-expected.txt: Added.
* LayoutTests/fast/canvas/webgl/webgl2-large-getbuffersubdata.html: Added.
* Source/WebCore/platform/SharedMemory.h:
(WebCore::SharedMemory::subspan const):
(WebCore::SharedMemory::mutableSubspan const):
* Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp:
(WebCore::GraphicsContextGLANGLE::getBufferSubDataImpl):
(WebCore::GraphicsContextGLANGLE::getBufferSubData):
(WebCore::GraphicsContextGLANGLE::getBufferSubDataWithStatus):
* Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.h:
* Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.cpp:
(WebKit::RemoteGraphicsContextGL::getBufferSubDataInline):
(WebKit::RemoteGraphicsContextGL::getBufferSubDataSharedMemory):
* Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.h:
* Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.messages.in:
* Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGLFunctionsGenerated.h:
(copyBufferSubData):
(getBufferSubData): Deleted.
* Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:
(WebKit::RemoteGraphicsContextGLProxy::getBufferSubData):
* Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h:
* Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp:
(WebKit::RemoteGraphicsContextGLProxy::getBufferSubData): Deleted.
* Tools/Scripts/generate-gpup-webgl:

Canonical link: https://commits.webkit.org/280157@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list