Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: df309938f9794af725883822f477336fa36993f0
      
https://github.com/WebKit/WebKit/commit/df309938f9794af725883822f477336fa36993f0
  Author: Mike Wyrzykowski <[email protected]>
  Date:   2024-08-23 (Fri, 23 Aug 2024)

  Changed paths:
    A LayoutTests/fast/webgpu/nocrash/fuzz-278545-expected.txt
    A LayoutTests/fast/webgpu/nocrash/fuzz-278545.html
    M 
Source/WebCore/Modules/WebGPU/Implementation/WebGPUCompositorIntegrationImpl.cpp
    M 
Source/WebCore/Modules/WebGPU/Implementation/WebGPUPresentationContextImpl.cpp
    M 
Source/WebCore/Modules/WebGPU/Implementation/WebGPUPresentationContextImpl.h
    M Source/WebCore/Modules/WebGPU/InternalAPI/WebGPUPresentationContext.h
    M Source/WebGPU/WebGPU/CommandBuffer.h
    M Source/WebGPU/WebGPU/CommandBuffer.mm
    M Source/WebGPU/WebGPU/CommandEncoder.h
    M Source/WebGPU/WebGPU/CommandEncoder.mm
    M Source/WebGPU/WebGPU/PresentationContext.h
    M Source/WebGPU/WebGPU/PresentationContext.mm
    M Source/WebGPU/WebGPU/PresentationContextIOSurface.h
    M Source/WebGPU/WebGPU/PresentationContextIOSurface.mm
    M Source/WebGPU/WebGPU/Texture.h
    M Source/WebGPU/WebGPU/Texture.mm
    M Source/WebGPU/WebGPU/WebGPUExt.h
    M 
Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemotePresentationContextProxy.cpp
    M 
Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemotePresentationContextProxy.h

  Log Message:
  -----------
  [WebGPU] GPUCanvasContext.surfaceBufferToImageBuffer doesn't handle failure 
when work is not submitted correctly
https://bugs.webkit.org/show_bug.cgi?id=278545
rdar://133539413

Reviewed by Dan Glastonbury.

Removing the semaphore is problematic because we never return to the offscreen 
canvas call
if the work is never submitted to the WebGPU::Queue. A prior attempt to do that 
in 281449@main
was reverted due to causing a regression when work was never submitted.

Instead, if the semaphore times out, we can signal to the offscreen canvas that 
the call failed.

We were not previously handling the semaphore timeout which seems like the 
potential cause of
this issue.

* LayoutTests/fast/webgpu/nocrash/fuzz-278545-expected.txt: Added.
* LayoutTests/fast/webgpu/nocrash/fuzz-278545.html: Added.
Add regression test.

* 
Source/WebCore/Modules/WebGPU/Implementation/WebGPUCompositorIntegrationImpl.cpp:
(WebCore::WebGPU::CompositorIntegrationImpl::withDisplayBufferAsNativeImage):
* 
Source/WebCore/Modules/WebGPU/Implementation/WebGPUPresentationContextImpl.cpp:
(WebCore::WebGPU::PresentationContextImpl::getMetalTextureAsNativeImage):
* Source/WebCore/Modules/WebGPU/Implementation/WebGPUPresentationContextImpl.h:
* Source/WebCore/Modules/WebGPU/InternalAPI/WebGPUPresentationContext.h:
* Source/WebGPU/WebGPU/CommandBuffer.h:
* Source/WebGPU/WebGPU/CommandBuffer.mm:
(WebGPU::CommandBuffer::waitForCompletion):
* Source/WebGPU/WebGPU/CommandEncoder.h:
* Source/WebGPU/WebGPU/CommandEncoder.mm:
(WebGPU::CommandEncoder::waitForCommandBufferCompletion):
* Source/WebGPU/WebGPU/PresentationContext.h:
(WebGPU::PresentationContext::getTextureAsNativeImage):
* Source/WebGPU/WebGPU/PresentationContext.mm:
(wgpuSwapChainGetTextureAsNativeImage):
* Source/WebGPU/WebGPU/PresentationContextIOSurface.h:
* Source/WebGPU/WebGPU/PresentationContextIOSurface.mm:
(WebGPU::PresentationContextIOSurface::getTextureAsNativeImage):
* Source/WebGPU/WebGPU/Texture.h:
* Source/WebGPU/WebGPU/Texture.mm:
(WebGPU::Texture::waitForCommandBufferCompletion):
* Source/WebGPU/WebGPU/WebGPUExt.h:
* 
Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemotePresentationContextProxy.cpp:
(WebKit::WebGPU::RemotePresentationContextProxy::getMetalTextureAsNativeImage):
* Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemotePresentationContextProxy.h:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to