Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WebGPU] Delete some unnecessary methods from WebGPUExt.h #14651

Conversation

litherum
Copy link
Contributor

@litherum litherum commented Jun 3, 2023

5b9c48e

[WebGPU] Delete some unnecessary methods from WebGPUExt.h
https://bugs.webkit.org/show_bug.cgi?id=257673
rdar://110201177

Reviewed by Mike Wyrzykowski.

The more custom stuff in WebGPUExt.h we have, the more difficult it will be to
swap in and out different WebGPU implementations. We generally want to minimize
the contents of WebGPUExt.h as much as possible.

This patch deletes the fooWithBlock() functions from being exported, in favor of
just using the common function pointer + userdata paradigm instead. This patch
doesn't actually delete the implementation of the fooWithBlock() functions,
because they will probably be useful while implementing
#13849 This patch therefore moves their
declaration to a WebGPUInternal.h file, which is not exported.

* Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.cpp:
(PAL::WebGPU::requestDeviceCallback):
(PAL::WebGPU::AdapterImpl::requestDevice):
* Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUBufferImpl.cpp:
(PAL::WebGPU::mapAsyncCallback):
(PAL::WebGPU::BufferImpl::mapAsync):
* Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUDeviceImpl.cpp:
(PAL::WebGPU::createComputePipelineAsyncCallback):
(PAL::WebGPU::DeviceImpl::createComputePipelineAsync):
(PAL::WebGPU::createRenderPipelineAsyncCallback):
(PAL::WebGPU::DeviceImpl::createRenderPipelineAsync):
(PAL::WebGPU::popErrorScopeCallback):
(PAL::WebGPU::DeviceImpl::popErrorScope):
* Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUImpl.cpp:
(PAL::WebGPU::requestAdapterCallback):
(PAL::WebGPU::GPUImpl::requestAdapter):
* Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUQueueImpl.cpp:
(PAL::WebGPU::onSubmittedWorkDoneCallback):
(PAL::WebGPU::QueueImpl::onSubmittedWorkDone):
* Source/WebGPU/WebGPU/Adapter.mm:
(wgpuAdapterRequestDevice):
(wgpuAdapterRequestDeviceWithBlock): Deleted.
* Source/WebGPU/WebGPU/Buffer.mm:
(wgpuBufferMapAsyncWithBlock): Deleted.
* Source/WebGPU/WebGPU/Device.mm:
(wgpuDeviceCreateComputePipelineAsyncWithBlock): Deleted.
(wgpuDeviceCreateRenderPipelineAsyncWithBlock): Deleted.
(wgpuDevicePopErrorScopeWithBlock): Deleted.
(wgpuDeviceSetUncapturedErrorCallbackWithBlock): Deleted.
* Source/WebGPU/WebGPU/Instance.mm:
(wgpuInstanceRequestAdapter):
(wgpuInstanceRequestAdapterWithBlock): Deleted.
* Source/WebGPU/WebGPU/Queue.mm:
(wgpuQueueOnSubmittedWorkDoneWithBlock): Deleted.
* Source/WebGPU/WebGPU/ShaderModule.mm:
(wgpuShaderModuleGetCompilationInfoWithBlock): Deleted.
* Source/WebGPU/WebGPU/WebGPUExt.h:

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

b44208b

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  wincairo
βœ… πŸ§ͺ bindings βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug βœ… πŸ§ͺ wpe-wk2
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2   πŸ§ͺ api-mac βœ… πŸ›  gtk
βœ… πŸ§ͺ ios-wk2-wpt   πŸ§ͺ mac-wk1   πŸ§ͺ gtk-wk2
βœ… πŸ§ͺ api-ios   πŸ§ͺ mac-wk2 βœ… πŸ§ͺ api-gtk
βœ… πŸ›  tv   πŸ§ͺ mac-AS-debug-wk2
βœ… πŸ›  tv-sim
βœ… πŸ›  πŸ§ͺ merge βœ… πŸ›  watch
βœ… πŸ›  watch-sim

@litherum litherum self-assigned this Jun 3, 2023
@litherum litherum added the WebGPU For bugs in WebGPU label Jun 3, 2023
@litherum litherum force-pushed the eng/WebGPU-Delete-some-unnecessary-methods-from-WebGPUExt-h branch from 4a74608 to ab62dc0 Compare June 3, 2023 06:17
@litherum litherum force-pushed the eng/WebGPU-Delete-some-unnecessary-methods-from-WebGPUExt-h branch from ab62dc0 to 6fb03f6 Compare June 3, 2023 08:03
@litherum litherum force-pushed the eng/WebGPU-Delete-some-unnecessary-methods-from-WebGPUExt-h branch from 6fb03f6 to 1664319 Compare June 3, 2023 08:05
@litherum litherum added the merge-queue Applied to send a pull request to merge-queue label Jun 6, 2023
@webkit-commit-queue webkit-commit-queue force-pushed the eng/WebGPU-Delete-some-unnecessary-methods-from-WebGPUExt-h branch from 1664319 to a156035 Compare June 6, 2023 02:25
@litherum litherum removed the merge-queue Applied to send a pull request to merge-queue label Jun 6, 2023
@litherum litherum force-pushed the eng/WebGPU-Delete-some-unnecessary-methods-from-WebGPUExt-h branch from a156035 to b44208b Compare June 6, 2023 06:55
@litherum litherum added the merge-queue Applied to send a pull request to merge-queue label Jun 6, 2023
https://bugs.webkit.org/show_bug.cgi?id=257673
rdar://110201177

Reviewed by Mike Wyrzykowski.

The more custom stuff in WebGPUExt.h we have, the more difficult it will be to
swap in and out different WebGPU implementations. We generally want to minimize
the contents of WebGPUExt.h as much as possible.

This patch deletes the fooWithBlock() functions from being exported, in favor of
just using the common function pointer + userdata paradigm instead. This patch
doesn't actually delete the implementation of the fooWithBlock() functions,
because they will probably be useful while implementing
WebKit#13849. This patch therefore moves their
declaration to a WebGPUInternal.h file, which is not exported.

* Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.cpp:
(PAL::WebGPU::requestDeviceCallback):
(PAL::WebGPU::AdapterImpl::requestDevice):
* Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUBufferImpl.cpp:
(PAL::WebGPU::mapAsyncCallback):
(PAL::WebGPU::BufferImpl::mapAsync):
* Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUDeviceImpl.cpp:
(PAL::WebGPU::createComputePipelineAsyncCallback):
(PAL::WebGPU::DeviceImpl::createComputePipelineAsync):
(PAL::WebGPU::createRenderPipelineAsyncCallback):
(PAL::WebGPU::DeviceImpl::createRenderPipelineAsync):
(PAL::WebGPU::popErrorScopeCallback):
(PAL::WebGPU::DeviceImpl::popErrorScope):
* Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUImpl.cpp:
(PAL::WebGPU::requestAdapterCallback):
(PAL::WebGPU::GPUImpl::requestAdapter):
* Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUQueueImpl.cpp:
(PAL::WebGPU::onSubmittedWorkDoneCallback):
(PAL::WebGPU::QueueImpl::onSubmittedWorkDone):
* Source/WebGPU/WebGPU/Adapter.mm:
(wgpuAdapterRequestDevice):
(wgpuAdapterRequestDeviceWithBlock): Deleted.
* Source/WebGPU/WebGPU/Buffer.mm:
(wgpuBufferMapAsyncWithBlock): Deleted.
* Source/WebGPU/WebGPU/Device.mm:
(wgpuDeviceCreateComputePipelineAsyncWithBlock): Deleted.
(wgpuDeviceCreateRenderPipelineAsyncWithBlock): Deleted.
(wgpuDevicePopErrorScopeWithBlock): Deleted.
(wgpuDeviceSetUncapturedErrorCallbackWithBlock): Deleted.
* Source/WebGPU/WebGPU/Instance.mm:
(wgpuInstanceRequestAdapter):
(wgpuInstanceRequestAdapterWithBlock): Deleted.
* Source/WebGPU/WebGPU/Queue.mm:
(wgpuQueueOnSubmittedWorkDoneWithBlock): Deleted.
* Source/WebGPU/WebGPU/ShaderModule.mm:
(wgpuShaderModuleGetCompilationInfoWithBlock): Deleted.
* Source/WebGPU/WebGPU/WebGPUExt.h:

Canonical link: https://commits.webkit.org/264893@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/WebGPU-Delete-some-unnecessary-methods-from-WebGPUExt-h branch from b44208b to 5b9c48e Compare June 6, 2023 07:36
@webkit-commit-queue
Copy link
Collaborator

Committed 264893@main (5b9c48e): https://commits.webkit.org/264893@main

Reviewed commits have been landed. Closing PR #14651 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 5b9c48e into WebKit:main Jun 6, 2023
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WebGPU For bugs in WebGPU
Projects
None yet
4 participants