[webkit-changes] [WebKit/WebKit] 3180ee: GPUP WebGL resource creation functions are slow

Kimmo Kinnunen noreply at github.com
Wed Mar 27 00:24:43 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3180ee0bf2d7f95d1d938b55546a3ef50eb2b9b6
      https://github.com/WebKit/WebKit/commit/3180ee0bf2d7f95d1d938b55546a3ef50eb2b9b6
  Author: Kimmo Kinnunen <kkinnunen at apple.com>
  Date:   2024-03-27 (Wed, 27 Mar 2024)

  Changed paths:
    M LayoutTests/inspector/canvas/recording-offscreen-webgl-full-expected.txt
    M LayoutTests/inspector/canvas/recording-webgl-full-expected.txt
    A LayoutTests/platform/mac-monterey-wk2/inspector/canvas/recording-offscreen-webgl-expected.txt
    A LayoutTests/platform/mac-monterey-wk2/inspector/canvas/recording-offscreen-webgl-full-expected.txt
    A LayoutTests/platform/mac-monterey-wk2/inspector/canvas/recording-webgl-full-expected.txt
    M Source/WebCore/platform/graphics/GraphicsContextGL.h
    M Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp
    M Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.h
    M Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.h
    M Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.messages.in
    M Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGLCocoa.cpp
    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:
  -----------
  GPUP WebGL resource creation functions are slow
https://bugs.webkit.org/show_bug.cgi?id=271461
rdar://problem/125232933

Reviewed by Dan Glastonbury.

Make the WP side allocate the name directly and send it to GPUP side.
Build a mapping WP names -> GL names in the RemoteGraphicsContextGL in
GPUP side.

Currently all object types share the namespace and all names are in the
same map.

Avoids blocking the WP for just creating WebGL objects like textures
or FBOs.

* Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.h:
* Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.messages.in:
* Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGLFunctionsGenerated.h:
(attachShader):
(bindAttribLocation):
(bindBuffer):
(bindFramebuffer):
(bindRenderbuffer):
(bindTexture):
(checkFramebufferStatus):
(compileShader):
(createBuffer):
(createFramebuffer):
(createProgram):
(createRenderbuffer):
(createShader):
(createTexture):
(deleteBuffer):
(deleteFramebuffer):
(deleteProgram):
(deleteRenderbuffer):
(deleteShader):
(deleteTexture):
(detachShader):
(framebufferRenderbuffer):
(framebufferTexture2D):
(getActiveAttrib):
(getActiveUniform):
(getAttribLocation):
(getBufferParameteri):
(getString):
(getFloatv):
(getIntegerv):
(getIntegeri_v):
(getInteger64):
(getInteger64i):
(getProgrami):
(getBooleanv):
(getFramebufferAttachmentParameteri):
(getProgramInfoLog):
(getRenderbufferParameteri):
(getShaderi):
(getShaderInfoLog):
(getShaderPrecisionFormat):
(getShaderSource):
(getTexParameterf):
(getTexParameteri):
(getUniformfv):
(getUniformiv):
(getUniformuiv):
(getUniformLocation):
(getVertexAttribOffset):
(isBuffer):
(isEnabled):
(isFramebuffer):
(isProgram):
(isRenderbuffer):
(isShader):
(isTexture):
(linkProgram):
(shaderSource):
(useProgram):
(validateProgram):
(createVertexArray):
(deleteVertexArray):
(isVertexArray):
(bindVertexArray):
(getBufferSubData):
(framebufferTextureLayer):
(getFragDataLocation):
(createQuery):
(deleteQuery):
(isQuery):
(beginQuery):
(getQuery):
(getQueryObjectui):
(createSampler):
(deleteSampler):
(isSampler):
(bindSampler):
(samplerParameteri):
(samplerParameterf):
(getSamplerParameterf):
(getSamplerParameteri):
(fenceSync):
(isSync):
(clientWaitSync):
(getSynci):
(createTransformFeedback):
(deleteTransformFeedback):
(isTransformFeedback):
(bindTransformFeedback):
(transformFeedbackVaryings):
(getTransformFeedbackVarying):
(bindBufferBase):
(bindBufferRange):
(getUniformIndices):
(getActiveUniforms):
(getUniformBlockIndex):
(getActiveUniformBlockName):
(uniformBlockBinding):
(getActiveUniformBlockiv):
(getTranslatedShaderSourceANGLE):
(createQueryEXT):
(deleteQueryEXT):
(isQueryEXT):
(beginQueryEXT):
(queryCounterEXT):
(getQueryiEXT):
(getQueryObjectiEXT):
(getQueryObjectui64EXT):
(getInteger64EXT):
(getInternalformativ):
(drawingBufferToPixelBuffer):
(enableRequiredWebXRExtensions):
* Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:
(WebKit::RemoteGraphicsContextGLProxy::createObjectName):
* Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h:
* Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp:
(WebKit::RemoteGraphicsContextGLProxy::createBuffer):
(WebKit::RemoteGraphicsContextGLProxy::createFramebuffer):
(WebKit::RemoteGraphicsContextGLProxy::createProgram):
(WebKit::RemoteGraphicsContextGLProxy::createRenderbuffer):
(WebKit::RemoteGraphicsContextGLProxy::createShader):
(WebKit::RemoteGraphicsContextGLProxy::createTexture):
(WebKit::RemoteGraphicsContextGLProxy::createVertexArray):
(WebKit::RemoteGraphicsContextGLProxy::createQuery):
(WebKit::RemoteGraphicsContextGLProxy::createSampler):
(WebKit::RemoteGraphicsContextGLProxy::createTransformFeedback):
(WebKit::RemoteGraphicsContextGLProxy::createQueryEXT):
* Tools/Scripts/generate-gpup-webgl:
(webkit_ipc_msg_name):
(to_variable_name):
(to_member_variable_name):
(is_create_func):
(get_create_func_object_name):
(is_delete_func):
(get_delete_func_object_name):
(webkit_ipc_msg.__init__):
(webkit_ipc_cpp_proxy_impl):
(webkit_ipc_cpp_proxy_impl.__init__):
(webkit_ipc_cpp_proxy_impl.process_call):
(webkit_ipc_cpp_proxy_impl.process_in_args):
(webkit_ipc_cpp_proxy_impl.process_return_value):
(webkit_ipc_cpp_impl.__init__):
(webkit_ipc_cpp_impl.process_args):
(process_in_arg):
(process_return_value):
(main):
(webkit_ipc_cpp_impl.process_in_arg): Deleted.
(webkit_ipc_cpp_impl.process_out_arg): Deleted.
(webkit_ipc_cpp_impl.process_return_value): Deleted.
(webkit_ipc_cpp_impl.__str__): Deleted.
(webkit_ipc_cpp_impl.ns): Deleted.

Canonical link: https://commits.webkit.org/276725@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