[webkit-changes] [WebKit/WebKit] 185852: [WebGPU] Reimplement device lost callback after ht...

mwyrzykowski noreply at github.com
Fri Nov 10 05:56:07 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 185852691a2cdac214b142eb06a906453f85e27a
      https://github.com/WebKit/WebKit/commit/185852691a2cdac214b142eb06a906453f85e27a
  Author: Mike Wyrzykowski <mwyrzykowski at apple.com>
  Date:   2023-11-10 (Fri, 10 Nov 2023)

  Changed paths:
    M LayoutTests/http/tests/webgpu/webgpu/api/operation/adapter/requestDevice-expected.txt
    M LayoutTests/http/tests/webgpu/webgpu/api/operation/device/lost-expected.txt
    M LayoutTests/http/tests/webgpu/webgpu/api/validation/state/device_lost/destroy-expected.txt
    M LayoutTests/platform/mac-wk2/TestExpectations
    M Source/WebCore/Modules/WebGPU/GPUAdapter.cpp
    M Source/WebCore/Modules/WebGPU/GPUDevice.cpp
    M Source/WebCore/Modules/WebGPU/Implementation/WebGPUAdapterImpl.cpp
    M Source/WebCore/Modules/WebGPU/Implementation/WebGPUDeviceImpl.cpp
    M Source/WebCore/Modules/WebGPU/Implementation/WebGPUDeviceImpl.h
    M Source/WebCore/Modules/WebGPU/InternalAPI/WebGPUDevice.h
    M Source/WebGPU/WebGPU/Adapter.h
    M Source/WebGPU/WebGPU/Adapter.mm
    M Source/WebGPU/WebGPU/BindGroup.mm
    M Source/WebGPU/WebGPU/BindGroupLayout.mm
    M Source/WebGPU/WebGPU/Buffer.mm
    M Source/WebGPU/WebGPU/CommandEncoder.mm
    M Source/WebGPU/WebGPU/ComputePipeline.mm
    M Source/WebGPU/WebGPU/Device.h
    M Source/WebGPU/WebGPU/Device.mm
    M Source/WebGPU/WebGPU/ExternalTexture.mm
    M Source/WebGPU/WebGPU/PipelineLayout.mm
    M Source/WebGPU/WebGPU/QuerySet.mm
    M Source/WebGPU/WebGPU/RenderBundleEncoder.mm
    M Source/WebGPU/WebGPU/RenderPipeline.mm
    M Source/WebGPU/WebGPU/Sampler.mm
    M Source/WebGPU/WebGPU/ShaderModule.mm
    M Source/WebGPU/WebGPU/Texture.mm
    M Source/WebGPU/WebGPU/WebGPUExt.h
    M Source/WebKit/GPUProcess/graphics/WebGPU/RemoteDevice.cpp
    M Source/WebKit/GPUProcess/graphics/WebGPU/RemoteDevice.h
    M Source/WebKit/GPUProcess/graphics/WebGPU/RemoteDevice.messages.in
    M Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteDeviceProxy.cpp
    M Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteDeviceProxy.h

  Log Message:
  -----------
  [WebGPU] Reimplement device lost callback after https://bugs.webkit.org/show_bug.cgi?id=257640
https://bugs.webkit.org/show_bug.cgi?id=257656
<radar://110539837>

Reviewed by Dan Glastonbury.

Restore the deleted code from https://bugs.webkit.org/show_bug.cgi?id=257640 as it passes
the CTS and conforms to the specification.

Enable newly passing requestDevice.html CTS test.

Also implement the concept of invalid / stale adapters. Effectively, an adapter can only
request one device so make it invalid after the device is requested.

Unexpectedly the device_lost validation CTS test is now passing as well.

* LayoutTests/http/tests/webgpu/webgpu/api/operation/device/lost-expected.txt:
* LayoutTests/http/tests/webgpu/webgpu/api/validation/state/device_lost/destroy-expected.txt:
* LayoutTests/http/tests/webgpu/webgpu/api/operation/adapter/requestDevice-expected.txt:
* LayoutTests/platform/mac-wk2/TestExpectations:
* Source/WebCore/Modules/WebGPU/GPUDevice.cpp:
(WebCore::GPUDevice::lost):
* Source/WebCore/Modules/WebGPU/Implementation/WebGPUAdapterImpl.cpp:
(WebCore::WebGPU::AdapterImpl::requestDevice):
* Source/WebCore/Modules/WebGPU/Implementation/WebGPUDeviceImpl.cpp:
(WebCore::WebGPU::DeviceImpl::resolveDeviceLostPromise):
* Source/WebCore/Modules/WebGPU/Implementation/WebGPUDeviceImpl.h:
* Source/WebCore/Modules/WebGPU/InternalAPI/WebGPUDevice.h:
* Source/WebGPU/WebGPU/Adapter.mm:
(WebGPU::Adapter::requestDevice):
* Source/WebGPU/WebGPU/Device.h:
* Source/WebGPU/WebGPU/Device.mm:
(WebGPU::Device::setDeviceLostCallback):
(wgpuDeviceSetDeviceLostCallback):
(wgpuDeviceSetDeviceLostCallbackWithBlock):
* Source/WebGPU/WebGPU/WebGPUExt.h:
* Source/WebKit/GPUProcess/graphics/WebGPU/RemoteDevice.cpp:
(WebKit::RemoteDevice::resolveDeviceLostPromise):
* Source/WebKit/GPUProcess/graphics/WebGPU/RemoteDevice.h:
* Source/WebKit/GPUProcess/graphics/WebGPU/RemoteDevice.messages.in:
* Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteDeviceProxy.cpp:
(WebKit::WebGPU::RemoteDeviceProxy::resolveDeviceLostPromise):
* Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteDeviceProxy.h:
* LayoutTests/platform/mac-wk2/TestExpectations:
* Source/WebGPU/WebGPU/BindGroup.mm:
(WebGPU::Device::createBindGroup):
* Source/WebGPU/WebGPU/BindGroupLayout.mm:
(WebGPU::Device::createBindGroupLayout):
* Source/WebGPU/WebGPU/Buffer.mm:
(WebGPU::Device::createBuffer):
* Source/WebGPU/WebGPU/CommandEncoder.mm:
(WebGPU::Device::createCommandEncoder):
* Source/WebGPU/WebGPU/ComputePipeline.mm:
(WebGPU::Device::createComputePipelineAsync):
* Source/WebGPU/WebGPU/Device.mm:
(WebGPU::Device::loseTheDevice):
* Source/WebGPU/WebGPU/ExternalTexture.mm:
(WebGPU::Device::createExternalTexture):
* Source/WebGPU/WebGPU/PipelineLayout.mm:
(WebGPU::Device::createPipelineLayout):
* Source/WebGPU/WebGPU/QuerySet.mm:
(WebGPU::Device::createQuerySet):
* Source/WebGPU/WebGPU/RenderBundleEncoder.mm:
(WebGPU::Device::createRenderBundleEncoder):
* Source/WebGPU/WebGPU/RenderPipeline.mm:
(WebGPU::Device::createRenderPipeline):
(WebGPU::Device::createRenderPipelineAsync):
* Source/WebGPU/WebGPU/Sampler.mm:
(WebGPU::Device::createSampler):
* Source/WebGPU/WebGPU/ShaderModule.mm:
(WebGPU::Device::createShaderModule):
* Source/WebGPU/WebGPU/Texture.mm:
(WebGPU::Device::createTexture):

* Source/WebCore/Modules/WebGPU/Implementation/WebGPUAdapterImpl.cpp:

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




More information about the webkit-changes mailing list