[webkit-changes] [WebKit/WebKit] 442fab: [WebGPU] present() needs to wait for all command b...

Myles C. Maxfield noreply at github.com
Mon Feb 6 13:53:35 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 442fabee7226138865b76fc2efded6e4aa4e4a90
      https://github.com/WebKit/WebKit/commit/442fabee7226138865b76fc2efded6e4aa4e4a90
  Author: Myles C. Maxfield <mmaxfield at apple.com>
  Date:   2023-02-06 (Mon, 06 Feb 2023)

  Changed paths:
    M Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUCompositorIntegrationImpl.cpp
    M Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUCompositorIntegrationImpl.h
    M Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUImpl.cpp
    M Source/WebGPU/WebGPU/PresentationContextIOSurface.h
    M Source/WebGPU/WebGPU/PresentationContextIOSurface.mm
    M Source/WebGPU/WebGPU/Queue.h
    M Source/WebGPU/WebGPU/Queue.mm
    M Source/WebGPU/WebGPU/WebGPUExt.h
    M Source/WebKit/GPUProcess/graphics/WebGPU/RemoteCompositorIntegration.messages.in

  Log Message:
  -----------
  [WebGPU] present() needs to wait for all command buffers to be scheduled
https://bugs.webkit.org/show_bug.cgi?id=250993
rdar://104538554

Reviewed by Dean Jackson.

We already had a callback set up in prepareForDisplay(). All we need to do is plumb that through to
WebGPU::Queue, and use the same kind of infrastructure that we already have for onSubmittedWorkDone(),
but for onSubmittedWorkScheduled().

* Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUCompositorIntegrationImpl.cpp:
(PAL::WebGPU::CompositorIntegrationImpl::prepareForDisplay):
* Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUCompositorIntegrationImpl.h:
* Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUImpl.cpp:
(PAL::WebGPU::WTF::Function<void):
(PAL::WebGPU::GPUImpl::createPresentationContext):
* Source/WebGPU/WebGPU/PresentationContextIOSurface.h:
* Source/WebGPU/WebGPU/PresentationContextIOSurface.mm:
(WebGPU::PresentationContextIOSurface::create):
(WebGPU::PresentationContextIOSurface::onSubmittedWorkScheduled):
(WebGPU::PresentationContextIOSurface::configure):
(WebGPU::PresentationContextIOSurface::unconfigure):
* Source/WebGPU/WebGPU/Queue.h:
(WebGPU::Queue::isSchedulingIdle const):
* Source/WebGPU/WebGPU/Queue.mm:
(WebGPU::Queue::onSubmittedWorkScheduled):
(WebGPU::Queue::commitMTLCommandBuffer):
* Source/WebGPU/WebGPU/WebGPUExt.h:
* Source/WebKit/GPUProcess/graphics/WebGPU/RemoteCompositorIntegration.messages.in:

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




More information about the webkit-changes mailing list