⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 285881 in webkit


Ignore:
Timestamp:
Nov 16, 2021, 1:19:35 PM (5 years ago)
Author:
mmaxfield@apple.com
Message:

[WebGPU] Start preparing for serializing commands to the GPU process
https://bugs.webkit.org/show_bug.cgi?id=233179

Reviewed by Alex Christensen.

Source/WebCore/PAL:

Tiny cleanups. Forward-declare things that can be forward declared.

  • pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.h:
  • pal/graphics/WebGPU/WebGPUBindGroupDescriptor.h:
  • pal/graphics/WebGPU/WebGPUBufferBinding.h:
  • pal/graphics/WebGPU/WebGPUComputePassTimestampWrites.h:
  • pal/graphics/WebGPU/WebGPUImageCopyBuffer.h:
  • pal/graphics/WebGPU/WebGPUImageCopyTexture.h:
  • pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h:
  • pal/graphics/WebGPU/WebGPUPipelineLayoutDescriptor.h:
  • pal/graphics/WebGPU/WebGPUProgrammableStage.h:
  • pal/graphics/WebGPU/WebGPURenderPassColorAttachment.h:
  • pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h:
  • pal/graphics/WebGPU/WebGPURenderPassTimestampWrites.h:

Source/WebKit:

The interaction between WebGPU and the GPU process will work as such:

  1. We have a virtual interface in PAL which holds 3 things:

a) Refcounted objects (command buffer, queue, device, etc.).
b) Structs holding descriptors for commands. E.g. device.createRenderPipeline(RenderPipelineDescriptor)
c) Enums

The virtual interface holds all 3 of these things. For refcounted objects, it holds virtual interfaces with no
implementations. (There is one implementation of these interfaces which connects them to WebGPU.framework.)

  1. This patch adds a new implementation of these virtual interfaces, called Remote*Proxy, in WebKit/WebProcess/GPU/graphics/WebGPU. The implementation of all the methods in this implementation will simply send messages to the GPU process. In this patch, these methods are still stubs - they'll be filled in in a subsequent patch.
  2. The arguments to the commands consist of the structs and enums from PAL. However, we can't use the structs directly, because the structs hold references to the refcounted objects. E.g. a BindGroupDescriptor holds a reference to the Buffer which should be part of the bind group. We can't send refcounted objects across IPC, so instead of sending the objects, we send a WebGPUIdentifier instead. Every refcounted object gets a unique WebGPU identifier. However, because these references to RefCounted objects are buried deep inside nested structs, we can't simply use the structs out of the box. Instead, we have to have a parallel set of structs, where the references are replaced with WebGPUIdentifiers. These structs will be the ones actually sent across the wire.
  3. The enums don't have this problem, so those are untouched. A subsequent patch will be adding the EnumTraits directly in PAL to make them serializable.
  4. Upon receiving a struct from the wire, we're going to have to convert it back into its corresponding PAL type, which means we have to find the object associated with the WebGPUIdentifier. The serializers themselves can't do this, because they lack the context necessary for performing the lookup. This patch adds two new context objects which we'll use ourselves when implementing our own conversions - ConvertToBackingContext and ConvertFromBackingContext. Only the first one is implemented in this patch; the second will be implemented in a subsequent patch.
  5. The GPU process side won't actually implement the virtual interface - only the web process side will implement it. Instead, the GPU process has to manage lifetime of the objects. Just like how 2D canvas in the GPU process has a RemoteResourceCache, the WebGPU objects will be owned by a high-level object in the GPU process. The ownership will be top-down in the GPU process, where Devices have strong references to Textures, and Textures have strong references to TextureViews. On the other hand, in the Web process, ownership will be bottom-up: JavaScript will have strong references to TextureViews, TextureViews will have strong references to Textures, and Textures will have strong references to Devices. This works out quite nicely - it means that, when GC runs and a TextureView gets deleted, the TextureView tells its owner that it's getting destroyed, its owner sends a message to the GPU process, and the corresponding owner in the GPU process looks up its relevant child in its children list, and delete it. Easy peasy.

No new tests because there is no behavior change (yet). We're getting close, though!

  • Shared/WebGPU/WebGPUBindGroupDescriptor.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBindGroupDescriptor.h.
  • Shared/WebGPU/WebGPUBindGroupEntry.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassColorAttachment.h.
  • Shared/WebGPU/WebGPUBindGroupLayoutDescriptor.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h.
  • Shared/WebGPU/WebGPUBindGroupLayoutEntry.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBufferBinding.h.
  • Shared/WebGPU/WebGPUBlendComponent.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h.
  • Shared/WebGPU/WebGPUBlendState.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h.
  • Shared/WebGPU/WebGPUBufferBinding.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBufferBinding.h.
  • Shared/WebGPU/WebGPUBufferBindingLayout.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h.
  • Shared/WebGPU/WebGPUBufferDescriptor.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h.
  • Shared/WebGPU/WebGPUCanvasConfiguration.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyTexture.h.
  • Shared/WebGPU/WebGPUColor.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h.
  • Shared/WebGPU/WebGPUColorTargetState.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBufferBinding.h.
  • Shared/WebGPU/WebGPUCommandBufferDescriptor.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h.
  • Shared/WebGPU/WebGPUCommandEncoderDescriptor.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h.
  • Shared/WebGPU/WebGPUComputePassDescriptor.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h.
  • Shared/WebGPU/WebGPUComputePassTimestampWrites.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUComputePassTimestampWrites.h.
  • Shared/WebGPU/WebGPUComputePipelineDescriptor.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h.
  • Shared/WebGPU/WebGPUConvertFromBackingContext.h: Added.
  • Shared/WebGPU/WebGPUConvertToBackingContext.h: Added.
  • Shared/WebGPU/WebGPUDepthStencilState.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBufferBinding.h.
  • Shared/WebGPU/WebGPUDeviceDescriptor.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBindGroupDescriptor.h.
  • Shared/WebGPU/WebGPUExtent3D.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassTimestampWrites.h.
  • Shared/WebGPU/WebGPUExternalTextureBindingLayout.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h.
  • Shared/WebGPU/WebGPUExternalTextureDescriptor.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h.
  • Shared/WebGPU/WebGPUFragmentState.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h.
  • Shared/WebGPU/WebGPUIdentifier.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h.
  • Shared/WebGPU/WebGPUImageCopyBuffer.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h.
  • Shared/WebGPU/WebGPUImageCopyExternalImage.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBufferBinding.h.
  • Shared/WebGPU/WebGPUImageCopyTexture.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyTexture.h.
  • Shared/WebGPU/WebGPUImageCopyTextureTagged.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h.
  • Shared/WebGPU/WebGPUImageDataLayout.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBufferBinding.h.
  • Shared/WebGPU/WebGPUMultisampleState.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h.
  • Shared/WebGPU/WebGPUObjectDescriptorBase.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h.
  • Shared/WebGPU/WebGPUOrigin2D.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineLayoutDescriptor.h.
  • Shared/WebGPU/WebGPUOrigin3D.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineLayoutDescriptor.h.
  • Shared/WebGPU/WebGPUPipelineDescriptorBase.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h.
  • Shared/WebGPU/WebGPUPipelineLayoutDescriptor.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineLayoutDescriptor.h.
  • Shared/WebGPU/WebGPUPrimitiveState.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBufferBinding.h.
  • Shared/WebGPU/WebGPUProgrammableStage.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUProgrammableStage.h.
  • Shared/WebGPU/WebGPUQuerySetDescriptor.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBindGroupDescriptor.h.
  • Shared/WebGPU/WebGPURenderBundleDescriptor.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h.
  • Shared/WebGPU/WebGPURenderBundleEncoderDescriptor.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h.
  • Shared/WebGPU/WebGPURenderPassColorAttachment.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassColorAttachment.h.
  • Shared/WebGPU/WebGPURenderPassDepthStencilAttachment.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h.
  • Shared/WebGPU/WebGPURenderPassDescriptor.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineLayoutDescriptor.h.
  • Shared/WebGPU/WebGPURenderPassLayout.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineLayoutDescriptor.h.
  • Shared/WebGPU/WebGPURenderPassTimestampWrites.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassTimestampWrites.h.
  • Shared/WebGPU/WebGPURenderPipelineDescriptor.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBufferBinding.h.
  • Shared/WebGPU/WebGPURequestAdapterOptions.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBufferBinding.h.
  • Shared/WebGPU/WebGPUSamplerBindingLayout.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h.
  • Shared/WebGPU/WebGPUSamplerDescriptor.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h.
  • Shared/WebGPU/WebGPUShaderModuleDescriptor.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h.
  • Shared/WebGPU/WebGPUStencilFaceState.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h.
  • Shared/WebGPU/WebGPUStorageTextureBindingLayout.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h.
  • Shared/WebGPU/WebGPUTextureBindingLayout.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h.
  • Shared/WebGPU/WebGPUTextureDescriptor.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h.
  • Shared/WebGPU/WebGPUTextureViewDescriptor.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h.
  • Shared/WebGPU/WebGPUVertexAttribute.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h.
  • Shared/WebGPU/WebGPUVertexBufferLayout.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineLayoutDescriptor.h.
  • Shared/WebGPU/WebGPUVertexState.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBufferBinding.h.
  • Sources.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/graphics/WebGPU/RemoteAdapterProxy.cpp: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h.

(WebKit::WebGPU::RemoteAdapterProxy::RemoteAdapterProxy):
(WebKit::WebGPU::RemoteAdapterProxy::~RemoteAdapterProxy):
(WebKit::WebGPU::RemoteAdapterProxy::requestDevice):

  • WebProcess/GPU/graphics/WebGPU/RemoteAdapterProxy.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.h.
  • WebProcess/GPU/graphics/WebGPU/RemoteBindGroupLayoutProxy.cpp: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h.

(WebKit::WebGPU::RemoteBindGroupLayoutProxy::RemoteBindGroupLayoutProxy):
(WebKit::WebGPU::RemoteBindGroupLayoutProxy::~RemoteBindGroupLayoutProxy):
(WebKit::WebGPU::RemoteBindGroupLayoutProxy::setLabelInternal):

  • WebProcess/GPU/graphics/WebGPU/RemoteBindGroupLayoutProxy.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.h.
  • WebProcess/GPU/graphics/WebGPU/RemoteBindGroupProxy.cpp: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h.

(WebKit::WebGPU::RemoteBindGroupProxy::RemoteBindGroupProxy):
(WebKit::WebGPU::RemoteBindGroupProxy::~RemoteBindGroupProxy):
(WebKit::WebGPU::RemoteBindGroupProxy::setLabelInternal):

  • WebProcess/GPU/graphics/WebGPU/RemoteBindGroupProxy.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.h.
  • WebProcess/GPU/graphics/WebGPU/RemoteBufferProxy.cpp: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h.

(WebKit::WebGPU::RemoteBufferProxy::RemoteBufferProxy):
(WebKit::WebGPU::RemoteBufferProxy::~RemoteBufferProxy):
(WebKit::WebGPU::RemoteBufferProxy::mapAsync):
(WebKit::WebGPU::RemoteBufferProxy::getMappedRange):
(WebKit::WebGPU::RemoteBufferProxy::unmap):
(WebKit::WebGPU::RemoteBufferProxy::destroy):
(WebKit::WebGPU::RemoteBufferProxy::setLabelInternal):

  • WebProcess/GPU/graphics/WebGPU/RemoteBufferProxy.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.h.
  • WebProcess/GPU/graphics/WebGPU/RemoteCommandBufferProxy.cpp: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h.

(WebKit::WebGPU::RemoteCommandBufferProxy::RemoteCommandBufferProxy):
(WebKit::WebGPU::RemoteCommandBufferProxy::~RemoteCommandBufferProxy):
(WebKit::WebGPU::RemoteCommandBufferProxy::setLabelInternal):

  • WebProcess/GPU/graphics/WebGPU/RemoteCommandBufferProxy.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.h.
  • WebProcess/GPU/graphics/WebGPU/RemoteCommandEncoderProxy.cpp: Added.

(WebKit::WebGPU::RemoteCommandEncoderProxy::RemoteCommandEncoderProxy):
(WebKit::WebGPU::RemoteCommandEncoderProxy::~RemoteCommandEncoderProxy):
(WebKit::WebGPU::RemoteCommandEncoderProxy::beginRenderPass):
(WebKit::WebGPU::RemoteCommandEncoderProxy::beginComputePass):
(WebKit::WebGPU::RemoteCommandEncoderProxy::copyBufferToBuffer):
(WebKit::WebGPU::RemoteCommandEncoderProxy::copyBufferToTexture):
(WebKit::WebGPU::RemoteCommandEncoderProxy::copyTextureToBuffer):
(WebKit::WebGPU::RemoteCommandEncoderProxy::copyTextureToTexture):
(WebKit::WebGPU::RemoteCommandEncoderProxy::fillBuffer):
(WebKit::WebGPU::RemoteCommandEncoderProxy::pushDebugGroup):
(WebKit::WebGPU::RemoteCommandEncoderProxy::popDebugGroup):
(WebKit::WebGPU::RemoteCommandEncoderProxy::insertDebugMarker):
(WebKit::WebGPU::RemoteCommandEncoderProxy::writeTimestamp):
(WebKit::WebGPU::RemoteCommandEncoderProxy::resolveQuerySet):
(WebKit::WebGPU::RemoteCommandEncoderProxy::finish):
(WebKit::WebGPU::RemoteCommandEncoderProxy::setLabelInternal):

  • WebProcess/GPU/graphics/WebGPU/RemoteCommandEncoderProxy.h: Added.
  • WebProcess/GPU/graphics/WebGPU/RemoteComputePassEncoderProxy.cpp: Added.

(WebKit::WebGPU::RemoteComputePassEncoderProxy::RemoteComputePassEncoderProxy):
(WebKit::WebGPU::RemoteComputePassEncoderProxy::~RemoteComputePassEncoderProxy):
(WebKit::WebGPU::RemoteComputePassEncoderProxy::setPipeline):
(WebKit::WebGPU::RemoteComputePassEncoderProxy::dispatch):
(WebKit::WebGPU::RemoteComputePassEncoderProxy::dispatchIndirect):
(WebKit::WebGPU::RemoteComputePassEncoderProxy::beginPipelineStatisticsQuery):
(WebKit::WebGPU::RemoteComputePassEncoderProxy::endPipelineStatisticsQuery):
(WebKit::WebGPU::RemoteComputePassEncoderProxy::endPass):
(WebKit::WebGPU::RemoteComputePassEncoderProxy::setBindGroup):
(WebKit::WebGPU::RemoteComputePassEncoderProxy::pushDebugGroup):
(WebKit::WebGPU::RemoteComputePassEncoderProxy::popDebugGroup):
(WebKit::WebGPU::RemoteComputePassEncoderProxy::insertDebugMarker):
(WebKit::WebGPU::RemoteComputePassEncoderProxy::setLabelInternal):

  • WebProcess/GPU/graphics/WebGPU/RemoteComputePassEncoderProxy.h: Added.
  • WebProcess/GPU/graphics/WebGPU/RemoteComputePipelineProxy.cpp: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h.

(WebKit::WebGPU::RemoteComputePipelineProxy::RemoteComputePipelineProxy):
(WebKit::WebGPU::RemoteComputePipelineProxy::~RemoteComputePipelineProxy):
(WebKit::WebGPU::RemoteComputePipelineProxy::getBindGroupLayout):
(WebKit::WebGPU::RemoteComputePipelineProxy::setLabelInternal):

  • WebProcess/GPU/graphics/WebGPU/RemoteComputePipelineProxy.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.h.
  • WebProcess/GPU/graphics/WebGPU/RemoteDeviceProxy.cpp: Added.

(WebKit::WebGPU::RemoteDeviceProxy::RemoteDeviceProxy):
(WebKit::WebGPU::RemoteDeviceProxy::~RemoteDeviceProxy):
(WebKit::WebGPU::RemoteDeviceProxy::destroy):
(WebKit::WebGPU::RemoteDeviceProxy::createBuffer):
(WebKit::WebGPU::RemoteDeviceProxy::createTexture):
(WebKit::WebGPU::RemoteDeviceProxy::createSampler):
(WebKit::WebGPU::RemoteDeviceProxy::importExternalTexture):
(WebKit::WebGPU::RemoteDeviceProxy::createBindGroupLayout):
(WebKit::WebGPU::RemoteDeviceProxy::createPipelineLayout):
(WebKit::WebGPU::RemoteDeviceProxy::createBindGroup):
(WebKit::WebGPU::RemoteDeviceProxy::createShaderModule):
(WebKit::WebGPU::RemoteDeviceProxy::createComputePipeline):
(WebKit::WebGPU::RemoteDeviceProxy::createRenderPipeline):
(WebKit::WebGPU::RemoteDeviceProxy::createComputePipelineAsync):
(WebKit::WebGPU::RemoteDeviceProxy::createRenderPipelineAsync):
(WebKit::WebGPU::RemoteDeviceProxy::createCommandEncoder):
(WebKit::WebGPU::RemoteDeviceProxy::createRenderBundleEncoder):
(WebKit::WebGPU::RemoteDeviceProxy::createQuerySet):
(WebKit::WebGPU::RemoteDeviceProxy::pushErrorScope):
(WebKit::WebGPU::RemoteDeviceProxy::popErrorScope):
(WebKit::WebGPU::RemoteDeviceProxy::setLabelInternal):

  • WebProcess/GPU/graphics/WebGPU/RemoteDeviceProxy.h: Added.
  • WebProcess/GPU/graphics/WebGPU/RemoteExternalTextureProxy.cpp: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h.

(WebKit::WebGPU::RemoteExternalTextureProxy::RemoteExternalTextureProxy):
(WebKit::WebGPU::RemoteExternalTextureProxy::~RemoteExternalTextureProxy):
(WebKit::WebGPU::RemoteExternalTextureProxy::setLabelInternal):

  • WebProcess/GPU/graphics/WebGPU/RemoteExternalTextureProxy.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.h.
  • WebProcess/GPU/graphics/WebGPU/RemoteGPUProxy.cpp: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h.

(WebKit::WebGPU::RemoteGPUProxy::RemoteGPUProxy):
(WebKit::WebGPU::RemoteGPUProxy::~RemoteGPUProxy):
(WebKit::WebGPU::RemoteGPUProxy::requestAdapter):

  • WebProcess/GPU/graphics/WebGPU/RemoteGPUProxy.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.h.
  • WebProcess/GPU/graphics/WebGPU/RemotePipelineLayoutProxy.cpp: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h.

(WebKit::WebGPU::RemotePipelineLayoutProxy::RemotePipelineLayoutProxy):
(WebKit::WebGPU::RemotePipelineLayoutProxy::~RemotePipelineLayoutProxy):
(WebKit::WebGPU::RemotePipelineLayoutProxy::setLabelInternal):

  • WebProcess/GPU/graphics/WebGPU/RemotePipelineLayoutProxy.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.h.
  • WebProcess/GPU/graphics/WebGPU/RemoteQuerySetProxy.cpp: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h.

(WebKit::WebGPU::RemoteQuerySetProxy::RemoteQuerySetProxy):
(WebKit::WebGPU::RemoteQuerySetProxy::~RemoteQuerySetProxy):
(WebKit::WebGPU::RemoteQuerySetProxy::destroy):
(WebKit::WebGPU::RemoteQuerySetProxy::setLabelInternal):

  • WebProcess/GPU/graphics/WebGPU/RemoteQuerySetProxy.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.h.
  • WebProcess/GPU/graphics/WebGPU/RemoteQueueProxy.cpp: Added.

(WebKit::WebGPU::RemoteQueueProxy::RemoteQueueProxy):
(WebKit::WebGPU::RemoteQueueProxy::~RemoteQueueProxy):
(WebKit::WebGPU::RemoteQueueProxy::submit):
(WebKit::WebGPU::RemoteQueueProxy::onSubmittedWorkDone):
(WebKit::WebGPU::RemoteQueueProxy::writeBuffer):
(WebKit::WebGPU::RemoteQueueProxy::writeTexture):
(WebKit::WebGPU::RemoteQueueProxy::copyExternalImageToTexture):
(WebKit::WebGPU::RemoteQueueProxy::setLabelInternal):

  • WebProcess/GPU/graphics/WebGPU/RemoteQueueProxy.h: Added.
  • WebProcess/GPU/graphics/WebGPU/RemoteRenderBundleEncoderProxy.cpp: Added.

(WebKit::WebGPU::RemoteRenderBundleEncoderProxy::RemoteRenderBundleEncoderProxy):
(WebKit::WebGPU::RemoteRenderBundleEncoderProxy::~RemoteRenderBundleEncoderProxy):
(WebKit::WebGPU::RemoteRenderBundleEncoderProxy::setPipeline):
(WebKit::WebGPU::RemoteRenderBundleEncoderProxy::setIndexBuffer):
(WebKit::WebGPU::RemoteRenderBundleEncoderProxy::setVertexBuffer):
(WebKit::WebGPU::RemoteRenderBundleEncoderProxy::draw):
(WebKit::WebGPU::RemoteRenderBundleEncoderProxy::drawIndexed):
(WebKit::WebGPU::RemoteRenderBundleEncoderProxy::drawIndirect):
(WebKit::WebGPU::RemoteRenderBundleEncoderProxy::drawIndexedIndirect):
(WebKit::WebGPU::RemoteRenderBundleEncoderProxy::setBindGroup):
(WebKit::WebGPU::RemoteRenderBundleEncoderProxy::pushDebugGroup):
(WebKit::WebGPU::RemoteRenderBundleEncoderProxy::popDebugGroup):
(WebKit::WebGPU::RemoteRenderBundleEncoderProxy::insertDebugMarker):
(WebKit::WebGPU::RemoteRenderBundleEncoderProxy::finish):
(WebKit::WebGPU::RemoteRenderBundleEncoderProxy::setLabelInternal):

  • WebProcess/GPU/graphics/WebGPU/RemoteRenderBundleEncoderProxy.h: Added.
  • WebProcess/GPU/graphics/WebGPU/RemoteRenderBundleProxy.cpp: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h.

(WebKit::WebGPU::RemoteRenderBundleProxy::RemoteRenderBundleProxy):
(WebKit::WebGPU::RemoteRenderBundleProxy::~RemoteRenderBundleProxy):
(WebKit::WebGPU::RemoteRenderBundleProxy::setLabelInternal):

  • WebProcess/GPU/graphics/WebGPU/RemoteRenderBundleProxy.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.h.
  • WebProcess/GPU/graphics/WebGPU/RemoteRenderPassEncoderProxy.cpp: Added.

(WebKit::WebGPU::RemoteRenderPassEncoderProxy::RemoteRenderPassEncoderProxy):
(WebKit::WebGPU::RemoteRenderPassEncoderProxy::~RemoteRenderPassEncoderProxy):
(WebKit::WebGPU::RemoteRenderPassEncoderProxy::setPipeline):
(WebKit::WebGPU::RemoteRenderPassEncoderProxy::setIndexBuffer):
(WebKit::WebGPU::RemoteRenderPassEncoderProxy::setVertexBuffer):
(WebKit::WebGPU::RemoteRenderPassEncoderProxy::draw):
(WebKit::WebGPU::RemoteRenderPassEncoderProxy::drawIndexed):
(WebKit::WebGPU::RemoteRenderPassEncoderProxy::drawIndirect):
(WebKit::WebGPU::RemoteRenderPassEncoderProxy::drawIndexedIndirect):
(WebKit::WebGPU::RemoteRenderPassEncoderProxy::setBindGroup):
(WebKit::WebGPU::RemoteRenderPassEncoderProxy::pushDebugGroup):
(WebKit::WebGPU::RemoteRenderPassEncoderProxy::popDebugGroup):
(WebKit::WebGPU::RemoteRenderPassEncoderProxy::insertDebugMarker):
(WebKit::WebGPU::RemoteRenderPassEncoderProxy::setViewport):
(WebKit::WebGPU::RemoteRenderPassEncoderProxy::setScissorRect):
(WebKit::WebGPU::RemoteRenderPassEncoderProxy::setBlendConstant):
(WebKit::WebGPU::RemoteRenderPassEncoderProxy::setStencilReference):
(WebKit::WebGPU::RemoteRenderPassEncoderProxy::beginOcclusionQuery):
(WebKit::WebGPU::RemoteRenderPassEncoderProxy::endOcclusionQuery):
(WebKit::WebGPU::RemoteRenderPassEncoderProxy::beginPipelineStatisticsQuery):
(WebKit::WebGPU::RemoteRenderPassEncoderProxy::endPipelineStatisticsQuery):
(WebKit::WebGPU::RemoteRenderPassEncoderProxy::executeBundles):
(WebKit::WebGPU::RemoteRenderPassEncoderProxy::endPass):
(WebKit::WebGPU::RemoteRenderPassEncoderProxy::setLabelInternal):

  • WebProcess/GPU/graphics/WebGPU/RemoteRenderPassEncoderProxy.h: Added.
  • WebProcess/GPU/graphics/WebGPU/RemoteRenderPipelineProxy.cpp: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h.

(WebKit::WebGPU::RemoteRenderPipelineProxy::RemoteRenderPipelineProxy):
(WebKit::WebGPU::RemoteRenderPipelineProxy::~RemoteRenderPipelineProxy):
(WebKit::WebGPU::RemoteRenderPipelineProxy::getBindGroupLayout):
(WebKit::WebGPU::RemoteRenderPipelineProxy::setLabelInternal):

  • WebProcess/GPU/graphics/WebGPU/RemoteRenderPipelineProxy.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.h.
  • WebProcess/GPU/graphics/WebGPU/RemoteSamplerProxy.cpp: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUProgrammableStage.h.

(WebKit::WebGPU::RemoteSamplerProxy::RemoteSamplerProxy):
(WebKit::WebGPU::RemoteSamplerProxy::~RemoteSamplerProxy):
(WebKit::WebGPU::RemoteSamplerProxy::setLabelInternal):

  • WebProcess/GPU/graphics/WebGPU/RemoteSamplerProxy.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.h.
  • WebProcess/GPU/graphics/WebGPU/RemoteShaderModuleProxy.cpp: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h.

(WebKit::WebGPU::RemoteShaderModuleProxy::RemoteShaderModuleProxy):
(WebKit::WebGPU::RemoteShaderModuleProxy::~RemoteShaderModuleProxy):
(WebKit::WebGPU::RemoteShaderModuleProxy::compilationInfo):
(WebKit::WebGPU::RemoteShaderModuleProxy::setLabelInternal):

  • WebProcess/GPU/graphics/WebGPU/RemoteShaderModuleProxy.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.h.
  • WebProcess/GPU/graphics/WebGPU/RemoteTextureProxy.cpp: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h.

(WebKit::WebGPU::RemoteTextureProxy::RemoteTextureProxy):
(WebKit::WebGPU::RemoteTextureProxy::~RemoteTextureProxy):
(WebKit::WebGPU::RemoteTextureProxy::createView const):
(WebKit::WebGPU::RemoteTextureProxy::destroy):
(WebKit::WebGPU::RemoteTextureProxy::setLabelInternal):

  • WebProcess/GPU/graphics/WebGPU/RemoteTextureProxy.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.h.
  • WebProcess/GPU/graphics/WebGPU/RemoteTextureViewProxy.cpp: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h.

(WebKit::WebGPU::RemoteTextureViewProxy::RemoteTextureViewProxy):
(WebKit::WebGPU::RemoteTextureViewProxy::~RemoteTextureViewProxy):
(WebKit::WebGPU::RemoteTextureViewProxy::setLabelInternal):

  • WebProcess/GPU/graphics/WebGPU/RemoteTextureViewProxy.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.h.
  • WebProcess/GPU/graphics/WebGPU/WebGPUDowncastConvertToBackingContext.cpp: Added.

(WebKit::WebGPU::DowncastConvertToBackingContext::convertToBacking):

  • WebProcess/GPU/graphics/WebGPU/WebGPUDowncastConvertToBackingContext.h: Added.
  • WebProcess/GPU/graphics/cocoa/ImageBufferShareableIOSurfaceBackend.cpp:
Location:
trunk/Source
Files:
17 added
37 edited
91 copied

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/PAL/ChangeLog

    r285879 r285881  
     12021-11-16  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        [WebGPU] Start preparing for serializing commands to the GPU process
     4        https://bugs.webkit.org/show_bug.cgi?id=233179
     5
     6        Reviewed by Alex Christensen.
     7
     8        Tiny cleanups. Forward-declare things that can be forward declared.
     9
     10        * pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.h:
     11        * pal/graphics/WebGPU/WebGPUBindGroupDescriptor.h:
     12        * pal/graphics/WebGPU/WebGPUBufferBinding.h:
     13        * pal/graphics/WebGPU/WebGPUComputePassTimestampWrites.h:
     14        * pal/graphics/WebGPU/WebGPUImageCopyBuffer.h:
     15        * pal/graphics/WebGPU/WebGPUImageCopyTexture.h:
     16        * pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h:
     17        * pal/graphics/WebGPU/WebGPUPipelineLayoutDescriptor.h:
     18        * pal/graphics/WebGPU/WebGPUProgrammableStage.h:
     19        * pal/graphics/WebGPU/WebGPURenderPassColorAttachment.h:
     20        * pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h:
     21        * pal/graphics/WebGPU/WebGPURenderPassTimestampWrites.h:
     22
    1232021-11-16  Myles C. Maxfield  <mmaxfield@apple.com>
    224
  • trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.cpp

    r285879 r285881  
    146146}
    147147
    148 void AdapterImpl::requestDevice(const DeviceDescriptor& descriptor, std::function<void(Ref<Device>)>&& callback)
     148void AdapterImpl::requestDevice(const DeviceDescriptor& descriptor, WTF::Function<void(Ref<Device>)>&& callback)
    149149{
    150150    Ref protectedThis(*this);
  • trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.h

    r285879 r285881  
    5959
    6060    void requestDeviceCallback(WGPURequestDeviceStatus, WGPUDevice, const char* message);
    61     void requestDevice(const DeviceDescriptor&, std::function<void(Ref<Device>)>&&) final;
     61    void requestDevice(const DeviceDescriptor&, WTF::function<void(Ref<Device>)>&&) final;
     62
     63    Deque<WTF::function<void(Ref<Device>)>> m_callbacks;
    6264
    6365    WGPUAdapter m_backing { nullptr };
    64 
    65     Deque<std::function<void(Ref<Device>)>> m_callbacks;
    6666    Ref<ConvertToBackingContext> m_convertToBackingContext;
    6767};
  • trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUBufferImpl.cpp

    r285879 r285881  
    5151}
    5252
    53 void BufferImpl::mapAsync(MapModeFlags mapModeFlags, std::optional<Size64> offset, std::optional<Size64> size, std::function<void()>&& callback)
     53void BufferImpl::mapAsync(MapModeFlags mapModeFlags, std::optional<Size64> offset, std::optional<Size64> size, WTF::Function<void()>&& callback)
    5454{
    5555    Ref protectedThis(*this);
  • trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUBufferImpl.h

    r285879 r285881  
    5959
    6060    void mapCallback(WGPUBufferMapAsyncStatus);
    61     void mapAsync(MapModeFlags, std::optional<Size64> offset, std::optional<Size64> sizeForMap, std::function<void()>&&) final;
     61    void mapAsync(MapModeFlags, std::optional<Size64> offset, std::optional<Size64> sizeForMap, WTF::Function<void()>&&) final;
    6262    MappedRange getMappedRange(std::optional<Size64> offset, std::optional<Size64>) final;
    6363    void unmap() final;
     
    6767    void setLabelInternal(const String&) final;
    6868
    69     Deque<std::function<void()>> m_callbacks;
     69    Deque<WTF::Function<void()>> m_callbacks;
    7070
    7171    WGPUBuffer m_backing { nullptr };
  • trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUDeviceImpl.cpp

    r285879 r285881  
    483483}
    484484
    485 void DeviceImpl::createComputePipelineAsync(const ComputePipelineDescriptor& descriptor, std::function<void(Ref<ComputePipeline>&&)>&& callback)
     485void DeviceImpl::createComputePipelineAsync(const ComputePipelineDescriptor& descriptor, WTF::Function<void(Ref<ComputePipeline>&&)>&& callback)
    486486{
    487487    Ref protectedThis(*this);
     
    507507}
    508508
    509 void DeviceImpl::createRenderPipelineAsync(const RenderPipelineDescriptor& descriptor, std::function<void(Ref<RenderPipeline>&&)>&& callback)
     509void DeviceImpl::createRenderPipelineAsync(const RenderPipelineDescriptor& descriptor, WTF::Function<void(Ref<RenderPipeline>&&)>&& callback)
    510510{
    511511    Ref protectedThis(*this);
     
    590590}
    591591
    592 void DeviceImpl::popErrorScope(std::function<void(std::optional<Error>&&)>&& callback)
     592void DeviceImpl::popErrorScope(WTF::Function<void(std::optional<Error>&&)>&& callback)
    593593{
    594594    Ref protectedThis(*this);
  • trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUDeviceImpl.h

    r285879 r285881  
    7575    Ref<RenderPipeline> createRenderPipeline(const RenderPipelineDescriptor&) final;
    7676    void createComputePipelineAsyncCallback(WGPUCreatePipelineAsyncStatus, WGPUComputePipeline, const char* message);
    77     void createComputePipelineAsync(const ComputePipelineDescriptor&, std::function<void(Ref<ComputePipeline>&&)>&&) final;
     77    void createComputePipelineAsync(const ComputePipelineDescriptor&, WTF::Function<void(Ref<ComputePipeline>&&)>&&) final;
    7878    void createRenderPipelineAsyncCallback(WGPUCreatePipelineAsyncStatus, WGPURenderPipeline, const char* message);
    79     void createRenderPipelineAsync(const RenderPipelineDescriptor&, std::function<void(Ref<RenderPipeline>&&)>&&) final;
     79    void createRenderPipelineAsync(const RenderPipelineDescriptor&, WTF::Function<void(Ref<RenderPipeline>&&)>&&) final;
    8080
    8181    Ref<CommandEncoder> createCommandEncoder(const std::optional<CommandEncoderDescriptor>&) final;
     
    8686    void pushErrorScope(ErrorFilter) final;
    8787    void popErrorScopeCallback(WGPUErrorType, const char* message);
    88     void popErrorScope(std::function<void(std::optional<Error>&&)>&&) final;
     88    void popErrorScope(WTF::Function<void(std::optional<Error>&&)>&&) final;
    8989
    9090    void setLabelInternal(const String&) final;
    9191
    92     Deque<std::function<void(Ref<ComputePipeline>&&)>> m_createComputePipelineAsyncCallbacks;
    93     Deque<std::function<void(Ref<RenderPipeline>&&)>> m_createRenderPipelineAsyncCallbacks;
    94     Deque<std::function<void(std::optional<Error>&&)>> m_popErrorScopeCallbacks;
     92    Deque<WTF::Function<void(Ref<ComputePipeline>&&)>> m_createComputePipelineAsyncCallbacks;
     93    Deque<WTF::Function<void(Ref<RenderPipeline>&&)>> m_createRenderPipelineAsyncCallbacks;
     94    Deque<WTF::Function<void(std::optional<Error>&&)>> m_popErrorScopeCallbacks;
    9595
    9696    WGPUDevice m_backing { nullptr };
  • trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUImpl.cpp

    r285879 r285881  
    5252}
    5353
    54 void GPUImpl::requestAdapter(const RequestAdapterOptions& options, std::function<void(RefPtr<Adapter>&&)>&& callback)
     54void GPUImpl::requestAdapter(const RequestAdapterOptions& options, WTF::Function<void(RefPtr<Adapter>&&)>&& callback)
    5555{
    5656    Ref protectedThis(*this);
  • trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUImpl.h

    r285879 r285881  
    5959
    6060    void requestAdapterCallback(WGPURequestAdapterStatus, WGPUAdapter, const char* message);
    61     void requestAdapter(const RequestAdapterOptions&, std::function<void(RefPtr<Adapter>&&)>&&) final;
     61    void requestAdapter(const RequestAdapterOptions&, WTF::Function<void(RefPtr<Adapter>&&)>&&) final;
    6262
    63     Deque<std::function<void(RefPtr<Adapter>&&)>> m_callbacks;
     63    Deque<WTF::Function<void(RefPtr<Adapter>&&)>> m_callbacks;
    6464
    6565    WGPUInstance m_backing { nullptr };
  • trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUQueueImpl.cpp

    r285879 r285881  
    6464}
    6565
    66 void QueueImpl::onSubmittedWorkDone(std::function<void()>&& callback)
     66void QueueImpl::onSubmittedWorkDone(WTF::Function<void()>&& callback)
    6767{
    6868    Ref protectedThis(*this);
  • trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUQueueImpl.h

    r285879 r285881  
    6161
    6262    void onSubmittedWorkDoneCallback(WGPUQueueWorkDoneStatus);
    63     void onSubmittedWorkDone(std::function<void()>&&) final;
     63    void onSubmittedWorkDone(WTF::Function<void()>&&) final;
    6464
    6565    void writeBuffer(
     
    8787    uint64_t m_signalValue { 1 };
    8888
    89     Deque<std::function<void()>> m_callbacks;
     89    Deque<WTF::Function<void()>> m_callbacks;
    9090
    9191    WGPUQueue m_backing { nullptr };
  • trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUShaderModuleImpl.cpp

    r285879 r285881  
    4545}
    4646
    47 void ShaderModuleImpl::compilationInfo(std::function<void(Ref<CompilationInfo>&&)>&&)
     47void ShaderModuleImpl::compilationInfo(WTF::Function<void(Ref<CompilationInfo>&&)>&&)
    4848{
    4949}
  • trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUShaderModuleImpl.h

    r285879 r285881  
    5656    WGPUShaderModule backing() const { return m_backing; }
    5757
    58     void compilationInfo(std::function<void(Ref<CompilationInfo>&&)>&&) final;
     58    void compilationInfo(WTF::Function<void(Ref<CompilationInfo>&&)>&&) final;
    5959
    6060    void setLabelInternal(const String&) final;
  • trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPU.h

    r285879 r285881  
    2828#include "WebGPURequestAdapterOptions.h"
    2929#include <optional>
    30 #include <utility>
     30#include <wtf/Function.h>
    3131#include <wtf/RefCounted.h>
    3232#include <wtf/RefPtr.h>
     
    4040    virtual ~GPU() = default;
    4141
    42     virtual void requestAdapter(const RequestAdapterOptions&, std::function<void(RefPtr<Adapter>&&)>&&) = 0;
     42    virtual void requestAdapter(const RequestAdapterOptions&, WTF::Function<void(RefPtr<Adapter>&&)>&&) = 0;
    4343
    4444protected:
  • trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUAdapter.h

    r285879 r285881  
    3030#include "WebGPUSupportedLimits.h"
    3131#include <optional>
    32 #include <utility>
     32#include <wtf/Function.h>
    3333#include <wtf/Ref.h>
    3434#include <wtf/RefCounted.h>
     
    4848    bool isFallbackAdapter() const { return m_isFallbackAdapter; }
    4949
    50     virtual void requestDevice(const DeviceDescriptor&, std::function<void(Ref<Device>)>&&) = 0;
     50    virtual void requestDevice(const DeviceDescriptor&, WTF::Function<void(Ref<Device>)>&&) = 0;
    5151
    5252protected:
  • trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBindGroupDescriptor.h

    r285879 r285881  
    2727
    2828#include "WebGPUBindGroupEntry.h"
    29 #include "WebGPUBindGroupLayout.h"
    3029#include "WebGPUObjectDescriptorBase.h"
    3130#include <wtf/Vector.h>
    3231
    3332namespace PAL::WebGPU {
     33
     34class BindGroupLayout;
    3435
    3536struct BindGroupDescriptor : public ObjectDescriptorBase {
  • trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBindGroupEntry.h

    r285879 r285881  
    3131#include "WebGPUSampler.h"
    3232#include "WebGPUTextureView.h"
    33 #include <utility>
     33#include <functional>
    3434#include <variant>
    3535
  • trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBuffer.h

    r285879 r285881  
    3030#include <cstdint>
    3131#include <optional>
    32 #include <utility>
     32#include <wtf/Function.h>
    3333#include <wtf/Ref.h>
    3434#include <wtf/RefCounted.h>
     
    4949    }
    5050
    51     virtual void mapAsync(MapModeFlags, std::optional<Size64> offset, std::optional<Size64>, std::function<void()>&&) = 0;
     51    virtual void mapAsync(MapModeFlags, std::optional<Size64> offset, std::optional<Size64>, WTF::Function<void()>&&) = 0;
    5252    struct MappedRange {
    5353        const void* source;
  • trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBufferBinding.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUBuffer.h"
    2928#include "WebGPUIntegralTypes.h"
    3029#include <optional>
     
    3231
    3332namespace PAL::WebGPU {
     33
     34class Buffer;
    3435
    3536struct BufferBinding {
  • trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUComputePassTimestampWrites.h

    r285879 r285881  
    2828#include "WebGPUComputePassTimestampLocation.h"
    2929#include "WebGPUIntegralTypes.h"
    30 #include "WebGPUQuerySet.h"
    3130#include <wtf/Ref.h>
    3231#include <wtf/Vector.h>
    3332
    3433namespace PAL::WebGPU {
     34
     35class QuerySet;
    3536
    3637struct ComputePassTimestampWrite {
  • trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUDevice.h

    r285879 r285881  
    3434#include "WebGPUSupportedLimits.h"
    3535#include <optional>
    36 #include <utility>
     36#include <wtf/Function.h>
    3737#include <wtf/HashSet.h>
    3838#include <wtf/Ref.h>
     
    101101    virtual Ref<ComputePipeline> createComputePipeline(const ComputePipelineDescriptor&) = 0;
    102102    virtual Ref<RenderPipeline> createRenderPipeline(const RenderPipelineDescriptor&) = 0;
    103     virtual void createComputePipelineAsync(const ComputePipelineDescriptor&, std::function<void(Ref<ComputePipeline>&&)>&&) = 0;
    104     virtual void createRenderPipelineAsync(const RenderPipelineDescriptor&, std::function<void(Ref<RenderPipeline>&&)>&&) = 0;
     103    virtual void createComputePipelineAsync(const ComputePipelineDescriptor&, WTF::Function<void(Ref<ComputePipeline>&&)>&&) = 0;
     104    virtual void createRenderPipelineAsync(const RenderPipelineDescriptor&, WTF::Function<void(Ref<RenderPipeline>&&)>&&) = 0;
    105105
    106106    virtual Ref<CommandEncoder> createCommandEncoder(const std::optional<CommandEncoderDescriptor>&) = 0;
     
    110110
    111111    virtual void pushErrorScope(ErrorFilter) = 0;
    112     virtual void popErrorScope(std::function<void(std::optional<Error>&&)>&&) = 0;
     112    virtual void popErrorScope(WTF::Function<void(std::optional<Error>&&)>&&) = 0;
    113113
    114114    class DeviceLostClient {
  • trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUDeviceDescriptor.h

    r285879 r285881  
    3737struct DeviceDescriptor : public ObjectDescriptorBase {
    3838    Vector<FeatureName> requiredFeatures;
    39     // Vector<KeyValuePair<String, uint64_t>> requiredLimits;
     39    // FIXME: Add support for requiredLimits.
    4040};
    4141
  • trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUBuffer.h"
    2928#include "WebGPUImageDataLayout.h"
    3029#include <wtf/Ref.h>
    3130
    3231namespace PAL::WebGPU {
     32
     33class Buffer;
    3334
    3435struct ImageCopyBuffer : public ImageDataLayout {
  • trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyTexture.h

    r285879 r285881  
    2828#include "WebGPUIntegralTypes.h"
    2929#include "WebGPUOrigin3D.h"
    30 #include "WebGPUTexture.h"
    3130#include "WebGPUTextureAspect.h"
    3231#include <optional>
     
    3433
    3534namespace PAL::WebGPU {
     35
     36class Texture;
    3637
    3738struct ImageCopyTexture {
  • trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h

    r285879 r285881  
    2727
    2828#include "WebGPUObjectDescriptorBase.h"
    29 #include "WebGPUPipelineLayout.h"
    3029
    3130namespace PAL::WebGPU {
     31
     32class PipelineLayout;
    3233
    3334struct PipelineDescriptorBase : public ObjectDescriptorBase {
  • trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineLayoutDescriptor.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUBindGroupLayout.h"
    2928#include "WebGPUObjectDescriptorBase.h"
    30 #include <utility>
     29#include <functional>
    3130#include <wtf/Vector.h>
    3231
    3332namespace PAL::WebGPU {
     33
     34class BindGroupLayout;
    3435
    3536struct PipelineLayoutDescriptor : public ObjectDescriptorBase {
  • trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUProgrammableStage.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUShaderModule.h"
    2928#include <wtf/KeyValuePair.h>
    3029#include <wtf/Ref.h>
     
    3231
    3332namespace PAL::WebGPU {
     33
     34class ShaderModule;
    3435
    3536using PipelineConstantValue = double; // May represent WGSL’s bool, f32, i32, u32.
  • trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUQueue.h

    r285879 r285881  
    3333#include "WebGPUImageDataLayout.h"
    3434#include "WebGPUIntegralTypes.h"
     35#include <functional>
    3536#include <optional>
    36 #include <utility>
     37#include <wtf/Function.h>
    3738#include <wtf/Ref.h>
    3839#include <wtf/RefCounted.h>
     
    5859    virtual void submit(Vector<std::reference_wrapper<CommandBuffer>>&&) = 0;
    5960
    60     virtual void onSubmittedWorkDone(std::function<void()>&&) = 0;
     61    virtual void onSubmittedWorkDone(WTF::Function<void()>&&) = 0;
    6162
    6263    virtual void writeBuffer(
  • trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassColorAttachment.h

    r285879 r285881  
    2929#include "WebGPULoadOp.h"
    3030#include "WebGPUStoreOp.h"
    31 #include "WebGPUTextureView.h"
    3231#include <variant>
    3332#include <wtf/Ref.h>
     
    3534
    3635namespace PAL::WebGPU {
     36
     37class TextureView;
    3738
    3839struct RenderPassColorAttachment {
  • trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h

    r285879 r285881  
    2929#include "WebGPULoadOp.h"
    3030#include "WebGPUStoreOp.h"
    31 #include "WebGPUTextureView.h"
    3231#include <variant>
    3332#include <wtf/Ref.h>
    3433
    3534namespace PAL::WebGPU {
     35
     36class TextureView;
    3637
    3738struct RenderPassDepthStencilAttachment {
  • trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassEncoder.h

    r285879 r285881  
    2929#include "WebGPUIndexFormat.h"
    3030#include "WebGPUIntegralTypes.h"
     31#include <functional>
    3132#include <optional>
    32 #include <utility>
    3333#include <wtf/Ref.h>
    3434#include <wtf/RefCounted.h>
  • trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassTimestampWrites.h

    r285879 r285881  
    2727
    2828#include "WebGPUIntegralTypes.h"
    29 #include "WebGPUQuerySet.h"
    3029#include "WebGPURenderPassTimestampLocation.h"
    3130#include <wtf/Ref.h>
     
    3332
    3433namespace PAL::WebGPU {
     34
     35class QuerySet;
    3536
    3637struct RenderPassTimestampWrite {
  • trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUShaderModule.h

    r285879 r285881  
    2727
    2828#include "WebGPUBindGroupLayout.h"
    29 #include <utility>
     29#include <wtf/Function.h>
    3030#include <wtf/Ref.h>
    3131#include <wtf/RefCounted.h>
     
    4848    }
    4949
    50     virtual void compilationInfo(std::function<void(Ref<CompilationInfo>&&)>&&) = 0;
     50    virtual void compilationInfo(WTF::Function<void(Ref<CompilationInfo>&&)>&&) = 0;
    5151
    5252protected:
  • trunk/Source/WebKit/ChangeLog

    r285878 r285881  
     12021-11-16  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        [WebGPU] Start preparing for serializing commands to the GPU process
     4        https://bugs.webkit.org/show_bug.cgi?id=233179
     5
     6        Reviewed by Alex Christensen.
     7
     8        The interaction between WebGPU and the GPU process will work as such:
     9
     10        1. We have a virtual interface in PAL which holds 3 things:
     11               a) Refcounted objects (command buffer, queue, device, etc.).
     12               b) Structs holding descriptors for commands. E.g. device.createRenderPipeline(RenderPipelineDescriptor)
     13               c) Enums
     14           The virtual interface holds all 3 of these things. For refcounted objects, it holds virtual interfaces with no
     15           implementations. (There is one implementation of these interfaces which connects them to WebGPU.framework.)
     16        2. This patch adds a new implementation of these virtual interfaces, called Remote***Proxy, in
     17           WebKit/WebProcess/GPU/graphics/WebGPU. The implementation of all the methods in this implementation will simply
     18           send messages to the GPU process. In this patch, these methods are still stubs - they'll be filled in in a
     19           subsequent patch.
     20        3. The arguments to the commands consist of the structs and enums from PAL. However, we can't use the structs
     21           directly, because the structs hold references to the refcounted objects. E.g. a BindGroupDescriptor holds a
     22           reference to the Buffer which should be part of the bind group. We can't send refcounted objects across IPC,
     23           so instead of sending the objects, we send a WebGPUIdentifier instead. Every refcounted object gets a unique
     24           WebGPU identifier. However, because these references to RefCounted objects are buried deep inside nested structs,
     25           we can't simply use the structs out of the box. Instead, we have to have a parallel set of structs, where the
     26           references are replaced with WebGPUIdentifiers. These structs will be the ones actually sent across the wire.
     27        4. The enums don't have this problem, so those are untouched. A subsequent patch will be adding the EnumTraits
     28           directly in PAL to make them serializable.
     29        5. Upon receiving a struct from the wire, we're going to have to convert it back into its corresponding PAL type,
     30           which means we have to find the object associated with the WebGPUIdentifier. The serializers themselves can't do
     31           this, because they lack the context necessary for performing the lookup. This patch adds two new context objects
     32           which we'll use ourselves when implementing our own conversions - ConvertToBackingContext and
     33           ConvertFromBackingContext. Only the first one is implemented in this patch; the second will be implemented in a
     34           subsequent patch.
     35        6. The GPU process side won't actually implement the virtual interface - only the web process side will implement it.
     36           Instead, the GPU process has to manage lifetime of the objects. Just like how 2D canvas in the GPU process has
     37           a RemoteResourceCache, the WebGPU objects will be owned by a high-level object in the GPU process. The
     38           ownership will be top-down in the GPU process, where Devices have strong references to Textures, and Textures
     39           have strong references to TextureViews. On the other hand, in the Web process, ownership will be bottom-up:
     40           JavaScript will have strong references to TextureViews, TextureViews will have strong references to Textures, and
     41           Textures will have strong references to Devices. This works out quite nicely - it means that, when GC runs and
     42           a TextureView gets deleted, the TextureView tells its owner that it's getting destroyed, its owner sends a
     43           message to the GPU process, and the corresponding owner in the GPU process looks up its relevant child in its
     44           children list, and delete it. Easy peasy.
     45
     46        No new tests because there is no behavior change (yet). We're getting close, though!
     47
     48        * Shared/WebGPU/WebGPUBindGroupDescriptor.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBindGroupDescriptor.h.
     49        * Shared/WebGPU/WebGPUBindGroupEntry.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassColorAttachment.h.
     50        * Shared/WebGPU/WebGPUBindGroupLayoutDescriptor.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h.
     51        * Shared/WebGPU/WebGPUBindGroupLayoutEntry.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBufferBinding.h.
     52        * Shared/WebGPU/WebGPUBlendComponent.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h.
     53        * Shared/WebGPU/WebGPUBlendState.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h.
     54        * Shared/WebGPU/WebGPUBufferBinding.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBufferBinding.h.
     55        * Shared/WebGPU/WebGPUBufferBindingLayout.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h.
     56        * Shared/WebGPU/WebGPUBufferDescriptor.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h.
     57        * Shared/WebGPU/WebGPUCanvasConfiguration.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyTexture.h.
     58        * Shared/WebGPU/WebGPUColor.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h.
     59        * Shared/WebGPU/WebGPUColorTargetState.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBufferBinding.h.
     60        * Shared/WebGPU/WebGPUCommandBufferDescriptor.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h.
     61        * Shared/WebGPU/WebGPUCommandEncoderDescriptor.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h.
     62        * Shared/WebGPU/WebGPUComputePassDescriptor.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h.
     63        * Shared/WebGPU/WebGPUComputePassTimestampWrites.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUComputePassTimestampWrites.h.
     64        * Shared/WebGPU/WebGPUComputePipelineDescriptor.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h.
     65        * Shared/WebGPU/WebGPUConvertFromBackingContext.h: Added.
     66        * Shared/WebGPU/WebGPUConvertToBackingContext.h: Added.
     67        * Shared/WebGPU/WebGPUDepthStencilState.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBufferBinding.h.
     68        * Shared/WebGPU/WebGPUDeviceDescriptor.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBindGroupDescriptor.h.
     69        * Shared/WebGPU/WebGPUExtent3D.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassTimestampWrites.h.
     70        * Shared/WebGPU/WebGPUExternalTextureBindingLayout.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h.
     71        * Shared/WebGPU/WebGPUExternalTextureDescriptor.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h.
     72        * Shared/WebGPU/WebGPUFragmentState.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h.
     73        * Shared/WebGPU/WebGPUIdentifier.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h.
     74        * Shared/WebGPU/WebGPUImageCopyBuffer.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h.
     75        * Shared/WebGPU/WebGPUImageCopyExternalImage.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBufferBinding.h.
     76        * Shared/WebGPU/WebGPUImageCopyTexture.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyTexture.h.
     77        * Shared/WebGPU/WebGPUImageCopyTextureTagged.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h.
     78        * Shared/WebGPU/WebGPUImageDataLayout.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBufferBinding.h.
     79        * Shared/WebGPU/WebGPUMultisampleState.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h.
     80        * Shared/WebGPU/WebGPUObjectDescriptorBase.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h.
     81        * Shared/WebGPU/WebGPUOrigin2D.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineLayoutDescriptor.h.
     82        * Shared/WebGPU/WebGPUOrigin3D.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineLayoutDescriptor.h.
     83        * Shared/WebGPU/WebGPUPipelineDescriptorBase.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h.
     84        * Shared/WebGPU/WebGPUPipelineLayoutDescriptor.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineLayoutDescriptor.h.
     85        * Shared/WebGPU/WebGPUPrimitiveState.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBufferBinding.h.
     86        * Shared/WebGPU/WebGPUProgrammableStage.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUProgrammableStage.h.
     87        * Shared/WebGPU/WebGPUQuerySetDescriptor.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBindGroupDescriptor.h.
     88        * Shared/WebGPU/WebGPURenderBundleDescriptor.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h.
     89        * Shared/WebGPU/WebGPURenderBundleEncoderDescriptor.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h.
     90        * Shared/WebGPU/WebGPURenderPassColorAttachment.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassColorAttachment.h.
     91        * Shared/WebGPU/WebGPURenderPassDepthStencilAttachment.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h.
     92        * Shared/WebGPU/WebGPURenderPassDescriptor.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineLayoutDescriptor.h.
     93        * Shared/WebGPU/WebGPURenderPassLayout.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineLayoutDescriptor.h.
     94        * Shared/WebGPU/WebGPURenderPassTimestampWrites.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassTimestampWrites.h.
     95        * Shared/WebGPU/WebGPURenderPipelineDescriptor.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBufferBinding.h.
     96        * Shared/WebGPU/WebGPURequestAdapterOptions.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBufferBinding.h.
     97        * Shared/WebGPU/WebGPUSamplerBindingLayout.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h.
     98        * Shared/WebGPU/WebGPUSamplerDescriptor.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h.
     99        * Shared/WebGPU/WebGPUShaderModuleDescriptor.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h.
     100        * Shared/WebGPU/WebGPUStencilFaceState.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h.
     101        * Shared/WebGPU/WebGPUStorageTextureBindingLayout.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h.
     102        * Shared/WebGPU/WebGPUTextureBindingLayout.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h.
     103        * Shared/WebGPU/WebGPUTextureDescriptor.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h.
     104        * Shared/WebGPU/WebGPUTextureViewDescriptor.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h.
     105        * Shared/WebGPU/WebGPUVertexAttribute.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h.
     106        * Shared/WebGPU/WebGPUVertexBufferLayout.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineLayoutDescriptor.h.
     107        * Shared/WebGPU/WebGPUVertexState.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBufferBinding.h.
     108        * Sources.txt:
     109        * WebKit.xcodeproj/project.pbxproj:
     110        * WebProcess/GPU/graphics/WebGPU/RemoteAdapterProxy.cpp: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h.
     111        (WebKit::WebGPU::RemoteAdapterProxy::RemoteAdapterProxy):
     112        (WebKit::WebGPU::RemoteAdapterProxy::~RemoteAdapterProxy):
     113        (WebKit::WebGPU::RemoteAdapterProxy::requestDevice):
     114        * WebProcess/GPU/graphics/WebGPU/RemoteAdapterProxy.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.h.
     115        * WebProcess/GPU/graphics/WebGPU/RemoteBindGroupLayoutProxy.cpp: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h.
     116        (WebKit::WebGPU::RemoteBindGroupLayoutProxy::RemoteBindGroupLayoutProxy):
     117        (WebKit::WebGPU::RemoteBindGroupLayoutProxy::~RemoteBindGroupLayoutProxy):
     118        (WebKit::WebGPU::RemoteBindGroupLayoutProxy::setLabelInternal):
     119        * WebProcess/GPU/graphics/WebGPU/RemoteBindGroupLayoutProxy.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.h.
     120        * WebProcess/GPU/graphics/WebGPU/RemoteBindGroupProxy.cpp: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h.
     121        (WebKit::WebGPU::RemoteBindGroupProxy::RemoteBindGroupProxy):
     122        (WebKit::WebGPU::RemoteBindGroupProxy::~RemoteBindGroupProxy):
     123        (WebKit::WebGPU::RemoteBindGroupProxy::setLabelInternal):
     124        * WebProcess/GPU/graphics/WebGPU/RemoteBindGroupProxy.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.h.
     125        * WebProcess/GPU/graphics/WebGPU/RemoteBufferProxy.cpp: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h.
     126        (WebKit::WebGPU::RemoteBufferProxy::RemoteBufferProxy):
     127        (WebKit::WebGPU::RemoteBufferProxy::~RemoteBufferProxy):
     128        (WebKit::WebGPU::RemoteBufferProxy::mapAsync):
     129        (WebKit::WebGPU::RemoteBufferProxy::getMappedRange):
     130        (WebKit::WebGPU::RemoteBufferProxy::unmap):
     131        (WebKit::WebGPU::RemoteBufferProxy::destroy):
     132        (WebKit::WebGPU::RemoteBufferProxy::setLabelInternal):
     133        * WebProcess/GPU/graphics/WebGPU/RemoteBufferProxy.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.h.
     134        * WebProcess/GPU/graphics/WebGPU/RemoteCommandBufferProxy.cpp: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h.
     135        (WebKit::WebGPU::RemoteCommandBufferProxy::RemoteCommandBufferProxy):
     136        (WebKit::WebGPU::RemoteCommandBufferProxy::~RemoteCommandBufferProxy):
     137        (WebKit::WebGPU::RemoteCommandBufferProxy::setLabelInternal):
     138        * WebProcess/GPU/graphics/WebGPU/RemoteCommandBufferProxy.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.h.
     139        * WebProcess/GPU/graphics/WebGPU/RemoteCommandEncoderProxy.cpp: Added.
     140        (WebKit::WebGPU::RemoteCommandEncoderProxy::RemoteCommandEncoderProxy):
     141        (WebKit::WebGPU::RemoteCommandEncoderProxy::~RemoteCommandEncoderProxy):
     142        (WebKit::WebGPU::RemoteCommandEncoderProxy::beginRenderPass):
     143        (WebKit::WebGPU::RemoteCommandEncoderProxy::beginComputePass):
     144        (WebKit::WebGPU::RemoteCommandEncoderProxy::copyBufferToBuffer):
     145        (WebKit::WebGPU::RemoteCommandEncoderProxy::copyBufferToTexture):
     146        (WebKit::WebGPU::RemoteCommandEncoderProxy::copyTextureToBuffer):
     147        (WebKit::WebGPU::RemoteCommandEncoderProxy::copyTextureToTexture):
     148        (WebKit::WebGPU::RemoteCommandEncoderProxy::fillBuffer):
     149        (WebKit::WebGPU::RemoteCommandEncoderProxy::pushDebugGroup):
     150        (WebKit::WebGPU::RemoteCommandEncoderProxy::popDebugGroup):
     151        (WebKit::WebGPU::RemoteCommandEncoderProxy::insertDebugMarker):
     152        (WebKit::WebGPU::RemoteCommandEncoderProxy::writeTimestamp):
     153        (WebKit::WebGPU::RemoteCommandEncoderProxy::resolveQuerySet):
     154        (WebKit::WebGPU::RemoteCommandEncoderProxy::finish):
     155        (WebKit::WebGPU::RemoteCommandEncoderProxy::setLabelInternal):
     156        * WebProcess/GPU/graphics/WebGPU/RemoteCommandEncoderProxy.h: Added.
     157        * WebProcess/GPU/graphics/WebGPU/RemoteComputePassEncoderProxy.cpp: Added.
     158        (WebKit::WebGPU::RemoteComputePassEncoderProxy::RemoteComputePassEncoderProxy):
     159        (WebKit::WebGPU::RemoteComputePassEncoderProxy::~RemoteComputePassEncoderProxy):
     160        (WebKit::WebGPU::RemoteComputePassEncoderProxy::setPipeline):
     161        (WebKit::WebGPU::RemoteComputePassEncoderProxy::dispatch):
     162        (WebKit::WebGPU::RemoteComputePassEncoderProxy::dispatchIndirect):
     163        (WebKit::WebGPU::RemoteComputePassEncoderProxy::beginPipelineStatisticsQuery):
     164        (WebKit::WebGPU::RemoteComputePassEncoderProxy::endPipelineStatisticsQuery):
     165        (WebKit::WebGPU::RemoteComputePassEncoderProxy::endPass):
     166        (WebKit::WebGPU::RemoteComputePassEncoderProxy::setBindGroup):
     167        (WebKit::WebGPU::RemoteComputePassEncoderProxy::pushDebugGroup):
     168        (WebKit::WebGPU::RemoteComputePassEncoderProxy::popDebugGroup):
     169        (WebKit::WebGPU::RemoteComputePassEncoderProxy::insertDebugMarker):
     170        (WebKit::WebGPU::RemoteComputePassEncoderProxy::setLabelInternal):
     171        * WebProcess/GPU/graphics/WebGPU/RemoteComputePassEncoderProxy.h: Added.
     172        * WebProcess/GPU/graphics/WebGPU/RemoteComputePipelineProxy.cpp: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h.
     173        (WebKit::WebGPU::RemoteComputePipelineProxy::RemoteComputePipelineProxy):
     174        (WebKit::WebGPU::RemoteComputePipelineProxy::~RemoteComputePipelineProxy):
     175        (WebKit::WebGPU::RemoteComputePipelineProxy::getBindGroupLayout):
     176        (WebKit::WebGPU::RemoteComputePipelineProxy::setLabelInternal):
     177        * WebProcess/GPU/graphics/WebGPU/RemoteComputePipelineProxy.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.h.
     178        * WebProcess/GPU/graphics/WebGPU/RemoteDeviceProxy.cpp: Added.
     179        (WebKit::WebGPU::RemoteDeviceProxy::RemoteDeviceProxy):
     180        (WebKit::WebGPU::RemoteDeviceProxy::~RemoteDeviceProxy):
     181        (WebKit::WebGPU::RemoteDeviceProxy::destroy):
     182        (WebKit::WebGPU::RemoteDeviceProxy::createBuffer):
     183        (WebKit::WebGPU::RemoteDeviceProxy::createTexture):
     184        (WebKit::WebGPU::RemoteDeviceProxy::createSampler):
     185        (WebKit::WebGPU::RemoteDeviceProxy::importExternalTexture):
     186        (WebKit::WebGPU::RemoteDeviceProxy::createBindGroupLayout):
     187        (WebKit::WebGPU::RemoteDeviceProxy::createPipelineLayout):
     188        (WebKit::WebGPU::RemoteDeviceProxy::createBindGroup):
     189        (WebKit::WebGPU::RemoteDeviceProxy::createShaderModule):
     190        (WebKit::WebGPU::RemoteDeviceProxy::createComputePipeline):
     191        (WebKit::WebGPU::RemoteDeviceProxy::createRenderPipeline):
     192        (WebKit::WebGPU::RemoteDeviceProxy::createComputePipelineAsync):
     193        (WebKit::WebGPU::RemoteDeviceProxy::createRenderPipelineAsync):
     194        (WebKit::WebGPU::RemoteDeviceProxy::createCommandEncoder):
     195        (WebKit::WebGPU::RemoteDeviceProxy::createRenderBundleEncoder):
     196        (WebKit::WebGPU::RemoteDeviceProxy::createQuerySet):
     197        (WebKit::WebGPU::RemoteDeviceProxy::pushErrorScope):
     198        (WebKit::WebGPU::RemoteDeviceProxy::popErrorScope):
     199        (WebKit::WebGPU::RemoteDeviceProxy::setLabelInternal):
     200        * WebProcess/GPU/graphics/WebGPU/RemoteDeviceProxy.h: Added.
     201        * WebProcess/GPU/graphics/WebGPU/RemoteExternalTextureProxy.cpp: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h.
     202        (WebKit::WebGPU::RemoteExternalTextureProxy::RemoteExternalTextureProxy):
     203        (WebKit::WebGPU::RemoteExternalTextureProxy::~RemoteExternalTextureProxy):
     204        (WebKit::WebGPU::RemoteExternalTextureProxy::setLabelInternal):
     205        * WebProcess/GPU/graphics/WebGPU/RemoteExternalTextureProxy.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.h.
     206        * WebProcess/GPU/graphics/WebGPU/RemoteGPUProxy.cpp: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h.
     207        (WebKit::WebGPU::RemoteGPUProxy::RemoteGPUProxy):
     208        (WebKit::WebGPU::RemoteGPUProxy::~RemoteGPUProxy):
     209        (WebKit::WebGPU::RemoteGPUProxy::requestAdapter):
     210        * WebProcess/GPU/graphics/WebGPU/RemoteGPUProxy.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.h.
     211        * WebProcess/GPU/graphics/WebGPU/RemotePipelineLayoutProxy.cpp: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h.
     212        (WebKit::WebGPU::RemotePipelineLayoutProxy::RemotePipelineLayoutProxy):
     213        (WebKit::WebGPU::RemotePipelineLayoutProxy::~RemotePipelineLayoutProxy):
     214        (WebKit::WebGPU::RemotePipelineLayoutProxy::setLabelInternal):
     215        * WebProcess/GPU/graphics/WebGPU/RemotePipelineLayoutProxy.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.h.
     216        * WebProcess/GPU/graphics/WebGPU/RemoteQuerySetProxy.cpp: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h.
     217        (WebKit::WebGPU::RemoteQuerySetProxy::RemoteQuerySetProxy):
     218        (WebKit::WebGPU::RemoteQuerySetProxy::~RemoteQuerySetProxy):
     219        (WebKit::WebGPU::RemoteQuerySetProxy::destroy):
     220        (WebKit::WebGPU::RemoteQuerySetProxy::setLabelInternal):
     221        * WebProcess/GPU/graphics/WebGPU/RemoteQuerySetProxy.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.h.
     222        * WebProcess/GPU/graphics/WebGPU/RemoteQueueProxy.cpp: Added.
     223        (WebKit::WebGPU::RemoteQueueProxy::RemoteQueueProxy):
     224        (WebKit::WebGPU::RemoteQueueProxy::~RemoteQueueProxy):
     225        (WebKit::WebGPU::RemoteQueueProxy::submit):
     226        (WebKit::WebGPU::RemoteQueueProxy::onSubmittedWorkDone):
     227        (WebKit::WebGPU::RemoteQueueProxy::writeBuffer):
     228        (WebKit::WebGPU::RemoteQueueProxy::writeTexture):
     229        (WebKit::WebGPU::RemoteQueueProxy::copyExternalImageToTexture):
     230        (WebKit::WebGPU::RemoteQueueProxy::setLabelInternal):
     231        * WebProcess/GPU/graphics/WebGPU/RemoteQueueProxy.h: Added.
     232        * WebProcess/GPU/graphics/WebGPU/RemoteRenderBundleEncoderProxy.cpp: Added.
     233        (WebKit::WebGPU::RemoteRenderBundleEncoderProxy::RemoteRenderBundleEncoderProxy):
     234        (WebKit::WebGPU::RemoteRenderBundleEncoderProxy::~RemoteRenderBundleEncoderProxy):
     235        (WebKit::WebGPU::RemoteRenderBundleEncoderProxy::setPipeline):
     236        (WebKit::WebGPU::RemoteRenderBundleEncoderProxy::setIndexBuffer):
     237        (WebKit::WebGPU::RemoteRenderBundleEncoderProxy::setVertexBuffer):
     238        (WebKit::WebGPU::RemoteRenderBundleEncoderProxy::draw):
     239        (WebKit::WebGPU::RemoteRenderBundleEncoderProxy::drawIndexed):
     240        (WebKit::WebGPU::RemoteRenderBundleEncoderProxy::drawIndirect):
     241        (WebKit::WebGPU::RemoteRenderBundleEncoderProxy::drawIndexedIndirect):
     242        (WebKit::WebGPU::RemoteRenderBundleEncoderProxy::setBindGroup):
     243        (WebKit::WebGPU::RemoteRenderBundleEncoderProxy::pushDebugGroup):
     244        (WebKit::WebGPU::RemoteRenderBundleEncoderProxy::popDebugGroup):
     245        (WebKit::WebGPU::RemoteRenderBundleEncoderProxy::insertDebugMarker):
     246        (WebKit::WebGPU::RemoteRenderBundleEncoderProxy::finish):
     247        (WebKit::WebGPU::RemoteRenderBundleEncoderProxy::setLabelInternal):
     248        * WebProcess/GPU/graphics/WebGPU/RemoteRenderBundleEncoderProxy.h: Added.
     249        * WebProcess/GPU/graphics/WebGPU/RemoteRenderBundleProxy.cpp: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h.
     250        (WebKit::WebGPU::RemoteRenderBundleProxy::RemoteRenderBundleProxy):
     251        (WebKit::WebGPU::RemoteRenderBundleProxy::~RemoteRenderBundleProxy):
     252        (WebKit::WebGPU::RemoteRenderBundleProxy::setLabelInternal):
     253        * WebProcess/GPU/graphics/WebGPU/RemoteRenderBundleProxy.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.h.
     254        * WebProcess/GPU/graphics/WebGPU/RemoteRenderPassEncoderProxy.cpp: Added.
     255        (WebKit::WebGPU::RemoteRenderPassEncoderProxy::RemoteRenderPassEncoderProxy):
     256        (WebKit::WebGPU::RemoteRenderPassEncoderProxy::~RemoteRenderPassEncoderProxy):
     257        (WebKit::WebGPU::RemoteRenderPassEncoderProxy::setPipeline):
     258        (WebKit::WebGPU::RemoteRenderPassEncoderProxy::setIndexBuffer):
     259        (WebKit::WebGPU::RemoteRenderPassEncoderProxy::setVertexBuffer):
     260        (WebKit::WebGPU::RemoteRenderPassEncoderProxy::draw):
     261        (WebKit::WebGPU::RemoteRenderPassEncoderProxy::drawIndexed):
     262        (WebKit::WebGPU::RemoteRenderPassEncoderProxy::drawIndirect):
     263        (WebKit::WebGPU::RemoteRenderPassEncoderProxy::drawIndexedIndirect):
     264        (WebKit::WebGPU::RemoteRenderPassEncoderProxy::setBindGroup):
     265        (WebKit::WebGPU::RemoteRenderPassEncoderProxy::pushDebugGroup):
     266        (WebKit::WebGPU::RemoteRenderPassEncoderProxy::popDebugGroup):
     267        (WebKit::WebGPU::RemoteRenderPassEncoderProxy::insertDebugMarker):
     268        (WebKit::WebGPU::RemoteRenderPassEncoderProxy::setViewport):
     269        (WebKit::WebGPU::RemoteRenderPassEncoderProxy::setScissorRect):
     270        (WebKit::WebGPU::RemoteRenderPassEncoderProxy::setBlendConstant):
     271        (WebKit::WebGPU::RemoteRenderPassEncoderProxy::setStencilReference):
     272        (WebKit::WebGPU::RemoteRenderPassEncoderProxy::beginOcclusionQuery):
     273        (WebKit::WebGPU::RemoteRenderPassEncoderProxy::endOcclusionQuery):
     274        (WebKit::WebGPU::RemoteRenderPassEncoderProxy::beginPipelineStatisticsQuery):
     275        (WebKit::WebGPU::RemoteRenderPassEncoderProxy::endPipelineStatisticsQuery):
     276        (WebKit::WebGPU::RemoteRenderPassEncoderProxy::executeBundles):
     277        (WebKit::WebGPU::RemoteRenderPassEncoderProxy::endPass):
     278        (WebKit::WebGPU::RemoteRenderPassEncoderProxy::setLabelInternal):
     279        * WebProcess/GPU/graphics/WebGPU/RemoteRenderPassEncoderProxy.h: Added.
     280        * WebProcess/GPU/graphics/WebGPU/RemoteRenderPipelineProxy.cpp: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h.
     281        (WebKit::WebGPU::RemoteRenderPipelineProxy::RemoteRenderPipelineProxy):
     282        (WebKit::WebGPU::RemoteRenderPipelineProxy::~RemoteRenderPipelineProxy):
     283        (WebKit::WebGPU::RemoteRenderPipelineProxy::getBindGroupLayout):
     284        (WebKit::WebGPU::RemoteRenderPipelineProxy::setLabelInternal):
     285        * WebProcess/GPU/graphics/WebGPU/RemoteRenderPipelineProxy.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.h.
     286        * WebProcess/GPU/graphics/WebGPU/RemoteSamplerProxy.cpp: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUProgrammableStage.h.
     287        (WebKit::WebGPU::RemoteSamplerProxy::RemoteSamplerProxy):
     288        (WebKit::WebGPU::RemoteSamplerProxy::~RemoteSamplerProxy):
     289        (WebKit::WebGPU::RemoteSamplerProxy::setLabelInternal):
     290        * WebProcess/GPU/graphics/WebGPU/RemoteSamplerProxy.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.h.
     291        * WebProcess/GPU/graphics/WebGPU/RemoteShaderModuleProxy.cpp: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h.
     292        (WebKit::WebGPU::RemoteShaderModuleProxy::RemoteShaderModuleProxy):
     293        (WebKit::WebGPU::RemoteShaderModuleProxy::~RemoteShaderModuleProxy):
     294        (WebKit::WebGPU::RemoteShaderModuleProxy::compilationInfo):
     295        (WebKit::WebGPU::RemoteShaderModuleProxy::setLabelInternal):
     296        * WebProcess/GPU/graphics/WebGPU/RemoteShaderModuleProxy.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.h.
     297        * WebProcess/GPU/graphics/WebGPU/RemoteTextureProxy.cpp: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h.
     298        (WebKit::WebGPU::RemoteTextureProxy::RemoteTextureProxy):
     299        (WebKit::WebGPU::RemoteTextureProxy::~RemoteTextureProxy):
     300        (WebKit::WebGPU::RemoteTextureProxy::createView const):
     301        (WebKit::WebGPU::RemoteTextureProxy::destroy):
     302        (WebKit::WebGPU::RemoteTextureProxy::setLabelInternal):
     303        * WebProcess/GPU/graphics/WebGPU/RemoteTextureProxy.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.h.
     304        * WebProcess/GPU/graphics/WebGPU/RemoteTextureViewProxy.cpp: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h.
     305        (WebKit::WebGPU::RemoteTextureViewProxy::RemoteTextureViewProxy):
     306        (WebKit::WebGPU::RemoteTextureViewProxy::~RemoteTextureViewProxy):
     307        (WebKit::WebGPU::RemoteTextureViewProxy::setLabelInternal):
     308        * WebProcess/GPU/graphics/WebGPU/RemoteTextureViewProxy.h: Copied from Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.h.
     309        * WebProcess/GPU/graphics/WebGPU/WebGPUDowncastConvertToBackingContext.cpp: Added.
     310        (WebKit::WebGPU::DowncastConvertToBackingContext::convertToBacking):
     311        * WebProcess/GPU/graphics/WebGPU/WebGPUDowncastConvertToBackingContext.h: Added.
     312        * WebProcess/GPU/graphics/cocoa/ImageBufferShareableIOSurfaceBackend.cpp:
     313
    13142021-11-16  Per Arne Vollan  <pvollan@apple.com>
    2315
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUBindGroupDescriptor.h

    r285879 r285881  
    2727
    2828#include "WebGPUBindGroupEntry.h"
    29 #include "WebGPUBindGroupLayout.h"
     29#include "WebGPUIdentifier.h"
    3030#include "WebGPUObjectDescriptorBase.h"
    3131#include <wtf/Vector.h>
    3232
    33 namespace PAL::WebGPU {
     33namespace WebKit::WebGPU {
    3434
    3535struct BindGroupDescriptor : public ObjectDescriptorBase {
    36     BindGroupLayout& layout;
     36    WebGPUIdentifier bindGroupLayout;
    3737    Vector<BindGroupEntry> entries;
    3838};
    3939
    40 } // namespace PAL::WebGPU
     40} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUBindGroupEntry.h

    r285879 r285881  
    2727
    2828#include "WebGPUBufferBinding.h"
    29 #include "WebGPUExternalTexture.h"
    30 #include "WebGPUIntegralTypes.h"
    31 #include "WebGPUSampler.h"
    32 #include "WebGPUTextureView.h"
    33 #include <utility>
    34 #include <variant>
     29#include "WebGPUIdentifier.h"
     30#include <cstdint>
     31#include <pal/graphics/WebGPU/WebGPUIntegralTypes.h>
    3532
    36 namespace PAL::WebGPU {
     33namespace WebKit::WebGPU {
    3734
    38 using BindingResource = std::variant<std::reference_wrapper<Sampler>, std::reference_wrapper<TextureView>, BufferBinding, std::reference_wrapper<ExternalTexture>>;
     35enum class BindingResourceType : uint8_t {
     36    Sampler,
     37    TextureView,
     38    BufferBinding,
     39    ExternalTexture,
     40};
    3941
    4042struct BindGroupEntry {
    41     Index32 binding;
    42     BindingResource resource;
     43    PAL::WebGPU::Index32 binding;
     44    BufferBinding bufferBinding;
     45    WebGPUIdentifier identifier;
     46    BindingResourceType type;
    4347};
    4448
    45 } // namespace PAL::WebGPU
     49} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUBindGroupLayoutDescriptor.h

    r285879 r285881  
    2626#pragma once
    2727
     28#include "WebGPUBindGroupLayoutEntry.h"
    2829#include "WebGPUObjectDescriptorBase.h"
    29 #include "WebGPUPipelineLayout.h"
     30#include <wtf/Vector.h>
    3031
    31 namespace PAL::WebGPU {
     32namespace WebKit::WebGPU {
    3233
    33 struct PipelineDescriptorBase : public ObjectDescriptorBase {
    34     PipelineLayout* layout;
     34struct BindGroupLayoutDescriptor : public ObjectDescriptorBase {
     35    Vector<BindGroupLayoutEntry> entries;
    3536};
    3637
    37 } // namespace PAL::WebGPU
     38} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUBindGroupLayoutEntry.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPURequestAdapterOptions.h"
     28#include "WebGPUBufferBindingLayout.h"
     29#include "WebGPUExternalTextureBindingLayout.h"
     30#include "WebGPUSamplerBindingLayout.h"
     31#include "WebGPUStorageTextureBindingLayout.h"
     32#include "WebGPUTextureBindingLayout.h"
    2933#include <optional>
    30 #include <utility>
    31 #include <wtf/RefCounted.h>
    32 #include <wtf/RefPtr.h>
     34#include <pal/graphics/WebGPU/WebGPUIntegralTypes.h>
     35#include <pal/graphics/WebGPU/WebGPUShaderStage.h>
    3336
    34 namespace PAL::WebGPU {
     37namespace WebKit::WebGPU {
    3538
    36 class Adapter;
     39struct BindGroupLayoutEntry {
     40    PAL::WebGPU::Index32 binding;
     41    PAL::WebGPU::ShaderStageFlags visibility;
    3742
    38 class GPU : public RefCounted<GPU> {
    39 public:
    40     virtual ~GPU() = default;
    41 
    42     virtual void requestAdapter(const RequestAdapterOptions&, std::function<void(RefPtr<Adapter>&&)>&&) = 0;
    43 
    44 protected:
    45     GPU() = default;
    46 
    47 private:
    48     GPU(const GPU&) = delete;
    49     GPU(GPU&&) = delete;
    50     GPU& operator=(const GPU&) = delete;
    51     GPU& operator=(GPU&&) = delete;
     43    std::optional<BufferBindingLayout> buffer;
     44    std::optional<SamplerBindingLayout> sampler;
     45    std::optional<TextureBindingLayout> texture;
     46    std::optional<StorageTextureBindingLayout> storageTexture;
     47    std::optional<ExternalTextureBindingLayout> externalTexture;
    5248};
    5349
    54 } // namespace PAL::WebGPU
     50} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUBlendComponent.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUObjectDescriptorBase.h"
    29 #include "WebGPUPipelineLayout.h"
     28#include <pal/graphics/WebGPU/WebGPUBlendFactor.h>
     29#include <pal/graphics/WebGPU/WebGPUBlendOperation.h>
    3030
    31 namespace PAL::WebGPU {
     31namespace WebKit::WebGPU {
    3232
    33 struct PipelineDescriptorBase : public ObjectDescriptorBase {
    34     PipelineLayout* layout;
     33struct BlendComponent {
     34    PAL::WebGPU::BlendOperation operation;
     35    PAL::WebGPU::BlendFactor srcFactor;
     36    PAL::WebGPU::BlendFactor dstFactor;
    3537};
    3638
    37 } // namespace PAL::WebGPU
     39} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUBlendState.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUBuffer.h"
    29 #include "WebGPUImageDataLayout.h"
    30 #include <wtf/Ref.h>
     28#include "WebGPUBlendComponent.h"
    3129
    32 namespace PAL::WebGPU {
     30namespace WebKit::WebGPU {
    3331
    34 struct ImageCopyBuffer : public ImageDataLayout {
    35     Buffer& buffer;
     32struct BlendState {
     33    BlendComponent color;
     34    BlendComponent alpha;
    3635};
    3736
    38 } // namespace PAL::WebGPU
     37} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUBufferBinding.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUBuffer.h"
    29 #include "WebGPUIntegralTypes.h"
     28#include "WebGPUIdentifier.h"
    3029#include <optional>
     30#include <pal/graphics/WebGPU/WebGPUIntegralTypes.h>
    3131#include <wtf/Ref.h>
    3232
    33 namespace PAL::WebGPU {
     33namespace WebKit::WebGPU {
    3434
    3535struct BufferBinding {
    36     Buffer& buffer;
    37     Size64 offset;
    38     std::optional<Size64> size;
     36    WebGPUIdentifier buffer;
     37    PAL::WebGPU::Size64 offset;
     38    std::optional<PAL::WebGPU::Size64> size;
    3939};
    4040
    41 } // namespace PAL::WebGPU
     41} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUBufferBindingLayout.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUObjectDescriptorBase.h"
    29 #include "WebGPUPipelineLayout.h"
     28#include <pal/graphics/WebGPU/WebGPUBufferBindingType.h>
     29#include <pal/graphics/WebGPU/WebGPUIntegralTypes.h>
    3030
    31 namespace PAL::WebGPU {
     31namespace WebKit::WebGPU {
    3232
    33 struct PipelineDescriptorBase : public ObjectDescriptorBase {
    34     PipelineLayout* layout;
     33struct BufferBindingLayout {
     34    PAL::WebGPU::BufferBindingType type;
     35    bool hasDynamicOffset;
     36    PAL::WebGPU::Size64 minBindingSize;
    3537};
    3638
    37 } // namespace PAL::WebGPU
     39} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUBufferDescriptor.h

    r285879 r285881  
    2727
    2828#include "WebGPUObjectDescriptorBase.h"
    29 #include "WebGPUPipelineLayout.h"
     29#include <pal/graphics/WebGPU/WebGPUBufferUsage.h>
     30#include <pal/graphics/WebGPU/WebGPUIntegralTypes.h>
    3031
    31 namespace PAL::WebGPU {
     32namespace WebKit::WebGPU {
    3233
    33 struct PipelineDescriptorBase : public ObjectDescriptorBase {
    34     PipelineLayout* layout;
     34struct BufferDescriptor : public ObjectDescriptorBase {
     35    PAL::WebGPU::Size64 size;
     36    PAL::WebGPU::BufferUsageFlags usage;
     37    bool mappedAtCreation;
    3538};
    3639
    37 } // namespace PAL::WebGPU
     40} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUCanvasConfiguration.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUBuffer.h"
    29 #include "WebGPUIntegralTypes.h"
     28#include "WebGPUExtent3D.h"
     29#include "WebGPUIdentifier.h"
     30#include <cstdint>
    3031#include <optional>
     32#include <pal/graphics/WebGPU/WebGPUCanvasCompositingAlphaMode.h>
     33#include <pal/graphics/WebGPU/WebGPUPredefinedColorSpace.h>
     34#include <pal/graphics/WebGPU/WebGPUTextureFormat.h>
    3135#include <wtf/Ref.h>
    3236
    33 namespace PAL::WebGPU {
     37namespace WebKit::WebGPU {
    3438
    35 struct BufferBinding {
    36     Buffer& buffer;
    37     Size64 offset;
    38     std::optional<Size64> size;
     39class Device;
     40
     41using TextureUsageFlags = uint32_t; // FIXME: This doesn't need to be here.
     42
     43struct CanvasConfiguration {
     44    WebGPUIdentifier device;
     45    PAL::WebGPU::TextureFormat format;
     46    TextureUsageFlags usage; // TextureUsage.RENDER_ATTACHMENT
     47    PAL::WebGPU::PredefinedColorSpace colorSpace;
     48    PAL::WebGPU::CanvasCompositingAlphaMode compositingAlphaMode;
     49    std::optional<Extent3D> size;
    3950};
    4051
    41 } // namespace PAL::WebGPU
     52} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUColor.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUObjectDescriptorBase.h"
    29 #include "WebGPUPipelineLayout.h"
     28#include <variant>
     29#include <wtf/Vector.h>
     30#include <wtf/text/WTFString.h>
    3031
    31 namespace PAL::WebGPU {
     32namespace WebKit::WebGPU {
    3233
    33 struct PipelineDescriptorBase : public ObjectDescriptorBase {
    34     PipelineLayout* layout;
     34struct ColorDict {
     35    double r;
     36    double g;
     37    double b;
     38    double a;
    3539};
    3640
    37 } // namespace PAL::WebGPU
     41using Color = std::variant<Vector<double>, ColorDict>;
     42
     43} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUColorTargetState.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUIntegralTypes.h"
    29 #include "WebGPUOrigin3D.h"
    30 #include "WebGPUTexture.h"
    31 #include "WebGPUTextureAspect.h"
     28#include "WebGPUBlendState.h"
    3229#include <optional>
    33 #include <wtf/Ref.h>
     30#include <pal/graphics/WebGPU/WebGPUColorWrite.h>
     31#include <pal/graphics/WebGPU/WebGPUTextureFormat.h>
    3432
    35 namespace PAL::WebGPU {
     33namespace WebKit::WebGPU {
    3634
    37 struct ImageCopyTexture {
    38     Texture& texture;
    39     IntegerCoordinate mipLevel;
    40     std::optional<Origin3D> origin;
    41     TextureAspect aspect;
     35struct ColorTargetState {
     36    PAL::WebGPU::TextureFormat format;
     37
     38    std::optional<BlendState> blend;
     39    PAL::WebGPU::ColorWriteFlags writeMask;
    4240};
    4341
    44 } // namespace PAL::WebGPU
     42} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUCommandBufferDescriptor.h

    r285879 r285881  
    2727
    2828#include "WebGPUObjectDescriptorBase.h"
    29 #include "WebGPUPipelineLayout.h"
    3029
    31 namespace PAL::WebGPU {
     30namespace WebKit::WebGPU {
    3231
    33 struct PipelineDescriptorBase : public ObjectDescriptorBase {
    34     PipelineLayout* layout;
     32struct CommandBufferDescriptor : public ObjectDescriptorBase {
    3533};
    3634
    37 } // namespace PAL::WebGPU
     35} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUCommandEncoderDescriptor.h

    r285879 r285881  
    2727
    2828#include "WebGPUObjectDescriptorBase.h"
    29 #include "WebGPUPipelineLayout.h"
    3029
    31 namespace PAL::WebGPU {
     30namespace WebKit::WebGPU {
    3231
    33 struct PipelineDescriptorBase : public ObjectDescriptorBase {
    34     PipelineLayout* layout;
     32struct CommandEncoderDescriptor : public ObjectDescriptorBase {
    3533};
    3634
    37 } // namespace PAL::WebGPU
     35} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUComputePassDescriptor.h

    r285879 r285881  
    2626#pragma once
    2727
     28#include "WebGPUComputePassTimestampWrites.h"
    2829#include "WebGPUObjectDescriptorBase.h"
    29 #include "WebGPUPipelineLayout.h"
    3030
    31 namespace PAL::WebGPU {
     31namespace WebKit::WebGPU {
    3232
    33 struct PipelineDescriptorBase : public ObjectDescriptorBase {
    34     PipelineLayout* layout;
     33struct ComputePassDescriptor : public ObjectDescriptorBase {
     34    ComputePassTimestampWrites timestampWrites;
    3535};
    3636
    37 } // namespace PAL::WebGPU
     37} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUComputePassTimestampWrites.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUComputePassTimestampLocation.h"
    29 #include "WebGPUIntegralTypes.h"
    30 #include "WebGPUQuerySet.h"
     28#include "WebGPUIdentifier.h"
     29#include <pal/graphics/WebGPU/WebGPUComputePassTimestampLocation.h>
     30#include <pal/graphics/WebGPU/WebGPUIntegralTypes.h>
    3131#include <wtf/Ref.h>
    3232#include <wtf/Vector.h>
    3333
    34 namespace PAL::WebGPU {
     34namespace WebKit::WebGPU {
    3535
    3636struct ComputePassTimestampWrite {
    37     QuerySet& querySet;
    38     Size32 queryIndex;
    39     ComputePassTimestampLocation location;
     37    WebGPUIdentifier querySet;
     38    PAL::WebGPU::Size32 queryIndex;
     39    PAL::WebGPU::ComputePassTimestampLocation location;
    4040};
    4141
    4242using ComputePassTimestampWrites = Vector<ComputePassTimestampWrite>;
    4343
    44 } // namespace PAL::WebGPU
     44} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUComputePipelineDescriptor.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUObjectDescriptorBase.h"
    29 #include "WebGPUPipelineLayout.h"
     28#include "WebGPUPipelineDescriptorBase.h"
     29#include "WebGPUProgrammableStage.h"
    3030
    31 namespace PAL::WebGPU {
     31namespace WebKit::WebGPU {
    3232
    33 struct PipelineDescriptorBase : public ObjectDescriptorBase {
    34     PipelineLayout* layout;
     33struct ComputePipelineDescriptor : public PipelineDescriptorBase {
     34    ProgrammableStage compute;
    3535};
    3636
    37 } // namespace PAL::WebGPU
     37} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUDepthStencilState.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPURequestAdapterOptions.h"
     28#include "WebGPUStencilFaceState.h"
    2929#include <optional>
    30 #include <utility>
    31 #include <wtf/RefCounted.h>
    32 #include <wtf/RefPtr.h>
     30#include <pal/graphics/WebGPU/WebGPUCompareFunction.h>
     31#include <pal/graphics/WebGPU/WebGPUIntegralTypes.h>
     32#include <pal/graphics/WebGPU/WebGPUTextureFormat.h>
    3333
    34 namespace PAL::WebGPU {
     34namespace WebKit::WebGPU {
    3535
    36 class Adapter;
     36struct DepthStencilState {
     37    PAL::WebGPU::TextureFormat format;
    3738
    38 class GPU : public RefCounted<GPU> {
    39 public:
    40     virtual ~GPU() = default;
     39    bool depthWriteEnabled;
     40    PAL::WebGPU::CompareFunction depthCompare;
    4141
    42     virtual void requestAdapter(const RequestAdapterOptions&, std::function<void(RefPtr<Adapter>&&)>&&) = 0;
     42    StencilFaceState stencilFront;
     43    StencilFaceState stencilBack;
    4344
    44 protected:
    45     GPU() = default;
     45    std::optional<PAL::WebGPU::StencilValue> stencilReadMask;
     46    std::optional<PAL::WebGPU::StencilValue> stencilWriteMask;
    4647
    47 private:
    48     GPU(const GPU&) = delete;
    49     GPU(GPU&&) = delete;
    50     GPU& operator=(const GPU&) = delete;
    51     GPU& operator=(GPU&&) = delete;
     48    PAL::WebGPU::DepthBias depthBias;
     49    float depthBiasSlopeScale;
     50    float depthBiasClamp;
    5251};
    5352
    54 } // namespace PAL::WebGPU
     53} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUDeviceDescriptor.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUFeatureName.h"
    2928#include "WebGPUObjectDescriptorBase.h"
    3029#include <cstdint>
     30#include <pal/graphics/WebGPU/WebGPUFeatureName.h>
    3131#include <wtf/HashMap.h>
    3232#include <wtf/KeyValuePair.h>
    3333#include <wtf/Vector.h>
    3434
    35 namespace PAL::WebGPU {
     35namespace WebKit::WebGPU {
    3636
    3737struct DeviceDescriptor : public ObjectDescriptorBase {
    38     Vector<FeatureName> requiredFeatures;
    39     // Vector<KeyValuePair<String, uint64_t>> requiredLimits;
     38    Vector<PAL::WebGPU::FeatureName> requiredFeatures;
     39    // FIXME: Add support for requiredLimits.
    4040};
    4141
    42 } // namespace PAL::WebGPU
     42} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUExtent3D.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUColor.h"
    29 #include "WebGPULoadOp.h"
    30 #include "WebGPUStoreOp.h"
    31 #include "WebGPUTextureView.h"
     28#include <pal/graphics/WebGPU/WebGPUIntegralTypes.h>
    3229#include <variant>
    33 #include <wtf/Ref.h>
    3430#include <wtf/Vector.h>
    3531
    36 namespace PAL::WebGPU {
     32namespace WebKit::WebGPU {
    3733
    38 struct RenderPassColorAttachment {
    39     TextureView& view;
    40     TextureView* resolveTarget;
    41 
    42     std::variant<LoadOp, Vector<double>, ColorDict> loadValue;
    43     StoreOp storeOp;
     34struct Extent3DDict {
     35    PAL::WebGPU::IntegerCoordinate width;
     36    PAL::WebGPU::IntegerCoordinate height;
     37    PAL::WebGPU::IntegerCoordinate depthOrArrayLayers;
    4438};
    4539
    46 } // namespace PAL::WebGPU
     40using Extent3D = std::variant<Vector<PAL::WebGPU::IntegerCoordinate>, Extent3DDict>;
     41
     42} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUExternalTextureBindingLayout.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUBuffer.h"
    29 #include "WebGPUImageDataLayout.h"
    30 #include <wtf/Ref.h>
     28namespace WebKit::WebGPU {
    3129
    32 namespace PAL::WebGPU {
    33 
    34 struct ImageCopyBuffer : public ImageDataLayout {
    35     Buffer& buffer;
     30struct ExternalTextureBindingLayout {
    3631};
    3732
    38 } // namespace PAL::WebGPU
     33} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUExternalTextureDescriptor.h

    r285879 r285881  
    2727
    2828#include "WebGPUObjectDescriptorBase.h"
    29 #include "WebGPUPipelineLayout.h"
     29#include <pal/graphics/WebGPU/WebGPUPredefinedColorSpace.h>
    3030
    31 namespace PAL::WebGPU {
     31namespace WebKit::WebGPU {
    3232
    33 struct PipelineDescriptorBase : public ObjectDescriptorBase {
    34     PipelineLayout* layout;
     33struct ExternalTextureDescriptor : public ObjectDescriptorBase {
     34    PAL::WebGPU::PredefinedColorSpace colorSpace;
    3535};
    3636
    37 } // namespace PAL::WebGPU
     37} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUFragmentState.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUObjectDescriptorBase.h"
    29 #include "WebGPUPipelineLayout.h"
     28#include "WebGPUColorTargetState.h"
     29#include "WebGPUProgrammableStage.h"
     30#include <wtf/Vector.h>
    3031
    31 namespace PAL::WebGPU {
     32namespace WebKit::WebGPU {
    3233
    33 struct PipelineDescriptorBase : public ObjectDescriptorBase {
    34     PipelineLayout* layout;
     34struct FragmentState : public ProgrammableStage {
     35    Vector<ColorTargetState> targets;
    3536};
    3637
    37 } // namespace PAL::WebGPU
     38} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUIdentifier.h

    r285879 r285881  
    11/*
    2  * Copyright (C) 2021 Apple Inc. All rights reserved.
     2 * Copyright (C) 2020 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2626#pragma once
    2727
    28 #include "WebGPUBuffer.h"
    29 #include "WebGPUImageDataLayout.h"
    30 #include <wtf/Ref.h>
     28#if ENABLE(GPU_PROCESS)
    3129
    32 namespace PAL::WebGPU {
     30#include <wtf/ObjectIdentifier.h>
    3331
    34 struct ImageCopyBuffer : public ImageDataLayout {
    35     Buffer& buffer;
    36 };
     32namespace WebKit {
    3733
    38 } // namespace PAL::WebGPU
     34enum WebGPUIdentifierType { };
     35using WebGPUIdentifier = ObjectIdentifier<WebGPUIdentifierType>;
     36
     37} // namespace WebKit
     38
     39#endif
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUImageCopyBuffer.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUBuffer.h"
     28#include "WebGPUIdentifier.h"
    2929#include "WebGPUImageDataLayout.h"
    3030#include <wtf/Ref.h>
    3131
    32 namespace PAL::WebGPU {
     32namespace WebKit::WebGPU {
    3333
    3434struct ImageCopyBuffer : public ImageDataLayout {
    35     Buffer& buffer;
     35    WebGPUIdentifier buffer;
    3636};
    3737
    38 } // namespace PAL::WebGPU
     38} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUImageCopyExternalImage.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUBuffer.h"
    29 #include "WebGPUIntegralTypes.h"
     28#include "WebGPUOrigin2D.h"
    3029#include <optional>
    31 #include <wtf/Ref.h>
     30#include <variant>
    3231
    33 namespace PAL::WebGPU {
     32namespace WebKit::WebGPU {
    3433
    35 struct BufferBinding {
    36     Buffer& buffer;
    37     Size64 offset;
    38     std::optional<Size64> size;
     34struct ImageCopyExternalImage {
     35    // std::variant<RefPtr<ImageBitmap>, RefPtr<HTMLCanvasElement>> source;
     36    std::optional<Origin2D> origin;
    3937};
    4038
    41 } // namespace PAL::WebGPU
     39} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUImageCopyTexture.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUIntegralTypes.h"
     28#include "WebGPUIdentifier.h"
    2929#include "WebGPUOrigin3D.h"
    30 #include "WebGPUTexture.h"
    31 #include "WebGPUTextureAspect.h"
    3230#include <optional>
     31#include <pal/graphics/WebGPU/WebGPUIntegralTypes.h>
     32#include <pal/graphics/WebGPU/WebGPUTextureAspect.h>
    3333#include <wtf/Ref.h>
    3434
    35 namespace PAL::WebGPU {
     35namespace WebKit::WebGPU {
    3636
    3737struct ImageCopyTexture {
    38     Texture& texture;
    39     IntegerCoordinate mipLevel;
     38    WebGPUIdentifier texture;
     39    PAL::WebGPU::IntegerCoordinate mipLevel;
    4040    std::optional<Origin3D> origin;
    41     TextureAspect aspect;
     41    PAL::WebGPU::TextureAspect aspect;
    4242};
    4343
    44 } // namespace PAL::WebGPU
     44} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUImageCopyTextureTagged.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUObjectDescriptorBase.h"
    29 #include "WebGPUPipelineLayout.h"
     28#include "WebGPUImageCopyTexture.h"
     29#include <pal/graphics/WebGPU/WebGPUPredefinedColorSpace.h>
    3030
    31 namespace PAL::WebGPU {
     31namespace WebKit::WebGPU {
    3232
    33 struct PipelineDescriptorBase : public ObjectDescriptorBase {
    34     PipelineLayout* layout;
     33struct ImageCopyTextureTagged : public ImageCopyTexture {
     34    PAL::WebGPU::PredefinedColorSpace colorSpace;
     35    bool premultipliedAlpha;
    3536};
    3637
    37 } // namespace PAL::WebGPU
     38} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUImageDataLayout.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUBuffer.h"
    29 #include "WebGPUIntegralTypes.h"
    3028#include <optional>
    31 #include <wtf/Ref.h>
     29#include <pal/graphics/WebGPU/WebGPUIntegralTypes.h>
    3230
    33 namespace PAL::WebGPU {
     31namespace WebKit::WebGPU {
    3432
    35 struct BufferBinding {
    36     Buffer& buffer;
    37     Size64 offset;
    38     std::optional<Size64> size;
     33struct ImageDataLayout {
     34    PAL::WebGPU::Size64 offset;
     35    std::optional<PAL::WebGPU::Size32> bytesPerRow;
     36    std::optional<PAL::WebGPU::Size32> rowsPerImage;
    3937};
    4038
    41 } // namespace PAL::WebGPU
     39} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUMultisampleState.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUObjectDescriptorBase.h"
    29 #include "WebGPUPipelineLayout.h"
     28#include <pal/graphics/WebGPU/WebGPUIntegralTypes.h>
    3029
    31 namespace PAL::WebGPU {
     30namespace WebKit::WebGPU {
    3231
    33 struct PipelineDescriptorBase : public ObjectDescriptorBase {
    34     PipelineLayout* layout;
     32struct MultisampleState {
     33    PAL::WebGPU::Size32 count;
     34    PAL::WebGPU::SampleMask mask;
     35    bool alphaToCoverageEnabled;
    3536};
    3637
    37 } // namespace PAL::WebGPU
     38} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUObjectDescriptorBase.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUBuffer.h"
    29 #include "WebGPUImageDataLayout.h"
    30 #include <wtf/Ref.h>
     28#include <wtf/text/WTFString.h>
    3129
    32 namespace PAL::WebGPU {
     30namespace WebKit::WebGPU {
    3331
    34 struct ImageCopyBuffer : public ImageDataLayout {
    35     Buffer& buffer;
     32struct ObjectDescriptorBase {
     33    String label;
    3634};
    3735
    38 } // namespace PAL::WebGPU
     36} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUOrigin2D.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUBindGroupLayout.h"
    29 #include "WebGPUObjectDescriptorBase.h"
    30 #include <utility>
     28#include <pal/graphics/WebGPU/WebGPUIntegralTypes.h>
     29#include <variant>
    3130#include <wtf/Vector.h>
    3231
    33 namespace PAL::WebGPU {
     32namespace WebKit::WebGPU {
    3433
    35 struct PipelineLayoutDescriptor : public ObjectDescriptorBase {
    36     Vector<std::reference_wrapper<BindGroupLayout>> bindGroupLayouts;
     34struct Origin2DDict {
     35    PAL::WebGPU::IntegerCoordinate x;
     36    PAL::WebGPU::IntegerCoordinate y;
    3737};
    3838
    39 } // namespace PAL::WebGPU
     39using Origin2D = std::variant<Vector<PAL::WebGPU::IntegerCoordinate>, Origin2DDict>;
     40
     41} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUOrigin3D.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUColor.h"
    29 #include "WebGPULoadOp.h"
    30 #include "WebGPUStoreOp.h"
    31 #include "WebGPUTextureView.h"
     28#include <pal/graphics/WebGPU/WebGPUIntegralTypes.h>
    3229#include <variant>
    33 #include <wtf/Ref.h>
    3430#include <wtf/Vector.h>
    3531
    36 namespace PAL::WebGPU {
     32namespace WebKit::WebGPU {
    3733
    38 struct RenderPassColorAttachment {
    39     TextureView& view;
    40     TextureView* resolveTarget;
    41 
    42     std::variant<LoadOp, Vector<double>, ColorDict> loadValue;
    43     StoreOp storeOp;
     34struct Origin3DDict {
     35    PAL::WebGPU::IntegerCoordinate x;
     36    PAL::WebGPU::IntegerCoordinate y;
     37    PAL::WebGPU::IntegerCoordinate z;
    4438};
    4539
    46 } // namespace PAL::WebGPU
     40using Origin3D = std::variant<Vector<PAL::WebGPU::IntegerCoordinate>, Origin3DDict>;
     41
     42} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUPipelineDescriptorBase.h

    r285879 r285881  
    2626#pragma once
    2727
     28#include "WebGPUIdentifier.h"
    2829#include "WebGPUObjectDescriptorBase.h"
    29 #include "WebGPUPipelineLayout.h"
    3030
    31 namespace PAL::WebGPU {
     31namespace WebKit::WebGPU {
    3232
    3333struct PipelineDescriptorBase : public ObjectDescriptorBase {
    34     PipelineLayout* layout;
     34    WebGPUIdentifier layout;
    3535};
    3636
    37 } // namespace PAL::WebGPU
     37} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUPipelineLayoutDescriptor.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUBindGroupLayout.h"
     28#include "WebGPUIdentifier.h"
    2929#include "WebGPUObjectDescriptorBase.h"
    30 #include <utility>
    3130#include <wtf/Vector.h>
    3231
    33 namespace PAL::WebGPU {
     32namespace WebKit::WebGPU {
    3433
    3534struct PipelineLayoutDescriptor : public ObjectDescriptorBase {
    36     Vector<std::reference_wrapper<BindGroupLayout>> bindGroupLayouts;
     35    Vector<WebGPUIdentifier> bindGroupLayouts;
    3736};
    3837
    39 } // namespace PAL::WebGPU
     38} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUPrimitiveState.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPURequestAdapterOptions.h"
    2928#include <optional>
    30 #include <utility>
    31 #include <wtf/RefCounted.h>
    32 #include <wtf/RefPtr.h>
     29#include <pal/graphics/WebGPU/WebGPUCullMode.h>
     30#include <pal/graphics/WebGPU/WebGPUFrontFace.h>
     31#include <pal/graphics/WebGPU/WebGPUIndexFormat.h>
     32#include <pal/graphics/WebGPU/WebGPUIntegralTypes.h>
     33#include <pal/graphics/WebGPU/WebGPUPrimitiveTopology.h>
    3334
    34 namespace PAL::WebGPU {
     35namespace WebKit::WebGPU {
    3536
    36 class Adapter;
     37struct PrimitiveState {
     38    PAL::WebGPU::PrimitiveTopology topology;
     39    std::optional<PAL::WebGPU::IndexFormat> stripIndexFormat;
     40    PAL::WebGPU::FrontFace frontFace;
     41    PAL::WebGPU::CullMode cullMode;
    3742
    38 class GPU : public RefCounted<GPU> {
    39 public:
    40     virtual ~GPU() = default;
    41 
    42     virtual void requestAdapter(const RequestAdapterOptions&, std::function<void(RefPtr<Adapter>&&)>&&) = 0;
    43 
    44 protected:
    45     GPU() = default;
    46 
    47 private:
    48     GPU(const GPU&) = delete;
    49     GPU(GPU&&) = delete;
    50     GPU& operator=(const GPU&) = delete;
    51     GPU& operator=(GPU&&) = delete;
     43    // Requires "depth-clip-control" feature.
     44    bool unclippedDepth;
    5245};
    5346
    54 } // namespace PAL::WebGPU
     47} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUProgrammableStage.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUShaderModule.h"
     28#include "WebGPUIdentifier.h"
    2929#include <wtf/KeyValuePair.h>
    3030#include <wtf/Ref.h>
    3131#include <wtf/Vector.h>
    3232
    33 namespace PAL::WebGPU {
     33namespace WebKit::WebGPU {
    3434
    3535using PipelineConstantValue = double; // May represent WGSL’s bool, f32, i32, u32.
    3636
    3737struct ProgrammableStage {
    38     ShaderModule& module;
     38    WebGPUIdentifier module;
    3939    String entryPoint;
    4040    Vector<KeyValuePair<String, PipelineConstantValue>> constants;
    4141};
    4242
    43 } // namespace PAL::WebGPU
     43} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUQuerySetDescriptor.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUFeatureName.h"
    2928#include "WebGPUObjectDescriptorBase.h"
    30 #include <cstdint>
    31 #include <wtf/HashMap.h>
    32 #include <wtf/KeyValuePair.h>
     29#include <pal/graphics/WebGPU/WebGPUIntegralTypes.h>
     30#include <pal/graphics/WebGPU/WebGPUPipelineStatisticName.h>
     31#include <pal/graphics/WebGPU/WebGPUQueryType.h>
    3332#include <wtf/Vector.h>
    3433
    35 namespace PAL::WebGPU {
     34namespace WebKit::WebGPU {
    3635
    37 struct DeviceDescriptor : public ObjectDescriptorBase {
    38     Vector<FeatureName> requiredFeatures;
    39     // Vector<KeyValuePair<String, uint64_t>> requiredLimits;
     36struct QuerySetDescriptor : public ObjectDescriptorBase {
     37    PAL::WebGPU::QueryType type;
     38    PAL::WebGPU::Size32 count;
     39    Vector<PAL::WebGPU::PipelineStatisticName> pipelineStatistics;
    4040};
    4141
    42 } // namespace PAL::WebGPU
     42} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPURenderBundleDescriptor.h

    r285879 r285881  
    2727
    2828#include "WebGPUObjectDescriptorBase.h"
    29 #include "WebGPUPipelineLayout.h"
    3029
    31 namespace PAL::WebGPU {
     30namespace WebKit::WebGPU {
    3231
    33 struct PipelineDescriptorBase : public ObjectDescriptorBase {
    34     PipelineLayout* layout;
     32struct RenderBundleDescriptor : public ObjectDescriptorBase {
    3533};
    3634
    37 } // namespace PAL::WebGPU
     35} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPURenderBundleEncoderDescriptor.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUBuffer.h"
    29 #include "WebGPUImageDataLayout.h"
    30 #include <wtf/Ref.h>
     28#include "WebGPURenderPassLayout.h"
    3129
    32 namespace PAL::WebGPU {
     30namespace WebKit::WebGPU {
    3331
    34 struct ImageCopyBuffer : public ImageDataLayout {
    35     Buffer& buffer;
     32struct RenderBundleEncoderDescriptor : public RenderPassLayout {
     33    bool depthReadOnly;
     34    bool stencilReadOnly;
    3635};
    3736
    38 } // namespace PAL::WebGPU
     37} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPURenderPassColorAttachment.h

    r285879 r285881  
    2727
    2828#include "WebGPUColor.h"
    29 #include "WebGPULoadOp.h"
    30 #include "WebGPUStoreOp.h"
    31 #include "WebGPUTextureView.h"
     29#include "WebGPUIdentifier.h"
     30#include <pal/graphics/WebGPU/WebGPULoadOp.h>
     31#include <pal/graphics/WebGPU/WebGPUStoreOp.h>
    3232#include <variant>
    3333#include <wtf/Ref.h>
    3434#include <wtf/Vector.h>
    3535
    36 namespace PAL::WebGPU {
     36namespace WebKit::WebGPU {
    3737
    3838struct RenderPassColorAttachment {
    39     TextureView& view;
    40     TextureView* resolveTarget;
     39    WebGPUIdentifier view;
     40    WebGPUIdentifier resolveTarget;
    4141
    42     std::variant<LoadOp, Vector<double>, ColorDict> loadValue;
    43     StoreOp storeOp;
     42    std::variant<PAL::WebGPU::LoadOp, Vector<double>, ColorDict> loadValue;
     43    PAL::WebGPU::StoreOp storeOp;
    4444};
    4545
    46 } // namespace PAL::WebGPU
     46} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPURenderPassDepthStencilAttachment.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUIntegralTypes.h"
    29 #include "WebGPULoadOp.h"
    30 #include "WebGPUStoreOp.h"
    31 #include "WebGPUTextureView.h"
     28#include "WebGPUIdentifier.h"
     29#include <pal/graphics/WebGPU/WebGPUIntegralTypes.h>
     30#include <pal/graphics/WebGPU/WebGPULoadOp.h>
     31#include <pal/graphics/WebGPU/WebGPUStoreOp.h>
    3232#include <variant>
    3333#include <wtf/Ref.h>
    3434
    35 namespace PAL::WebGPU {
     35namespace WebKit::WebGPU {
    3636
    3737struct RenderPassDepthStencilAttachment {
    38     TextureView& view;
     38    WebGPUIdentifier view;
    3939
    40     std::variant<LoadOp, float> depthLoadValue;
    41     StoreOp depthStoreOp;
     40    std::variant<PAL::WebGPU::LoadOp, float> depthLoadValue;
     41    PAL::WebGPU::StoreOp depthStoreOp;
    4242    bool depthReadOnly;
    4343
    44     std::variant<LoadOp, StencilValue> stencilLoadValue;
    45     StoreOp stencilStoreOp;
     44    std::variant<PAL::WebGPU::LoadOp, PAL::WebGPU::StencilValue> stencilLoadValue;
     45    PAL::WebGPU::StoreOp stencilStoreOp;
    4646    bool stencilReadOnly;
    4747};
    4848
    49 } // namespace PAL::WebGPU
     49} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPURenderPassDescriptor.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUBindGroupLayout.h"
     28#include "WebGPUIdentifier.h"
    2929#include "WebGPUObjectDescriptorBase.h"
    30 #include <utility>
     30#include "WebGPURenderPassColorAttachment.h"
     31#include "WebGPURenderPassDepthStencilAttachment.h"
     32#include "WebGPURenderPassTimestampWrites.h"
     33#include <optional>
    3134#include <wtf/Vector.h>
    3235
    33 namespace PAL::WebGPU {
     36namespace WebKit::WebGPU {
    3437
    35 struct PipelineLayoutDescriptor : public ObjectDescriptorBase {
    36     Vector<std::reference_wrapper<BindGroupLayout>> bindGroupLayouts;
     38struct RenderPassDescriptor : public ObjectDescriptorBase {
     39    Vector<RenderPassColorAttachment> colorAttachments;
     40    std::optional<RenderPassDepthStencilAttachment> depthStencilAttachment;
     41    WebGPUIdentifier occlusionQuerySet;
     42    RenderPassTimestampWrites timestampWrites;
    3743};
    3844
    39 } // namespace PAL::WebGPU
     45} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPURenderPassLayout.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUFeatureName.h"
    2928#include "WebGPUObjectDescriptorBase.h"
    30 #include <cstdint>
    31 #include <wtf/HashMap.h>
    32 #include <wtf/KeyValuePair.h>
     29#include <optional>
     30#include <pal/graphics/WebGPU/WebGPUIntegralTypes.h>
     31#include <pal/graphics/WebGPU/WebGPUTextureFormat.h>
    3332#include <wtf/Vector.h>
    3433
    35 namespace PAL::WebGPU {
     34namespace WebKit::WebGPU {
    3635
    37 struct DeviceDescriptor : public ObjectDescriptorBase {
    38     Vector<FeatureName> requiredFeatures;
    39     // Vector<KeyValuePair<String, uint64_t>> requiredLimits;
     36struct RenderPassLayout : public ObjectDescriptorBase {
     37    Vector<PAL::WebGPU::TextureFormat> colorFormats;
     38    std::optional<PAL::WebGPU::TextureFormat> depthStencilFormat;
     39    PAL::WebGPU::Size32 sampleCount;
    4040};
    4141
    42 } // namespace PAL::WebGPU
     42} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPURenderPassTimestampWrites.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUIntegralTypes.h"
    29 #include "WebGPUQuerySet.h"
    30 #include "WebGPURenderPassTimestampLocation.h"
     28#include "WebGPUIdentifier.h"
     29#include <pal/graphics/WebGPU/WebGPUIntegralTypes.h>
     30#include <pal/graphics/WebGPU/WebGPURenderPassTimestampLocation.h>
    3131#include <wtf/Ref.h>
    3232#include <wtf/Vector.h>
    3333
    34 namespace PAL::WebGPU {
     34namespace WebKit::WebGPU {
    3535
    3636struct RenderPassTimestampWrite {
    37     QuerySet& querySet;
    38     Size32 queryIndex;
    39     RenderPassTimestampLocation location;
     37    WebGPUIdentifier querySet;
     38    PAL::WebGPU::Size32 queryIndex;
     39    PAL::WebGPU::RenderPassTimestampLocation location;
    4040};
    4141
    4242using RenderPassTimestampWrites = Vector<RenderPassTimestampWrite>;
    4343
    44 } // namespace PAL::WebGPU
     44} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPURenderPipelineDescriptor.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUIntegralTypes.h"
    29 #include "WebGPUOrigin3D.h"
    30 #include "WebGPUTexture.h"
    31 #include "WebGPUTextureAspect.h"
     28#include "WebGPUDepthStencilState.h"
     29#include "WebGPUFragmentState.h"
     30#include "WebGPUMultisampleState.h"
     31#include "WebGPUPipelineDescriptorBase.h"
     32#include "WebGPUPrimitiveState.h"
     33#include "WebGPUVertexState.h"
    3234#include <optional>
    33 #include <wtf/Ref.h>
    3435
    35 namespace PAL::WebGPU {
     36namespace WebKit::WebGPU {
    3637
    37 struct ImageCopyTexture {
    38     Texture& texture;
    39     IntegerCoordinate mipLevel;
    40     std::optional<Origin3D> origin;
    41     TextureAspect aspect;
     38struct RenderPipelineDescriptor : public PipelineDescriptorBase {
     39    VertexState vertex;
     40    std::optional<PrimitiveState> primitive;
     41    std::optional<DepthStencilState> depthStencil;
     42    std::optional<MultisampleState> multisample;
     43    std::optional<FragmentState> fragment;
    4244};
    4345
    44 } // namespace PAL::WebGPU
     46} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPURequestAdapterOptions.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUBuffer.h"
    29 #include "WebGPUIntegralTypes.h"
    3028#include <optional>
    31 #include <wtf/Ref.h>
     29#include <pal/graphics/WebGPU/WebGPUPowerPreference.h>
    3230
    33 namespace PAL::WebGPU {
     31namespace WebKit::WebGPU {
    3432
    35 struct BufferBinding {
    36     Buffer& buffer;
    37     Size64 offset;
    38     std::optional<Size64> size;
     33struct RequestAdapterOptions {
     34    std::optional<PAL::WebGPU::PowerPreference> powerPreference;
     35    bool forceFallbackAdapter;
    3936};
    4037
    41 } // namespace PAL::WebGPU
     38} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUSamplerBindingLayout.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUBuffer.h"
    29 #include "WebGPUImageDataLayout.h"
    30 #include <wtf/Ref.h>
     28#include <pal/graphics/WebGPU/WebGPUSamplerBindingType.h>
    3129
    32 namespace PAL::WebGPU {
     30namespace WebKit::WebGPU {
    3331
    34 struct ImageCopyBuffer : public ImageDataLayout {
    35     Buffer& buffer;
     32struct SamplerBindingLayout {
     33    PAL::WebGPU::SamplerBindingType type;
    3634};
    3735
    38 } // namespace PAL::WebGPU
     36} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUSamplerDescriptor.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUFeatureName.h"
    2928#include "WebGPUObjectDescriptorBase.h"
    3029#include <cstdint>
    31 #include <wtf/HashMap.h>
    32 #include <wtf/KeyValuePair.h>
    33 #include <wtf/Vector.h>
     30#include <optional>
     31#include <pal/graphics/WebGPU/WebGPUAddressMode.h>
     32#include <pal/graphics/WebGPU/WebGPUCompareFunction.h>
     33#include <pal/graphics/WebGPU/WebGPUFilterMode.h>
    3434
    35 namespace PAL::WebGPU {
     35namespace WebKit::WebGPU {
    3636
    37 struct DeviceDescriptor : public ObjectDescriptorBase {
    38     Vector<FeatureName> requiredFeatures;
    39     // Vector<KeyValuePair<String, uint64_t>> requiredLimits;
     37struct SamplerDescriptor : public ObjectDescriptorBase {
     38    PAL::WebGPU::AddressMode addressModeU;
     39    PAL::WebGPU::AddressMode addressModeV;
     40    PAL::WebGPU::AddressMode addressModeW;
     41    PAL::WebGPU::FilterMode magFilter;
     42    PAL::WebGPU::FilterMode minFilter;
     43    PAL::WebGPU::FilterMode mipmapFilter;
     44    float lodMinClamp;
     45    float lodMaxClamp;
     46    std::optional<PAL::WebGPU::CompareFunction> compare;
     47    uint16_t maxAnisotropy;
    4048};
    4149
    42 } // namespace PAL::WebGPU
     50} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUShaderModuleDescriptor.h

    r285879 r285881  
    2727
    2828#include "WebGPUObjectDescriptorBase.h"
    29 #include "WebGPUPipelineLayout.h"
     29#include <wtf/text/WTFString.h>
    3030
    31 namespace PAL::WebGPU {
     31namespace WebKit::WebGPU {
    3232
    33 struct PipelineDescriptorBase : public ObjectDescriptorBase {
    34     PipelineLayout* layout;
     33struct ShaderModuleDescriptor : public ObjectDescriptorBase {
     34    String code;
     35    // JSC::Strong<JSC::JSObject> sourceMap;
    3536};
    3637
    37 } // namespace PAL::WebGPU
     38} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUStencilFaceState.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUIntegralTypes.h"
    29 #include "WebGPUOrigin3D.h"
    30 #include "WebGPUTexture.h"
    31 #include "WebGPUTextureAspect.h"
    32 #include <optional>
    33 #include <wtf/Ref.h>
     28#include <pal/graphics/WebGPU/WebGPUCompareFunction.h>
     29#include <pal/graphics/WebGPU/WebGPUStencilOperation.h>
    3430
    35 namespace PAL::WebGPU {
     31namespace WebKit::WebGPU {
    3632
    37 struct ImageCopyTexture {
    38     Texture& texture;
    39     IntegerCoordinate mipLevel;
    40     std::optional<Origin3D> origin;
    41     TextureAspect aspect;
     33struct StencilFaceState {
     34    PAL::WebGPU::CompareFunction compare;
     35    PAL::WebGPU::StencilOperation failOp;
     36    PAL::WebGPU::StencilOperation depthFailOp;
     37    PAL::WebGPU::StencilOperation passOp;
    4238};
    4339
    44 } // namespace PAL::WebGPU
     40} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUStorageTextureBindingLayout.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUFeatureName.h"
    29 #include "WebGPUObjectDescriptorBase.h"
    30 #include <cstdint>
    31 #include <wtf/HashMap.h>
    32 #include <wtf/KeyValuePair.h>
    33 #include <wtf/Vector.h>
     28#include <pal/graphics/WebGPU/WebGPUStorageTextureAccess.h>
     29#include <pal/graphics/WebGPU/WebGPUTextureFormat.h>
     30#include <pal/graphics/WebGPU/WebGPUTextureViewDimension.h>
    3431
    35 namespace PAL::WebGPU {
     32namespace WebKit::WebGPU {
    3633
    37 struct DeviceDescriptor : public ObjectDescriptorBase {
    38     Vector<FeatureName> requiredFeatures;
    39     // Vector<KeyValuePair<String, uint64_t>> requiredLimits;
     34struct StorageTextureBindingLayout {
     35    PAL::WebGPU::StorageTextureAccess access;
     36    PAL::WebGPU::TextureFormat format;
     37    PAL::WebGPU::TextureViewDimension viewDimension;
    4038};
    4139
    42 } // namespace PAL::WebGPU
     40} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUTextureBindingLayout.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUObjectDescriptorBase.h"
    29 #include "WebGPUPipelineLayout.h"
     28#include <pal/graphics/WebGPU/WebGPUTextureSampleType.h>
     29#include <pal/graphics/WebGPU/WebGPUTextureViewDimension.h>
    3030
    31 namespace PAL::WebGPU {
     31namespace WebKit::WebGPU {
    3232
    33 struct PipelineDescriptorBase : public ObjectDescriptorBase {
    34     PipelineLayout* layout;
     33struct TextureBindingLayout {
     34    PAL::WebGPU::TextureSampleType sampleType;
     35    PAL::WebGPU::TextureViewDimension viewDimension;
     36    bool multisampled;
    3537};
    3638
    37 } // namespace PAL::WebGPU
     39} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUTextureDescriptor.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUFeatureName.h"
     28#include "WebGPUExtent3D.h"
    2929#include "WebGPUObjectDescriptorBase.h"
    30 #include <cstdint>
    31 #include <wtf/HashMap.h>
    32 #include <wtf/KeyValuePair.h>
    33 #include <wtf/Vector.h>
     30#include <pal/graphics/WebGPU/WebGPUIntegralTypes.h>
     31#include <pal/graphics/WebGPU/WebGPUTextureDimension.h>
     32#include <pal/graphics/WebGPU/WebGPUTextureFormat.h>
     33#include <pal/graphics/WebGPU/WebGPUTextureUsage.h>
    3434
    35 namespace PAL::WebGPU {
     35namespace WebKit::WebGPU {
    3636
    37 struct DeviceDescriptor : public ObjectDescriptorBase {
    38     Vector<FeatureName> requiredFeatures;
    39     // Vector<KeyValuePair<String, uint64_t>> requiredLimits;
     37struct TextureDescriptor : public ObjectDescriptorBase {
     38    Extent3D size;
     39    PAL::WebGPU::IntegerCoordinate mipLevelCount;
     40    PAL::WebGPU::Size32 sampleCount;
     41    PAL::WebGPU::TextureDimension dimension;
     42    PAL::WebGPU::TextureFormat format;
     43    PAL::WebGPU::TextureUsageFlags usage;
    4044};
    4145
    42 } // namespace PAL::WebGPU
     46} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUTextureViewDescriptor.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUFeatureName.h"
    2928#include "WebGPUObjectDescriptorBase.h"
    30 #include <cstdint>
    31 #include <wtf/HashMap.h>
    32 #include <wtf/KeyValuePair.h>
    33 #include <wtf/Vector.h>
     29#include <optional>
     30#include <pal/graphics/WebGPU/WebGPUIntegralTypes.h>
     31#include <pal/graphics/WebGPU/WebGPUTextureAspect.h>
     32#include <pal/graphics/WebGPU/WebGPUTextureFormat.h>
     33#include <pal/graphics/WebGPU/WebGPUTextureViewDimension.h>
    3434
    35 namespace PAL::WebGPU {
     35namespace WebKit::WebGPU {
    3636
    37 struct DeviceDescriptor : public ObjectDescriptorBase {
    38     Vector<FeatureName> requiredFeatures;
    39     // Vector<KeyValuePair<String, uint64_t>> requiredLimits;
     37struct TextureViewDescriptor : public ObjectDescriptorBase {
     38    std::optional<PAL::WebGPU::TextureFormat> format;
     39    std::optional<PAL::WebGPU::TextureViewDimension> dimension;
     40    PAL::WebGPU::TextureAspect aspect;
     41    PAL::WebGPU::IntegerCoordinate baseMipLevel;
     42    std::optional<PAL::WebGPU::IntegerCoordinate> mipLevelCount;
     43    PAL::WebGPU::IntegerCoordinate baseArrayLayer;
     44    std::optional<PAL::WebGPU::IntegerCoordinate> arrayLayerCount;
    4045};
    4146
    42 } // namespace PAL::WebGPU
     47} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUVertexAttribute.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUObjectDescriptorBase.h"
    29 #include "WebGPUPipelineLayout.h"
     28#include <pal/graphics/WebGPU/WebGPUIntegralTypes.h>
     29#include <pal/graphics/WebGPU/WebGPUVertexFormat.h>
    3030
    31 namespace PAL::WebGPU {
     31namespace WebKit::WebGPU {
    3232
    33 struct PipelineDescriptorBase : public ObjectDescriptorBase {
    34     PipelineLayout* layout;
     33struct VertexAttribute {
     34    PAL::WebGPU::VertexFormat format;
     35    PAL::WebGPU::Size64 offset;
     36
     37    PAL::WebGPU::Index32 shaderLocation;
    3538};
    3639
    37 } // namespace PAL::WebGPU
     40} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUVertexBufferLayout.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUBindGroupLayout.h"
    29 #include "WebGPUObjectDescriptorBase.h"
    30 #include <utility>
     28#include "WebGPUVertexAttribute.h"
     29#include <pal/graphics/WebGPU/WebGPUIntegralTypes.h>
     30#include <pal/graphics/WebGPU/WebGPUVertexStepMode.h>
    3131#include <wtf/Vector.h>
    3232
    33 namespace PAL::WebGPU {
     33namespace WebKit::WebGPU {
    3434
    35 struct PipelineLayoutDescriptor : public ObjectDescriptorBase {
    36     Vector<std::reference_wrapper<BindGroupLayout>> bindGroupLayouts;
     35struct VertexBufferLayout {
     36    PAL::WebGPU::Size64 arrayStride;
     37    PAL::WebGPU::VertexStepMode stepMode;
     38    Vector<VertexAttribute> attributes;
    3739};
    3840
    39 } // namespace PAL::WebGPU
     41} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Shared/WebGPU/WebGPUVertexState.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #include "WebGPUBuffer.h"
    29 #include "WebGPUIntegralTypes.h"
     28#include "WebGPUProgrammableStage.h"
     29#include "WebGPUVertexBufferLayout.h"
    3030#include <optional>
    31 #include <wtf/Ref.h>
     31#include <wtf/Vector.h>
    3232
    33 namespace PAL::WebGPU {
     33namespace WebKit::WebGPU {
    3434
    35 struct BufferBinding {
    36     Buffer& buffer;
    37     Size64 offset;
    38     std::optional<Size64> size;
     35struct VertexState : public ProgrammableStage {
     36    Vector<std::optional<VertexBufferLayout>> buffers;
    3937};
    4038
    41 } // namespace PAL::WebGPU
     39} // namespace WebKit::WebGPU
  • trunk/Source/WebKit/Sources.txt

    r285637 r285881  
    596596
    597597WebProcess/GPU/GPUProcessConnection.cpp
     598WebProcess/GPU/graphics/WebGPU/RemoteAdapterProxy.cpp
     599WebProcess/GPU/graphics/WebGPU/RemoteBindGroupLayoutProxy.cpp
     600WebProcess/GPU/graphics/WebGPU/RemoteBindGroupProxy.cpp
     601WebProcess/GPU/graphics/WebGPU/RemoteBufferProxy.cpp
     602WebProcess/GPU/graphics/WebGPU/RemoteCommandBufferProxy.cpp
     603WebProcess/GPU/graphics/WebGPU/RemoteCommandEncoderProxy.cpp
     604WebProcess/GPU/graphics/WebGPU/RemoteComputePassEncoderProxy.cpp
     605WebProcess/GPU/graphics/WebGPU/RemoteComputePipelineProxy.cpp
     606WebProcess/GPU/graphics/WebGPU/RemoteDeviceProxy.cpp
     607WebProcess/GPU/graphics/WebGPU/RemoteExternalTextureProxy.cpp
     608WebProcess/GPU/graphics/WebGPU/RemoteGPUProxy.cpp
     609WebProcess/GPU/graphics/WebGPU/RemotePipelineLayoutProxy.cpp
     610WebProcess/GPU/graphics/WebGPU/RemoteQuerySetProxy.cpp
     611WebProcess/GPU/graphics/WebGPU/RemoteQueueProxy.cpp
     612WebProcess/GPU/graphics/WebGPU/RemoteRenderBundleEncoderProxy.cpp
     613WebProcess/GPU/graphics/WebGPU/RemoteRenderBundleProxy.cpp
     614WebProcess/GPU/graphics/WebGPU/RemoteRenderPassEncoderProxy.cpp
     615WebProcess/GPU/graphics/WebGPU/RemoteRenderPipelineProxy.cpp
     616WebProcess/GPU/graphics/WebGPU/RemoteSamplerProxy.cpp
     617WebProcess/GPU/graphics/WebGPU/RemoteShaderModuleProxy.cpp
     618WebProcess/GPU/graphics/WebGPU/RemoteTextureProxy.cpp
     619WebProcess/GPU/graphics/WebGPU/RemoteTextureViewProxy.cpp
     620WebProcess/GPU/graphics/WebGPU/WebGPUDowncastConvertToBackingContext.cpp
    598621WebProcess/GPU/graphics/DisplayListWriterHandle.cpp
    599622WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp
  • trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj

    r285799 r285881  
    389389                1CA8B945127C882A00576C2B /* WebInspectorUIProxyMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1CA8B943127C882A00576C2B /* WebInspectorUIProxyMessageReceiver.cpp */; };
    390390                1CA8B946127C882A00576C2B /* WebInspectorUIProxyMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CA8B944127C882A00576C2B /* WebInspectorUIProxyMessages.h */; };
     391                1CB7464D274380C800F19874 /* WebGPUDowncastConvertToBackingContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CB7464B274380C800F19874 /* WebGPUDowncastConvertToBackingContext.h */; };
    391392                1CBBE4A019B66C53006B7D81 /* WebInspectorUIMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1CBBE49E19B66C53006B7D81 /* WebInspectorUIMessageReceiver.cpp */; };
    392393                1CBBE4A119B66C53006B7D81 /* WebInspectorUIMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CBBE49F19B66C53006B7D81 /* WebInspectorUIMessages.h */; };
     
    28992900                1CA8B943127C882A00576C2B /* WebInspectorUIProxyMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebInspectorUIProxyMessageReceiver.cpp; path = DerivedSources/WebKit2/WebInspectorUIProxyMessageReceiver.cpp; sourceTree = BUILT_PRODUCTS_DIR; };
    29002901                1CA8B944127C882A00576C2B /* WebInspectorUIProxyMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebInspectorUIProxyMessages.h; path = DerivedSources/WebKit2/WebInspectorUIProxyMessages.h; sourceTree = BUILT_PRODUCTS_DIR; };
     2902                1CB7461A27436EE400F19874 /* RemoteTextureViewProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RemoteTextureViewProxy.h; sourceTree = "<group>"; };
     2903                1CB7461B27436EE400F19874 /* RemoteBindGroupLayoutProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RemoteBindGroupLayoutProxy.h; sourceTree = "<group>"; };
     2904                1CB7461C27436EE500F19874 /* RemoteCommandBufferProxy.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteCommandBufferProxy.cpp; sourceTree = "<group>"; };
     2905                1CB7461D27436EE500F19874 /* RemoteComputePipelineProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RemoteComputePipelineProxy.h; sourceTree = "<group>"; };
     2906                1CB7461E27436EE500F19874 /* RemoteDeviceProxy.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteDeviceProxy.cpp; sourceTree = "<group>"; };
     2907                1CB7461F27436EE500F19874 /* RemoteAdapterProxy.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteAdapterProxy.cpp; sourceTree = "<group>"; };
     2908                1CB7462027436EE500F19874 /* RemoteExternalTextureProxy.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteExternalTextureProxy.cpp; sourceTree = "<group>"; };
     2909                1CB7462127436EE500F19874 /* RemoteSamplerProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RemoteSamplerProxy.h; sourceTree = "<group>"; };
     2910                1CB7462227436EE600F19874 /* RemoteCommandEncoderProxy.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteCommandEncoderProxy.cpp; sourceTree = "<group>"; };
     2911                1CB7462327436EE600F19874 /* RemoteComputePassEncoderProxy.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteComputePassEncoderProxy.cpp; sourceTree = "<group>"; };
     2912                1CB7462427436EE600F19874 /* RemoteDeviceProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RemoteDeviceProxy.h; sourceTree = "<group>"; };
     2913                1CB7462527436EE600F19874 /* RemoteExternalTextureProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RemoteExternalTextureProxy.h; sourceTree = "<group>"; };
     2914                1CB7462627436EE600F19874 /* RemoteComputePassEncoderProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RemoteComputePassEncoderProxy.h; sourceTree = "<group>"; };
     2915                1CB7462727436EE600F19874 /* RemotePipelineLayoutProxy.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RemotePipelineLayoutProxy.cpp; sourceTree = "<group>"; };
     2916                1CB7462827436EE700F19874 /* RemoteRenderBundleEncoderProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RemoteRenderBundleEncoderProxy.h; sourceTree = "<group>"; };
     2917                1CB7462927436EE700F19874 /* RemoteRenderBundleEncoderProxy.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteRenderBundleEncoderProxy.cpp; sourceTree = "<group>"; };
     2918                1CB7462A27436EE700F19874 /* RemoteBufferProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RemoteBufferProxy.h; sourceTree = "<group>"; };
     2919                1CB7462B27436EE700F19874 /* RemoteTextureViewProxy.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteTextureViewProxy.cpp; sourceTree = "<group>"; };
     2920                1CB7462C27436EE700F19874 /* RemoteCommandBufferProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RemoteCommandBufferProxy.h; sourceTree = "<group>"; };
     2921                1CB7462D27436EE700F19874 /* RemoteQueueProxy.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteQueueProxy.cpp; sourceTree = "<group>"; };
     2922                1CB7462E27436EE700F19874 /* RemoteRenderPassEncoderProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RemoteRenderPassEncoderProxy.h; sourceTree = "<group>"; };
     2923                1CB7462F27436EE800F19874 /* RemotePipelineLayoutProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RemotePipelineLayoutProxy.h; sourceTree = "<group>"; };
     2924                1CB7463027436EE800F19874 /* RemoteAdapterProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RemoteAdapterProxy.h; sourceTree = "<group>"; };
     2925                1CB7463127436EE800F19874 /* RemoteShaderModuleProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RemoteShaderModuleProxy.h; sourceTree = "<group>"; };
     2926                1CB7463227436EE800F19874 /* RemoteRenderPassEncoderProxy.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteRenderPassEncoderProxy.cpp; sourceTree = "<group>"; };
     2927                1CB7463327436EE800F19874 /* RemoteBindGroupProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RemoteBindGroupProxy.h; sourceTree = "<group>"; };
     2928                1CB7463427436EE800F19874 /* RemoteQueueProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RemoteQueueProxy.h; sourceTree = "<group>"; };
     2929                1CB7463527436EE900F19874 /* RemoteShaderModuleProxy.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteShaderModuleProxy.cpp; sourceTree = "<group>"; };
     2930                1CB7463627436EE900F19874 /* RemoteQuerySetProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RemoteQuerySetProxy.h; sourceTree = "<group>"; };
     2931                1CB7463727436EE900F19874 /* RemoteQuerySetProxy.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteQuerySetProxy.cpp; sourceTree = "<group>"; };
     2932                1CB7463827436EE900F19874 /* RemoteBufferProxy.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteBufferProxy.cpp; sourceTree = "<group>"; };
     2933                1CB7463927436EE900F19874 /* RemoteTextureProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RemoteTextureProxy.h; sourceTree = "<group>"; };
     2934                1CB7463A27436EE900F19874 /* RemoteSamplerProxy.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteSamplerProxy.cpp; sourceTree = "<group>"; };
     2935                1CB7463B27436EE900F19874 /* RemoteRenderBundleProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RemoteRenderBundleProxy.h; sourceTree = "<group>"; };
     2936                1CB7463C27436EEA00F19874 /* RemoteRenderPipelineProxy.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteRenderPipelineProxy.cpp; sourceTree = "<group>"; };
     2937                1CB7463D27436EEA00F19874 /* RemoteBindGroupProxy.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteBindGroupProxy.cpp; sourceTree = "<group>"; };
     2938                1CB7463E27436EEA00F19874 /* RemoteBindGroupLayoutProxy.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteBindGroupLayoutProxy.cpp; sourceTree = "<group>"; };
     2939                1CB7463F27436EEA00F19874 /* RemoteComputePipelineProxy.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteComputePipelineProxy.cpp; sourceTree = "<group>"; };
     2940                1CB7464027436EEA00F19874 /* RemoteCommandEncoderProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RemoteCommandEncoderProxy.h; sourceTree = "<group>"; };
     2941                1CB7464127436EEA00F19874 /* RemoteRenderBundleProxy.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteRenderBundleProxy.cpp; sourceTree = "<group>"; };
     2942                1CB7464227436EEB00F19874 /* RemoteRenderPipelineProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RemoteRenderPipelineProxy.h; sourceTree = "<group>"; };
     2943                1CB7464327436EEB00F19874 /* RemoteTextureProxy.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteTextureProxy.cpp; sourceTree = "<group>"; };
     2944                1CB7464727437A7F00F19874 /* WebGPUConvertToBackingContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUConvertToBackingContext.h; sourceTree = "<group>"; };
     2945                1CB7464927437FC500F19874 /* WebGPUIdentifier.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUIdentifier.h; sourceTree = "<group>"; };
     2946                1CB7464A274380C800F19874 /* WebGPUDowncastConvertToBackingContext.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebGPUDowncastConvertToBackingContext.cpp; sourceTree = "<group>"; };
     2947                1CB7464B274380C800F19874 /* WebGPUDowncastConvertToBackingContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUDowncastConvertToBackingContext.h; sourceTree = "<group>"; };
     2948                1CB7466227439A1A00F19874 /* RemoteGPUProxy.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteGPUProxy.cpp; sourceTree = "<group>"; };
     2949                1CB7466327439A1A00F19874 /* RemoteGPUProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RemoteGPUProxy.h; sourceTree = "<group>"; };
     2950                1CB7466627439CAE00F19874 /* WebGPUBufferDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUBufferDescriptor.h; sourceTree = "<group>"; };
     2951                1CB7466727439CAE00F19874 /* WebGPUSamplerBindingLayout.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUSamplerBindingLayout.h; sourceTree = "<group>"; };
     2952                1CB7466827439CAE00F19874 /* WebGPUImageCopyExternalImage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUImageCopyExternalImage.h; sourceTree = "<group>"; };
     2953                1CB7466927439CAE00F19874 /* WebGPUMultisampleState.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUMultisampleState.h; sourceTree = "<group>"; };
     2954                1CB7466A27439CAF00F19874 /* WebGPUBindGroupLayoutDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUBindGroupLayoutDescriptor.h; sourceTree = "<group>"; };
     2955                1CB7466B27439CAF00F19874 /* WebGPUShaderModuleDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUShaderModuleDescriptor.h; sourceTree = "<group>"; };
     2956                1CB7466C27439CAF00F19874 /* WebGPUObjectDescriptorBase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUObjectDescriptorBase.h; sourceTree = "<group>"; };
     2957                1CB7466D27439CAF00F19874 /* WebGPUPrimitiveState.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUPrimitiveState.h; sourceTree = "<group>"; };
     2958                1CB7466E27439CB000F19874 /* WebGPURenderPassDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPURenderPassDescriptor.h; sourceTree = "<group>"; };
     2959                1CB7466F27439CB000F19874 /* WebGPUExternalTextureBindingLayout.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUExternalTextureBindingLayout.h; sourceTree = "<group>"; };
     2960                1CB7467027439CB000F19874 /* WebGPUOrigin2D.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUOrigin2D.h; sourceTree = "<group>"; };
     2961                1CB7467127439CB000F19874 /* WebGPUDepthStencilState.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUDepthStencilState.h; sourceTree = "<group>"; };
     2962                1CB7467227439CB000F19874 /* WebGPUVertexAttribute.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUVertexAttribute.h; sourceTree = "<group>"; };
     2963                1CB7467327439CB100F19874 /* WebGPUStencilFaceState.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUStencilFaceState.h; sourceTree = "<group>"; };
     2964                1CB7467427439CB100F19874 /* WebGPUImageCopyTextureTagged.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUImageCopyTextureTagged.h; sourceTree = "<group>"; };
     2965                1CB7467527439CB100F19874 /* WebGPUTextureBindingLayout.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUTextureBindingLayout.h; sourceTree = "<group>"; };
     2966                1CB7467627439CB100F19874 /* WebGPUComputePipelineDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUComputePipelineDescriptor.h; sourceTree = "<group>"; };
     2967                1CB7467727439CB200F19874 /* WebGPUColor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUColor.h; sourceTree = "<group>"; };
     2968                1CB7467827439CB200F19874 /* WebGPUBlendComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUBlendComponent.h; sourceTree = "<group>"; };
     2969                1CB7467927439CB200F19874 /* WebGPUColorTargetState.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUColorTargetState.h; sourceTree = "<group>"; };
     2970                1CB7467A27439CB200F19874 /* WebGPUFragmentState.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUFragmentState.h; sourceTree = "<group>"; };
     2971                1CB7467B27439CB300F19874 /* WebGPURenderBundleEncoderDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPURenderBundleEncoderDescriptor.h; sourceTree = "<group>"; };
     2972                1CB7467C27439CB300F19874 /* WebGPUBlendState.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUBlendState.h; sourceTree = "<group>"; };
     2973                1CB7467D27439CB300F19874 /* WebGPUImageCopyBuffer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUImageCopyBuffer.h; sourceTree = "<group>"; };
     2974                1CB7467E27439CB300F19874 /* WebGPURenderPassDepthStencilAttachment.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPURenderPassDepthStencilAttachment.h; sourceTree = "<group>"; };
     2975                1CB7467F27439CB400F19874 /* WebGPUCanvasConfiguration.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUCanvasConfiguration.h; sourceTree = "<group>"; };
     2976                1CB7468027439CB400F19874 /* WebGPUTextureViewDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUTextureViewDescriptor.h; sourceTree = "<group>"; };
     2977                1CB7468127439CB400F19874 /* WebGPUTextureDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUTextureDescriptor.h; sourceTree = "<group>"; };
     2978                1CB7468227439CB400F19874 /* WebGPURenderBundleDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPURenderBundleDescriptor.h; sourceTree = "<group>"; };
     2979                1CB7468327439CB500F19874 /* WebGPUCommandBufferDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUCommandBufferDescriptor.h; sourceTree = "<group>"; };
     2980                1CB7468527439CB500F19874 /* WebGPUDeviceDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUDeviceDescriptor.h; sourceTree = "<group>"; };
     2981                1CB7468627439CB500F19874 /* WebGPUExternalTextureDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUExternalTextureDescriptor.h; sourceTree = "<group>"; };
     2982                1CB7468727439CB600F19874 /* WebGPUExtent3D.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUExtent3D.h; sourceTree = "<group>"; };
     2983                1CB7468827439CB600F19874 /* WebGPUProgrammableStage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUProgrammableStage.h; sourceTree = "<group>"; };
     2984                1CB7468927439CB600F19874 /* WebGPUComputePassTimestampWrites.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUComputePassTimestampWrites.h; sourceTree = "<group>"; };
     2985                1CB7468A27439CB600F19874 /* WebGPUBindGroupEntry.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUBindGroupEntry.h; sourceTree = "<group>"; };
     2986                1CB7468B27439CB700F19874 /* WebGPUBindGroupDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUBindGroupDescriptor.h; sourceTree = "<group>"; };
     2987                1CB7468C27439CB700F19874 /* WebGPURequestAdapterOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPURequestAdapterOptions.h; sourceTree = "<group>"; };
     2988                1CB7468D27439CB700F19874 /* WebGPUSamplerDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUSamplerDescriptor.h; sourceTree = "<group>"; };
     2989                1CB7468E27439CB800F19874 /* WebGPURenderPipelineDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPURenderPipelineDescriptor.h; sourceTree = "<group>"; };
     2990                1CB7468F27439CB800F19874 /* WebGPUVertexBufferLayout.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUVertexBufferLayout.h; sourceTree = "<group>"; };
     2991                1CB7469027439CB800F19874 /* WebGPUBufferBinding.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUBufferBinding.h; sourceTree = "<group>"; };
     2992                1CB7469127439CB800F19874 /* WebGPURenderPassLayout.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPURenderPassLayout.h; sourceTree = "<group>"; };
     2993                1CB7469227439CB900F19874 /* WebGPUCommandEncoderDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUCommandEncoderDescriptor.h; sourceTree = "<group>"; };
     2994                1CB7469327439CB900F19874 /* WebGPUBufferBindingLayout.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUBufferBindingLayout.h; sourceTree = "<group>"; };
     2995                1CB7469427439CB900F19874 /* WebGPUPipelineDescriptorBase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUPipelineDescriptorBase.h; sourceTree = "<group>"; };
     2996                1CB7469527439CB900F19874 /* WebGPUBindGroupLayoutEntry.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUBindGroupLayoutEntry.h; sourceTree = "<group>"; };
     2997                1CB7469627439CBA00F19874 /* WebGPUStorageTextureBindingLayout.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUStorageTextureBindingLayout.h; sourceTree = "<group>"; };
     2998                1CB7469727439CBA00F19874 /* WebGPUComputePassDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUComputePassDescriptor.h; sourceTree = "<group>"; };
     2999                1CB7469827439CBB00F19874 /* WebGPUPipelineLayoutDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUPipelineLayoutDescriptor.h; sourceTree = "<group>"; };
     3000                1CB7469927439CBB00F19874 /* WebGPURenderPassTimestampWrites.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPURenderPassTimestampWrites.h; sourceTree = "<group>"; };
     3001                1CB7469A27439CBB00F19874 /* WebGPUVertexState.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUVertexState.h; sourceTree = "<group>"; };
     3002                1CB7469B27439CBB00F19874 /* WebGPUImageCopyTexture.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUImageCopyTexture.h; sourceTree = "<group>"; };
     3003                1CB7469D27439CBC00F19874 /* WebGPURenderPassColorAttachment.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPURenderPassColorAttachment.h; sourceTree = "<group>"; };
     3004                1CB7469E27439CBC00F19874 /* WebGPUQuerySetDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUQuerySetDescriptor.h; sourceTree = "<group>"; };
     3005                1CB7469F27439CBC00F19874 /* WebGPUImageDataLayout.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUImageDataLayout.h; sourceTree = "<group>"; };
     3006                1CB746A027439CBD00F19874 /* WebGPUOrigin3D.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUOrigin3D.h; sourceTree = "<group>"; };
     3007                1CB746A42743ADBA00F19874 /* WebGPUConvertFromBackingContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUConvertFromBackingContext.h; sourceTree = "<group>"; };
    29013008                1CBBE49E19B66C53006B7D81 /* WebInspectorUIMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebInspectorUIMessageReceiver.cpp; path = DerivedSources/WebKit2/WebInspectorUIMessageReceiver.cpp; sourceTree = BUILT_PRODUCTS_DIR; };
    29023009                1CBBE49F19B66C53006B7D81 /* WebInspectorUIMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebInspectorUIMessages.h; path = DerivedSources/WebKit2/WebInspectorUIMessages.h; sourceTree = BUILT_PRODUCTS_DIR; };
     
    65866693                                2D2E04761F5BEC4F00BB25ED /* RemoteLayerTree */,
    65876694                                E3612FF026F90862007B1175 /* Sandbox */,
     6695                                1CB74645274379F100F19874 /* WebGPU */,
    65886696                                1ABF43781A368035003FB0E6 /* WebsiteData */,
    65896697                                118502602673B0DA00A6425E /* XR */,
     
    70727180                        );
    70737181                        path = Automation;
     7182                        sourceTree = "<group>";
     7183                };
     7184                1CB7461927436DE300F19874 /* WebGPU */ = {
     7185                        isa = PBXGroup;
     7186                        children = (
     7187                                1CB7461F27436EE500F19874 /* RemoteAdapterProxy.cpp */,
     7188                                1CB7463027436EE800F19874 /* RemoteAdapterProxy.h */,
     7189                                1CB7463E27436EEA00F19874 /* RemoteBindGroupLayoutProxy.cpp */,
     7190                                1CB7461B27436EE400F19874 /* RemoteBindGroupLayoutProxy.h */,
     7191                                1CB7463D27436EEA00F19874 /* RemoteBindGroupProxy.cpp */,
     7192                                1CB7463327436EE800F19874 /* RemoteBindGroupProxy.h */,
     7193                                1CB7463827436EE900F19874 /* RemoteBufferProxy.cpp */,
     7194                                1CB7462A27436EE700F19874 /* RemoteBufferProxy.h */,
     7195                                1CB7461C27436EE500F19874 /* RemoteCommandBufferProxy.cpp */,
     7196                                1CB7462C27436EE700F19874 /* RemoteCommandBufferProxy.h */,
     7197                                1CB7462227436EE600F19874 /* RemoteCommandEncoderProxy.cpp */,
     7198                                1CB7464027436EEA00F19874 /* RemoteCommandEncoderProxy.h */,
     7199                                1CB7462327436EE600F19874 /* RemoteComputePassEncoderProxy.cpp */,
     7200                                1CB7462627436EE600F19874 /* RemoteComputePassEncoderProxy.h */,
     7201                                1CB7463F27436EEA00F19874 /* RemoteComputePipelineProxy.cpp */,
     7202                                1CB7461D27436EE500F19874 /* RemoteComputePipelineProxy.h */,
     7203                                1CB7461E27436EE500F19874 /* RemoteDeviceProxy.cpp */,
     7204                                1CB7462427436EE600F19874 /* RemoteDeviceProxy.h */,
     7205                                1CB7462027436EE500F19874 /* RemoteExternalTextureProxy.cpp */,
     7206                                1CB7462527436EE600F19874 /* RemoteExternalTextureProxy.h */,
     7207                                1CB7466227439A1A00F19874 /* RemoteGPUProxy.cpp */,
     7208                                1CB7466327439A1A00F19874 /* RemoteGPUProxy.h */,
     7209                                1CB7462727436EE600F19874 /* RemotePipelineLayoutProxy.cpp */,
     7210                                1CB7462F27436EE800F19874 /* RemotePipelineLayoutProxy.h */,
     7211                                1CB7463727436EE900F19874 /* RemoteQuerySetProxy.cpp */,
     7212                                1CB7463627436EE900F19874 /* RemoteQuerySetProxy.h */,
     7213                                1CB7462D27436EE700F19874 /* RemoteQueueProxy.cpp */,
     7214                                1CB7463427436EE800F19874 /* RemoteQueueProxy.h */,
     7215                                1CB7462927436EE700F19874 /* RemoteRenderBundleEncoderProxy.cpp */,
     7216                                1CB7462827436EE700F19874 /* RemoteRenderBundleEncoderProxy.h */,
     7217                                1CB7464127436EEA00F19874 /* RemoteRenderBundleProxy.cpp */,
     7218                                1CB7463B27436EE900F19874 /* RemoteRenderBundleProxy.h */,
     7219                                1CB7463227436EE800F19874 /* RemoteRenderPassEncoderProxy.cpp */,
     7220                                1CB7462E27436EE700F19874 /* RemoteRenderPassEncoderProxy.h */,
     7221                                1CB7463C27436EEA00F19874 /* RemoteRenderPipelineProxy.cpp */,
     7222                                1CB7464227436EEB00F19874 /* RemoteRenderPipelineProxy.h */,
     7223                                1CB7463A27436EE900F19874 /* RemoteSamplerProxy.cpp */,
     7224                                1CB7462127436EE500F19874 /* RemoteSamplerProxy.h */,
     7225                                1CB7463527436EE900F19874 /* RemoteShaderModuleProxy.cpp */,
     7226                                1CB7463127436EE800F19874 /* RemoteShaderModuleProxy.h */,
     7227                                1CB7464327436EEB00F19874 /* RemoteTextureProxy.cpp */,
     7228                                1CB7463927436EE900F19874 /* RemoteTextureProxy.h */,
     7229                                1CB7462B27436EE700F19874 /* RemoteTextureViewProxy.cpp */,
     7230                                1CB7461A27436EE400F19874 /* RemoteTextureViewProxy.h */,
     7231                                1CB7464A274380C800F19874 /* WebGPUDowncastConvertToBackingContext.cpp */,
     7232                                1CB7464B274380C800F19874 /* WebGPUDowncastConvertToBackingContext.h */,
     7233                        );
     7234                        path = WebGPU;
     7235                        sourceTree = "<group>";
     7236                };
     7237                1CB74645274379F100F19874 /* WebGPU */ = {
     7238                        isa = PBXGroup;
     7239                        children = (
     7240                                1CB7468B27439CB700F19874 /* WebGPUBindGroupDescriptor.h */,
     7241                                1CB7468A27439CB600F19874 /* WebGPUBindGroupEntry.h */,
     7242                                1CB7466A27439CAF00F19874 /* WebGPUBindGroupLayoutDescriptor.h */,
     7243                                1CB7469527439CB900F19874 /* WebGPUBindGroupLayoutEntry.h */,
     7244                                1CB7467827439CB200F19874 /* WebGPUBlendComponent.h */,
     7245                                1CB7467C27439CB300F19874 /* WebGPUBlendState.h */,
     7246                                1CB7469027439CB800F19874 /* WebGPUBufferBinding.h */,
     7247                                1CB7469327439CB900F19874 /* WebGPUBufferBindingLayout.h */,
     7248                                1CB7466627439CAE00F19874 /* WebGPUBufferDescriptor.h */,
     7249                                1CB7467F27439CB400F19874 /* WebGPUCanvasConfiguration.h */,
     7250                                1CB7467727439CB200F19874 /* WebGPUColor.h */,
     7251                                1CB7467927439CB200F19874 /* WebGPUColorTargetState.h */,
     7252                                1CB7468327439CB500F19874 /* WebGPUCommandBufferDescriptor.h */,
     7253                                1CB7469227439CB900F19874 /* WebGPUCommandEncoderDescriptor.h */,
     7254                                1CB7469727439CBA00F19874 /* WebGPUComputePassDescriptor.h */,
     7255                                1CB7468927439CB600F19874 /* WebGPUComputePassTimestampWrites.h */,
     7256                                1CB7467627439CB100F19874 /* WebGPUComputePipelineDescriptor.h */,
     7257                                1CB746A42743ADBA00F19874 /* WebGPUConvertFromBackingContext.h */,
     7258                                1CB7464727437A7F00F19874 /* WebGPUConvertToBackingContext.h */,
     7259                                1CB7467127439CB000F19874 /* WebGPUDepthStencilState.h */,
     7260                                1CB7468527439CB500F19874 /* WebGPUDeviceDescriptor.h */,
     7261                                1CB7468727439CB600F19874 /* WebGPUExtent3D.h */,
     7262                                1CB7466F27439CB000F19874 /* WebGPUExternalTextureBindingLayout.h */,
     7263                                1CB7468627439CB500F19874 /* WebGPUExternalTextureDescriptor.h */,
     7264                                1CB7467A27439CB200F19874 /* WebGPUFragmentState.h */,
     7265                                1CB7464927437FC500F19874 /* WebGPUIdentifier.h */,
     7266                                1CB7467D27439CB300F19874 /* WebGPUImageCopyBuffer.h */,
     7267                                1CB7466827439CAE00F19874 /* WebGPUImageCopyExternalImage.h */,
     7268                                1CB7469B27439CBB00F19874 /* WebGPUImageCopyTexture.h */,
     7269                                1CB7467427439CB100F19874 /* WebGPUImageCopyTextureTagged.h */,
     7270                                1CB7469F27439CBC00F19874 /* WebGPUImageDataLayout.h */,
     7271                                1CB7466927439CAE00F19874 /* WebGPUMultisampleState.h */,
     7272                                1CB7466C27439CAF00F19874 /* WebGPUObjectDescriptorBase.h */,
     7273                                1CB7467027439CB000F19874 /* WebGPUOrigin2D.h */,
     7274                                1CB746A027439CBD00F19874 /* WebGPUOrigin3D.h */,
     7275                                1CB7469427439CB900F19874 /* WebGPUPipelineDescriptorBase.h */,
     7276                                1CB7469827439CBB00F19874 /* WebGPUPipelineLayoutDescriptor.h */,
     7277                                1CB7466D27439CAF00F19874 /* WebGPUPrimitiveState.h */,
     7278                                1CB7468827439CB600F19874 /* WebGPUProgrammableStage.h */,
     7279                                1CB7469E27439CBC00F19874 /* WebGPUQuerySetDescriptor.h */,
     7280                                1CB7468227439CB400F19874 /* WebGPURenderBundleDescriptor.h */,
     7281                                1CB7467B27439CB300F19874 /* WebGPURenderBundleEncoderDescriptor.h */,
     7282                                1CB7469D27439CBC00F19874 /* WebGPURenderPassColorAttachment.h */,
     7283                                1CB7467E27439CB300F19874 /* WebGPURenderPassDepthStencilAttachment.h */,
     7284                                1CB7466E27439CB000F19874 /* WebGPURenderPassDescriptor.h */,
     7285                                1CB7469127439CB800F19874 /* WebGPURenderPassLayout.h */,
     7286                                1CB7469927439CBB00F19874 /* WebGPURenderPassTimestampWrites.h */,
     7287                                1CB7468E27439CB800F19874 /* WebGPURenderPipelineDescriptor.h */,
     7288                                1CB7468C27439CB700F19874 /* WebGPURequestAdapterOptions.h */,
     7289                                1CB7466727439CAE00F19874 /* WebGPUSamplerBindingLayout.h */,
     7290                                1CB7468D27439CB700F19874 /* WebGPUSamplerDescriptor.h */,
     7291                                1CB7466B27439CAF00F19874 /* WebGPUShaderModuleDescriptor.h */,
     7292                                1CB7467327439CB100F19874 /* WebGPUStencilFaceState.h */,
     7293                                1CB7469627439CBA00F19874 /* WebGPUStorageTextureBindingLayout.h */,
     7294                                1CB7467527439CB100F19874 /* WebGPUTextureBindingLayout.h */,
     7295                                1CB7468127439CB400F19874 /* WebGPUTextureDescriptor.h */,
     7296                                1CB7468027439CB400F19874 /* WebGPUTextureViewDescriptor.h */,
     7297                                1CB7467227439CB000F19874 /* WebGPUVertexAttribute.h */,
     7298                                1CB7468F27439CB800F19874 /* WebGPUVertexBufferLayout.h */,
     7299                                1CB7469A27439CBB00F19874 /* WebGPUVertexState.h */,
     7300                        );
     7301                        path = WebGPU;
    70747302                        sourceTree = "<group>";
    70757303                };
     
    87919019                        children = (
    87929020                                727A7F3324078527004D2931 /* cocoa */,
     9021                                1CB7461927436DE300F19874 /* WebGPU */,
    87939022                                F4094CBA2553047E003D73E3 /* DisplayListWriterHandle.cpp */,
    87949023                                F4094CB92553047E003D73E3 /* DisplayListWriterHandle.h */,
     
    1251112740                                BC1BE1F212D54DBD0004A228 /* WebGeolocationProvider.h in Headers */,
    1251212741                                2D5036761BCED19F00E20BB3 /* WebGestureEvent.h in Headers */,
     12742                                1CB7464D274380C800F19874 /* WebGPUDowncastConvertToBackingContext.h in Headers */,
    1251312743                                93A88B331BC6E9CD00ABA5C2 /* WebHitTestResultData.h in Headers */,
    1251412744                                F44DFEB21E9E752F0038D196 /* WebIconUtilities.h in Headers */,
  • trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteAdapterProxy.cpp

    r285879 r285881  
    2525
    2626#include "config.h"
    27 #include "WebGPUShaderModuleImpl.h"
     27#include "RemoteAdapterProxy.h"
    2828
    29 #if HAVE(WEBGPU_IMPLEMENTATION)
     29#if ENABLE(GPU_PROCESS)
    3030
    3131#include "WebGPUConvertToBackingContext.h"
    32 #include <WebGPU/WebGPUExt.h>
    3332
    34 namespace PAL::WebGPU {
     33namespace WebKit::WebGPU {
    3534
    36 ShaderModuleImpl::ShaderModuleImpl(WGPUShaderModule shaderModule, ConvertToBackingContext& convertToBackingContext)
    37     : m_backing(shaderModule)
     35RemoteAdapterProxy::RemoteAdapterProxy(String&& name, PAL::WebGPU::SupportedFeatures& features, PAL::WebGPU::SupportedLimits& limits, bool isFallbackAdapter, ConvertToBackingContext& convertToBackingContext)
     36    : Adapter(WTFMove(name), features, limits, isFallbackAdapter)
    3837    , m_convertToBackingContext(convertToBackingContext)
    3938{
    4039}
    4140
    42 ShaderModuleImpl::~ShaderModuleImpl()
    43 {
    44     wgpuShaderModuleRelease(m_backing);
    45 }
    46 
    47 void ShaderModuleImpl::compilationInfo(std::function<void(Ref<CompilationInfo>&&)>&&)
     41RemoteAdapterProxy::~RemoteAdapterProxy()
    4842{
    4943}
    5044
    51 void ShaderModuleImpl::setLabelInternal(const String& label)
     45void RemoteAdapterProxy::requestDevice(const PAL::WebGPU::DeviceDescriptor& descriptor, WTF::Function<void(Ref<PAL::WebGPU::Device>)>&& callback)
    5246{
    53     wgpuShaderModuleSetLabel(m_backing, label.utf8().data());
     47    UNUSED_PARAM(descriptor);
     48    UNUSED_PARAM(callback);
    5449}
    5550
    56 } // namespace PAL::WebGPU
     51} // namespace WebKit::WebGPU
    5752
    58 #endif // HAVE(WEBGPU_IMPLEMENTATION)
     53#endif // HAVE(GPU_PROCESS)
  • trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteAdapterProxy.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #if HAVE(WEBGPU_IMPLEMENTATION)
     28#if ENABLE(GPU_PROCESS)
    2929
    30 #include "WebGPUBuffer.h"
    31 #include <WebGPU/WebGPU.h>
     30#include "WebGPUIdentifier.h"
     31#include <pal/graphics/WebGPU/WebGPUAdapter.h>
    3232#include <wtf/Deque.h>
    3333
    34 namespace PAL::WebGPU {
     34namespace WebKit::WebGPU {
    3535
    3636class ConvertToBackingContext;
    3737
    38 class BufferImpl final : public Buffer {
     38class RemoteAdapterProxy final : public PAL::WebGPU::Adapter {
    3939public:
    40     static Ref<BufferImpl> create(WGPUBuffer buffer, ConvertToBackingContext& convertToBackingContext)
     40    static Ref<RemoteAdapterProxy> create(String&& name, PAL::WebGPU::SupportedFeatures& features, PAL::WebGPU::SupportedLimits& limits, bool isFallbackAdapter, ConvertToBackingContext& convertToBackingContext)
    4141    {
    42         return adoptRef(*new BufferImpl(buffer, convertToBackingContext));
     42        return adoptRef(*new RemoteAdapterProxy(WTFMove(name), features, limits, isFallbackAdapter, convertToBackingContext));
    4343    }
    4444
    45     virtual ~BufferImpl();
     45    virtual ~RemoteAdapterProxy();
    4646
    4747private:
    4848    friend class DowncastConvertToBackingContext;
    49     friend void mapCallback(WGPUBufferMapAsyncStatus, void* userdata);
    5049
    51     BufferImpl(WGPUBuffer, ConvertToBackingContext&);
     50    RemoteAdapterProxy(String&& name, PAL::WebGPU::SupportedFeatures&, PAL::WebGPU::SupportedLimits&, bool isFallbackAdapter, ConvertToBackingContext&);
    5251
    53     BufferImpl(const BufferImpl&) = delete;
    54     BufferImpl(BufferImpl&&) = delete;
    55     BufferImpl& operator=(const BufferImpl&) = delete;
    56     BufferImpl& operator=(BufferImpl&&) = delete;
     52    RemoteAdapterProxy(const RemoteAdapterProxy&) = delete;
     53    RemoteAdapterProxy(RemoteAdapterProxy&&) = delete;
     54    RemoteAdapterProxy& operator=(const RemoteAdapterProxy&) = delete;
     55    RemoteAdapterProxy& operator=(RemoteAdapterProxy&&) = delete;
    5756
    58     WGPUBuffer backing() const { return m_backing; }
     57    WebGPUIdentifier backing() const { return m_backing; }
    5958
    60     void mapCallback(WGPUBufferMapAsyncStatus);
    61     void mapAsync(MapModeFlags, std::optional<Size64> offset, std::optional<Size64> sizeForMap, std::function<void()>&&) final;
    62     MappedRange getMappedRange(std::optional<Size64> offset, std::optional<Size64>) final;
    63     void unmap() final;
     59    void requestDevice(const PAL::WebGPU::DeviceDescriptor&, WTF::Function<void(Ref<PAL::WebGPU::Device>)>&&) final;
    6460
    65     void destroy() final;
     61    Deque<WTF::Function<void(Ref<PAL::WebGPU::Device>)>> m_callbacks;
    6662
    67     void setLabelInternal(const String&) final;
    68 
    69     Deque<std::function<void()>> m_callbacks;
    70 
    71     WGPUBuffer m_backing { nullptr };
     63    WebGPUIdentifier m_backing { WebGPUIdentifier::generate() };
    7264    Ref<ConvertToBackingContext> m_convertToBackingContext;
    7365};
    7466
    75 } // namespace PAL::WebGPU
     67} // namespace WebKit::WebGPU
    7668
    77 #endif // HAVE(WEBGPU_IMPLEMENTATION)
     69#endif // ENABLE(GPU_PROCESS)
  • trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteBindGroupLayoutProxy.cpp

    r285879 r285881  
    2424 */
    2525
    26 #pragma once
     26#include "config.h"
     27#include "RemoteBindGroupLayoutProxy.h"
    2728
    28 #include "WebGPUIntegralTypes.h"
    29 #include "WebGPULoadOp.h"
    30 #include "WebGPUStoreOp.h"
    31 #include "WebGPUTextureView.h"
    32 #include <variant>
    33 #include <wtf/Ref.h>
     29#if ENABLE(GPU_PROCESS)
    3430
    35 namespace PAL::WebGPU {
     31#include "WebGPUConvertToBackingContext.h"
    3632
    37 struct RenderPassDepthStencilAttachment {
    38     TextureView& view;
     33namespace WebKit::WebGPU {
    3934
    40     std::variant<LoadOp, float> depthLoadValue;
    41     StoreOp depthStoreOp;
    42     bool depthReadOnly;
     35RemoteBindGroupLayoutProxy::RemoteBindGroupLayoutProxy(ConvertToBackingContext& convertToBackingContext)
     36    : m_convertToBackingContext(convertToBackingContext)
     37{
     38}
    4339
    44     std::variant<LoadOp, StencilValue> stencilLoadValue;
    45     StoreOp stencilStoreOp;
    46     bool stencilReadOnly;
    47 };
     40RemoteBindGroupLayoutProxy::~RemoteBindGroupLayoutProxy()
     41{
     42}
    4843
    49 } // namespace PAL::WebGPU
     44void RemoteBindGroupLayoutProxy::setLabelInternal(const String& label)
     45{
     46    UNUSED_PARAM(label);
     47}
     48
     49} // namespace WebKit::WebGPU
     50
     51#endif // ENABLE(GPU_PROCESS)
  • trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteBindGroupLayoutProxy.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #if HAVE(WEBGPU_IMPLEMENTATION)
     28#if ENABLE(GPU_PROCESS)
    2929
    30 #include "WebGPUShaderModule.h"
    31 #include <WebGPU/WebGPU.h>
     30#include "WebGPUIdentifier.h"
     31#include <pal/graphics/WebGPU/WebGPUBindGroupLayout.h>
    3232
    33 namespace PAL::WebGPU {
     33namespace WebKit::WebGPU {
    3434
    3535class ConvertToBackingContext;
    3636
    37 class ShaderModuleImpl final : public ShaderModule {
     37class RemoteBindGroupLayoutProxy final : public PAL::WebGPU::BindGroupLayout {
    3838public:
    39     static Ref<ShaderModuleImpl> create(WGPUShaderModule shaderModule, ConvertToBackingContext& convertToBackingContext)
     39    static Ref<RemoteBindGroupLayoutProxy> create(ConvertToBackingContext& convertToBackingContext)
    4040    {
    41         return adoptRef(*new ShaderModuleImpl(shaderModule, convertToBackingContext));
     41        return adoptRef(*new RemoteBindGroupLayoutProxy(convertToBackingContext));
    4242    }
    4343
    44     virtual ~ShaderModuleImpl();
     44    virtual ~RemoteBindGroupLayoutProxy();
    4545
    4646private:
    4747    friend class DowncastConvertToBackingContext;
    4848
    49     ShaderModuleImpl(WGPUShaderModule, ConvertToBackingContext&);
     49    RemoteBindGroupLayoutProxy(ConvertToBackingContext&);
    5050
    51     ShaderModuleImpl(const ShaderModuleImpl&) = delete;
    52     ShaderModuleImpl(ShaderModuleImpl&&) = delete;
    53     ShaderModuleImpl& operator=(const ShaderModuleImpl&) = delete;
    54     ShaderModuleImpl& operator=(ShaderModuleImpl&&) = delete;
     51    RemoteBindGroupLayoutProxy(const RemoteBindGroupLayoutProxy&) = delete;
     52    RemoteBindGroupLayoutProxy(RemoteBindGroupLayoutProxy&&) = delete;
     53    RemoteBindGroupLayoutProxy& operator=(const RemoteBindGroupLayoutProxy&) = delete;
     54    RemoteBindGroupLayoutProxy& operator=(RemoteBindGroupLayoutProxy&&) = delete;
    5555
    56     WGPUShaderModule backing() const { return m_backing; }
    57 
    58     void compilationInfo(std::function<void(Ref<CompilationInfo>&&)>&&) final;
     56    WebGPUIdentifier backing() const { return m_backing; }
    5957
    6058    void setLabelInternal(const String&) final;
    6159
    62     WGPUShaderModule m_backing { nullptr };
     60    WebGPUIdentifier m_backing { WebGPUIdentifier::generate() };
    6361    Ref<ConvertToBackingContext> m_convertToBackingContext;
    6462};
    6563
    66 } // namespace PAL::WebGPU
     64} // namespace WebKit::WebGPU
    6765
    68 #endif // HAVE(WEBGPU_IMPLEMENTATION)
     66#endif // ENABLE(GPU_PROCESS)
  • trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteBindGroupProxy.cpp

    r285879 r285881  
    2424 */
    2525
    26 #pragma once
     26#include "config.h"
     27#include "RemoteBindGroupProxy.h"
    2728
    28 #include "WebGPUIntegralTypes.h"
    29 #include "WebGPULoadOp.h"
    30 #include "WebGPUStoreOp.h"
    31 #include "WebGPUTextureView.h"
    32 #include <variant>
    33 #include <wtf/Ref.h>
     29#if ENABLE(GPU_PROCESS)
    3430
    35 namespace PAL::WebGPU {
     31#include "WebGPUConvertToBackingContext.h"
    3632
    37 struct RenderPassDepthStencilAttachment {
    38     TextureView& view;
     33namespace WebKit::WebGPU {
    3934
    40     std::variant<LoadOp, float> depthLoadValue;
    41     StoreOp depthStoreOp;
    42     bool depthReadOnly;
     35RemoteBindGroupProxy::RemoteBindGroupProxy(ConvertToBackingContext& convertToBackingContext)
     36    : m_convertToBackingContext(convertToBackingContext)
     37{
     38}
    4339
    44     std::variant<LoadOp, StencilValue> stencilLoadValue;
    45     StoreOp stencilStoreOp;
    46     bool stencilReadOnly;
    47 };
     40RemoteBindGroupProxy::~RemoteBindGroupProxy()
     41{
     42}
    4843
    49 } // namespace PAL::WebGPU
     44void RemoteBindGroupProxy::setLabelInternal(const String& label)
     45{
     46    UNUSED_PARAM(label);
     47}
     48
     49} // namespace WebKit::WebGPU
     50
     51#endif // ENABLE(GPU_PROCESS)
  • trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteBindGroupProxy.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #if HAVE(WEBGPU_IMPLEMENTATION)
     28#if ENABLE(GPU_PROCESS)
    2929
    30 #include "WebGPUShaderModule.h"
    31 #include <WebGPU/WebGPU.h>
     30#include "WebGPUIdentifier.h"
     31#include <pal/graphics/WebGPU/WebGPUBindGroup.h>
    3232
    33 namespace PAL::WebGPU {
     33namespace WebKit::WebGPU {
    3434
    3535class ConvertToBackingContext;
    3636
    37 class ShaderModuleImpl final : public ShaderModule {
     37class RemoteBindGroupProxy final : public PAL::WebGPU::BindGroup {
    3838public:
    39     static Ref<ShaderModuleImpl> create(WGPUShaderModule shaderModule, ConvertToBackingContext& convertToBackingContext)
     39    static Ref<RemoteBindGroupProxy> create(ConvertToBackingContext& convertToBackingContext)
    4040    {
    41         return adoptRef(*new ShaderModuleImpl(shaderModule, convertToBackingContext));
     41        return adoptRef(*new RemoteBindGroupProxy(convertToBackingContext));
    4242    }
    4343
    44     virtual ~ShaderModuleImpl();
     44    virtual ~RemoteBindGroupProxy();
    4545
    4646private:
    4747    friend class DowncastConvertToBackingContext;
    4848
    49     ShaderModuleImpl(WGPUShaderModule, ConvertToBackingContext&);
     49    RemoteBindGroupProxy(ConvertToBackingContext&);
    5050
    51     ShaderModuleImpl(const ShaderModuleImpl&) = delete;
    52     ShaderModuleImpl(ShaderModuleImpl&&) = delete;
    53     ShaderModuleImpl& operator=(const ShaderModuleImpl&) = delete;
    54     ShaderModuleImpl& operator=(ShaderModuleImpl&&) = delete;
     51    RemoteBindGroupProxy(const RemoteBindGroupProxy&) = delete;
     52    RemoteBindGroupProxy(RemoteBindGroupProxy&&) = delete;
     53    RemoteBindGroupProxy& operator=(const RemoteBindGroupProxy&) = delete;
     54    RemoteBindGroupProxy& operator=(RemoteBindGroupProxy&&) = delete;
    5555
    56     WGPUShaderModule backing() const { return m_backing; }
    57 
    58     void compilationInfo(std::function<void(Ref<CompilationInfo>&&)>&&) final;
     56    WebGPUIdentifier backing() const { return m_backing; }
    5957
    6058    void setLabelInternal(const String&) final;
    6159
    62     WGPUShaderModule m_backing { nullptr };
     60    WebGPUIdentifier m_backing { WebGPUIdentifier::generate() };
    6361    Ref<ConvertToBackingContext> m_convertToBackingContext;
    6462};
    6563
    66 } // namespace PAL::WebGPU
     64} // namespace WebKit::WebGPU
    6765
    68 #endif // HAVE(WEBGPU_IMPLEMENTATION)
     66#endif // ENABLE(GPU_PROCESS)
  • trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteBufferProxy.cpp

    r285879 r285881  
    2525
    2626#include "config.h"
    27 #include "WebGPUShaderModuleImpl.h"
     27#include "RemoteBufferProxy.h"
    2828
    29 #if HAVE(WEBGPU_IMPLEMENTATION)
     29#if ENABLE(GPU_PROCESS)
    3030
    3131#include "WebGPUConvertToBackingContext.h"
    32 #include <WebGPU/WebGPUExt.h>
    3332
    34 namespace PAL::WebGPU {
     33namespace WebKit::WebGPU {
    3534
    36 ShaderModuleImpl::ShaderModuleImpl(WGPUShaderModule shaderModule, ConvertToBackingContext& convertToBackingContext)
    37     : m_backing(shaderModule)
    38     , m_convertToBackingContext(convertToBackingContext)
     35RemoteBufferProxy::RemoteBufferProxy(ConvertToBackingContext& convertToBackingContext)
     36    : m_convertToBackingContext(convertToBackingContext)
    3937{
    4038}
    4139
    42 ShaderModuleImpl::~ShaderModuleImpl()
    43 {
    44     wgpuShaderModuleRelease(m_backing);
    45 }
    46 
    47 void ShaderModuleImpl::compilationInfo(std::function<void(Ref<CompilationInfo>&&)>&&)
     40RemoteBufferProxy::~RemoteBufferProxy()
    4841{
    4942}
    5043
    51 void ShaderModuleImpl::setLabelInternal(const String& label)
     44void RemoteBufferProxy::mapAsync(PAL::WebGPU::MapModeFlags mapModeFlags, std::optional<PAL::WebGPU::Size64> offset, std::optional<PAL::WebGPU::Size64> size, WTF::Function<void()>&& callback)
    5245{
    53     wgpuShaderModuleSetLabel(m_backing, label.utf8().data());
     46    UNUSED_PARAM(mapModeFlags);
     47    UNUSED_PARAM(offset);
     48    UNUSED_PARAM(callback);
    5449}
    5550
    56 } // namespace PAL::WebGPU
     51auto RemoteBufferProxy::getMappedRange(std::optional<PAL::WebGPU::Size64> offset, std::optional<PAL::WebGPU::Size64> size) -> MappedRange
     52{
     53    UNUSED_PARAM(offset);
     54    UNUSED_PARAM(size);
     55    return { };
     56}
    5757
    58 #endif // HAVE(WEBGPU_IMPLEMENTATION)
     58void RemoteBufferProxy::unmap()
     59{
     60}
     61
     62void RemoteBufferProxy::destroy()
     63{
     64}
     65
     66void RemoteBufferProxy::setLabelInternal(const String& label)
     67{
     68    UNUSED_PARAM(label);
     69}
     70
     71} // namespace WebKit::WebGPU
     72
     73#endif // ENABLE(GPU_PROCESS)
  • trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteBufferProxy.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #if HAVE(WEBGPU_IMPLEMENTATION)
     28#if ENABLE(GPU_PROCESS)
    2929
    30 #include "WebGPUBuffer.h"
    31 #include <WebGPU/WebGPU.h>
     30#include "WebGPUIdentifier.h"
     31#include <pal/graphics/WebGPU/WebGPUBuffer.h>
    3232#include <wtf/Deque.h>
    3333
    34 namespace PAL::WebGPU {
     34namespace WebKit::WebGPU {
    3535
    3636class ConvertToBackingContext;
    3737
    38 class BufferImpl final : public Buffer {
     38class RemoteBufferProxy final : public PAL::WebGPU::Buffer {
    3939public:
    40     static Ref<BufferImpl> create(WGPUBuffer buffer, ConvertToBackingContext& convertToBackingContext)
     40    static Ref<RemoteBufferProxy> create(ConvertToBackingContext& convertToBackingContext)
    4141    {
    42         return adoptRef(*new BufferImpl(buffer, convertToBackingContext));
     42        return adoptRef(*new RemoteBufferProxy(convertToBackingContext));
    4343    }
    4444
    45     virtual ~BufferImpl();
     45    virtual ~RemoteBufferProxy();
    4646
    4747private:
    4848    friend class DowncastConvertToBackingContext;
    49     friend void mapCallback(WGPUBufferMapAsyncStatus, void* userdata);
    5049
    51     BufferImpl(WGPUBuffer, ConvertToBackingContext&);
     50    RemoteBufferProxy(ConvertToBackingContext&);
    5251
    53     BufferImpl(const BufferImpl&) = delete;
    54     BufferImpl(BufferImpl&&) = delete;
    55     BufferImpl& operator=(const BufferImpl&) = delete;
    56     BufferImpl& operator=(BufferImpl&&) = delete;
     52    RemoteBufferProxy(const RemoteBufferProxy&) = delete;
     53    RemoteBufferProxy(RemoteBufferProxy&&) = delete;
     54    RemoteBufferProxy& operator=(const RemoteBufferProxy&) = delete;
     55    RemoteBufferProxy& operator=(RemoteBufferProxy&&) = delete;
    5756
    58     WGPUBuffer backing() const { return m_backing; }
     57    WebGPUIdentifier backing() const { return m_backing; }
    5958
    60     void mapCallback(WGPUBufferMapAsyncStatus);
    61     void mapAsync(MapModeFlags, std::optional<Size64> offset, std::optional<Size64> sizeForMap, std::function<void()>&&) final;
    62     MappedRange getMappedRange(std::optional<Size64> offset, std::optional<Size64>) final;
     59    void mapAsync(PAL::WebGPU::MapModeFlags, std::optional<PAL::WebGPU::Size64> offset, std::optional<PAL::WebGPU::Size64> sizeForMap, WTF::Function<void()>&&) final;
     60    MappedRange getMappedRange(std::optional<PAL::WebGPU::Size64> offset, std::optional<PAL::WebGPU::Size64>) final;
    6361    void unmap() final;
    6462
     
    6765    void setLabelInternal(const String&) final;
    6866
    69     Deque<std::function<void()>> m_callbacks;
     67    Deque<WTF::Function<void()>> m_callbacks;
    7068
    71     WGPUBuffer m_backing { nullptr };
     69    WebGPUIdentifier m_backing { WebGPUIdentifier::generate() };
    7270    Ref<ConvertToBackingContext> m_convertToBackingContext;
    7371};
    7472
    75 } // namespace PAL::WebGPU
     73} // namespace WebKit::WebGPU
    7674
    77 #endif // HAVE(WEBGPU_IMPLEMENTATION)
     75#endif // ENABLE(GPU_PROCESS)
  • trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteCommandBufferProxy.cpp

    r285879 r285881  
    2424 */
    2525
    26 #pragma once
     26#include "config.h"
     27#include "RemoteCommandBufferProxy.h"
    2728
    28 #include "WebGPUIntegralTypes.h"
    29 #include "WebGPULoadOp.h"
    30 #include "WebGPUStoreOp.h"
    31 #include "WebGPUTextureView.h"
    32 #include <variant>
    33 #include <wtf/Ref.h>
     29#if ENABLE(GPU_PROCESS)
    3430
    35 namespace PAL::WebGPU {
     31#include "WebGPUConvertToBackingContext.h"
    3632
    37 struct RenderPassDepthStencilAttachment {
    38     TextureView& view;
     33namespace WebKit::WebGPU {
    3934
    40     std::variant<LoadOp, float> depthLoadValue;
    41     StoreOp depthStoreOp;
    42     bool depthReadOnly;
     35RemoteCommandBufferProxy::RemoteCommandBufferProxy(ConvertToBackingContext& convertToBackingContext)
     36    : m_convertToBackingContext(convertToBackingContext)
     37{
     38}
    4339
    44     std::variant<LoadOp, StencilValue> stencilLoadValue;
    45     StoreOp stencilStoreOp;
    46     bool stencilReadOnly;
    47 };
     40RemoteCommandBufferProxy::~RemoteCommandBufferProxy()
     41{
     42}
    4843
    49 } // namespace PAL::WebGPU
     44void RemoteCommandBufferProxy::setLabelInternal(const String& label)
     45{
     46    UNUSED_PARAM(label);
     47}
     48
     49} // namespace WebKit::WebGPU
     50
     51#endif // ENABLE(GPU_PROCESS)
  • trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteCommandBufferProxy.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #if HAVE(WEBGPU_IMPLEMENTATION)
     28#if ENABLE(GPU_PROCESS)
    2929
    30 #include "WebGPUShaderModule.h"
    31 #include <WebGPU/WebGPU.h>
     30#include "WebGPUIdentifier.h"
     31#include <pal/graphics/WebGPU/WebGPUCommandBuffer.h>
    3232
    33 namespace PAL::WebGPU {
     33namespace WebKit::WebGPU {
    3434
    3535class ConvertToBackingContext;
    3636
    37 class ShaderModuleImpl final : public ShaderModule {
     37class RemoteCommandBufferProxy final : public PAL::WebGPU::CommandBuffer {
    3838public:
    39     static Ref<ShaderModuleImpl> create(WGPUShaderModule shaderModule, ConvertToBackingContext& convertToBackingContext)
     39    static Ref<RemoteCommandBufferProxy> create(ConvertToBackingContext& convertToBackingContext)
    4040    {
    41         return adoptRef(*new ShaderModuleImpl(shaderModule, convertToBackingContext));
     41        return adoptRef(*new RemoteCommandBufferProxy(convertToBackingContext));
    4242    }
    4343
    44     virtual ~ShaderModuleImpl();
     44    virtual ~RemoteCommandBufferProxy();
    4545
    4646private:
    4747    friend class DowncastConvertToBackingContext;
    4848
    49     ShaderModuleImpl(WGPUShaderModule, ConvertToBackingContext&);
     49    RemoteCommandBufferProxy(ConvertToBackingContext&);
    5050
    51     ShaderModuleImpl(const ShaderModuleImpl&) = delete;
    52     ShaderModuleImpl(ShaderModuleImpl&&) = delete;
    53     ShaderModuleImpl& operator=(const ShaderModuleImpl&) = delete;
    54     ShaderModuleImpl& operator=(ShaderModuleImpl&&) = delete;
     51    RemoteCommandBufferProxy(const RemoteCommandBufferProxy&) = delete;
     52    RemoteCommandBufferProxy(RemoteCommandBufferProxy&&) = delete;
     53    RemoteCommandBufferProxy& operator=(const RemoteCommandBufferProxy&) = delete;
     54    RemoteCommandBufferProxy& operator=(RemoteCommandBufferProxy&&) = delete;
    5555
    56     WGPUShaderModule backing() const { return m_backing; }
    57 
    58     void compilationInfo(std::function<void(Ref<CompilationInfo>&&)>&&) final;
     56    WebGPUIdentifier backing() const { return m_backing; }
    5957
    6058    void setLabelInternal(const String&) final;
    6159
    62     WGPUShaderModule m_backing { nullptr };
     60    WebGPUIdentifier m_backing { WebGPUIdentifier::generate() };
    6361    Ref<ConvertToBackingContext> m_convertToBackingContext;
    6462};
    6563
    66 } // namespace PAL::WebGPU
     64} // namespace WebKit::WebGPU
    6765
    68 #endif // HAVE(WEBGPU_IMPLEMENTATION)
     66#endif // ENABLE(GPU_PROCESS)
  • trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteComputePipelineProxy.cpp

    r285879 r285881  
    2525
    2626#include "config.h"
    27 #include "WebGPUShaderModuleImpl.h"
     27#include "RemoteComputePipelineProxy.h"
    2828
    29 #if HAVE(WEBGPU_IMPLEMENTATION)
     29#if ENABLE(GPU_PROCESS)
    3030
     31#include "RemoteBindGroupLayoutProxy.h"
    3132#include "WebGPUConvertToBackingContext.h"
    32 #include <WebGPU/WebGPUExt.h>
    3333
    34 namespace PAL::WebGPU {
     34namespace WebKit::WebGPU {
    3535
    36 ShaderModuleImpl::ShaderModuleImpl(WGPUShaderModule shaderModule, ConvertToBackingContext& convertToBackingContext)
    37     : m_backing(shaderModule)
    38     , m_convertToBackingContext(convertToBackingContext)
     36RemoteComputePipelineProxy::RemoteComputePipelineProxy(ConvertToBackingContext& convertToBackingContext)
     37    : m_convertToBackingContext(convertToBackingContext)
    3938{
    4039}
    4140
    42 ShaderModuleImpl::~ShaderModuleImpl()
    43 {
    44     wgpuShaderModuleRelease(m_backing);
    45 }
    46 
    47 void ShaderModuleImpl::compilationInfo(std::function<void(Ref<CompilationInfo>&&)>&&)
     41RemoteComputePipelineProxy::~RemoteComputePipelineProxy()
    4842{
    4943}
    5044
    51 void ShaderModuleImpl::setLabelInternal(const String& label)
     45Ref<PAL::WebGPU::BindGroupLayout> RemoteComputePipelineProxy::getBindGroupLayout(uint32_t index)
    5246{
    53     wgpuShaderModuleSetLabel(m_backing, label.utf8().data());
     47    UNUSED_PARAM(index);
     48    return RemoteBindGroupLayoutProxy::create(m_convertToBackingContext);
    5449}
    5550
    56 } // namespace PAL::WebGPU
     51void RemoteComputePipelineProxy::setLabelInternal(const String& label)
     52{
     53    UNUSED_PARAM(label);
     54}
    5755
    58 #endif // HAVE(WEBGPU_IMPLEMENTATION)
     56} // namespace WebKit::WebGPU
     57
     58#endif // ENABLE(GPU_PROCESS)
  • trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteComputePipelineProxy.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #if HAVE(WEBGPU_IMPLEMENTATION)
     28#if ENABLE(GPU_PROCESS)
    2929
    30 #include "WebGPUShaderModule.h"
    31 #include <WebGPU/WebGPU.h>
     30#include "WebGPUIdentifier.h"
     31#include <pal/graphics/WebGPU/WebGPUComputePipeline.h>
    3232
    33 namespace PAL::WebGPU {
     33namespace WebKit::WebGPU {
    3434
    3535class ConvertToBackingContext;
    3636
    37 class ShaderModuleImpl final : public ShaderModule {
     37class RemoteComputePipelineProxy final : public PAL::WebGPU::ComputePipeline {
    3838public:
    39     static Ref<ShaderModuleImpl> create(WGPUShaderModule shaderModule, ConvertToBackingContext& convertToBackingContext)
     39    static Ref<RemoteComputePipelineProxy> create(ConvertToBackingContext& convertToBackingContext)
    4040    {
    41         return adoptRef(*new ShaderModuleImpl(shaderModule, convertToBackingContext));
     41        return adoptRef(*new RemoteComputePipelineProxy(convertToBackingContext));
    4242    }
    4343
    44     virtual ~ShaderModuleImpl();
     44    virtual ~RemoteComputePipelineProxy();
    4545
    4646private:
    4747    friend class DowncastConvertToBackingContext;
    4848
    49     ShaderModuleImpl(WGPUShaderModule, ConvertToBackingContext&);
     49    RemoteComputePipelineProxy(ConvertToBackingContext&);
    5050
    51     ShaderModuleImpl(const ShaderModuleImpl&) = delete;
    52     ShaderModuleImpl(ShaderModuleImpl&&) = delete;
    53     ShaderModuleImpl& operator=(const ShaderModuleImpl&) = delete;
    54     ShaderModuleImpl& operator=(ShaderModuleImpl&&) = delete;
     51    RemoteComputePipelineProxy(const RemoteComputePipelineProxy&) = delete;
     52    RemoteComputePipelineProxy(RemoteComputePipelineProxy&&) = delete;
     53    RemoteComputePipelineProxy& operator=(const RemoteComputePipelineProxy&) = delete;
     54    RemoteComputePipelineProxy& operator=(RemoteComputePipelineProxy&&) = delete;
    5555
    56     WGPUShaderModule backing() const { return m_backing; }
     56    WebGPUIdentifier backing() const { return m_backing; }
    5757
    58     void compilationInfo(std::function<void(Ref<CompilationInfo>&&)>&&) final;
     58    Ref<PAL::WebGPU::BindGroupLayout> getBindGroupLayout(uint32_t index) final;
    5959
    6060    void setLabelInternal(const String&) final;
    6161
    62     WGPUShaderModule m_backing { nullptr };
     62    WebGPUIdentifier m_backing { WebGPUIdentifier::generate() };
    6363    Ref<ConvertToBackingContext> m_convertToBackingContext;
    6464};
    6565
    66 } // namespace PAL::WebGPU
     66} // namespace WebKit::WebGPU
    6767
    68 #endif // HAVE(WEBGPU_IMPLEMENTATION)
     68#endif // ENABLE(GPU_PROCESS)
  • trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteExternalTextureProxy.cpp

    r285879 r285881  
    2424 */
    2525
    26 #pragma once
     26#include "config.h"
     27#include "RemoteExternalTextureProxy.h"
    2728
    28 #include "WebGPUIntegralTypes.h"
    29 #include "WebGPULoadOp.h"
    30 #include "WebGPUStoreOp.h"
    31 #include "WebGPUTextureView.h"
    32 #include <variant>
    33 #include <wtf/Ref.h>
     29#if ENABLE(GPU_PROCESS)
    3430
    35 namespace PAL::WebGPU {
     31#include "WebGPUConvertToBackingContext.h"
    3632
    37 struct RenderPassDepthStencilAttachment {
    38     TextureView& view;
     33namespace WebKit::WebGPU {
    3934
    40     std::variant<LoadOp, float> depthLoadValue;
    41     StoreOp depthStoreOp;
    42     bool depthReadOnly;
     35RemoteExternalTextureProxy::RemoteExternalTextureProxy(ConvertToBackingContext& convertToBackingContext)
     36    : m_convertToBackingContext(convertToBackingContext)
     37{
     38}
    4339
    44     std::variant<LoadOp, StencilValue> stencilLoadValue;
    45     StoreOp stencilStoreOp;
    46     bool stencilReadOnly;
    47 };
     40RemoteExternalTextureProxy::~RemoteExternalTextureProxy()
     41{
     42}
    4843
    49 } // namespace PAL::WebGPU
     44void RemoteExternalTextureProxy::setLabelInternal(const String& label)
     45{
     46    UNUSED_PARAM(label);
     47}
     48
     49} // namespace WebKit::WebGPU
     50
     51#endif // ENABLE(GPU_PROCESS)
  • trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteExternalTextureProxy.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #if HAVE(WEBGPU_IMPLEMENTATION)
     28#if ENABLE(GPU_PROCESS)
    2929
    30 #include "WebGPUShaderModule.h"
    31 #include <WebGPU/WebGPU.h>
     30#include "WebGPUIdentifier.h"
     31#include <pal/graphics/WebGPU/WebGPUExternalTexture.h>
    3232
    33 namespace PAL::WebGPU {
     33namespace WebKit::WebGPU {
    3434
    3535class ConvertToBackingContext;
    3636
    37 class ShaderModuleImpl final : public ShaderModule {
     37class RemoteExternalTextureProxy final : public PAL::WebGPU::ExternalTexture {
    3838public:
    39     static Ref<ShaderModuleImpl> create(WGPUShaderModule shaderModule, ConvertToBackingContext& convertToBackingContext)
     39    static Ref<RemoteExternalTextureProxy> create(ConvertToBackingContext& convertToBackingContext)
    4040    {
    41         return adoptRef(*new ShaderModuleImpl(shaderModule, convertToBackingContext));
     41        return adoptRef(*new RemoteExternalTextureProxy(convertToBackingContext));
    4242    }
    4343
    44     virtual ~ShaderModuleImpl();
     44    virtual ~RemoteExternalTextureProxy();
    4545
    4646private:
    4747    friend class DowncastConvertToBackingContext;
    4848
    49     ShaderModuleImpl(WGPUShaderModule, ConvertToBackingContext&);
     49    RemoteExternalTextureProxy(ConvertToBackingContext&);
    5050
    51     ShaderModuleImpl(const ShaderModuleImpl&) = delete;
    52     ShaderModuleImpl(ShaderModuleImpl&&) = delete;
    53     ShaderModuleImpl& operator=(const ShaderModuleImpl&) = delete;
    54     ShaderModuleImpl& operator=(ShaderModuleImpl&&) = delete;
     51    RemoteExternalTextureProxy(const RemoteExternalTextureProxy&) = delete;
     52    RemoteExternalTextureProxy(RemoteExternalTextureProxy&&) = delete;
     53    RemoteExternalTextureProxy& operator=(const RemoteExternalTextureProxy&) = delete;
     54    RemoteExternalTextureProxy& operator=(RemoteExternalTextureProxy&&) = delete;
    5555
    56     WGPUShaderModule backing() const { return m_backing; }
    57 
    58     void compilationInfo(std::function<void(Ref<CompilationInfo>&&)>&&) final;
     56    WebGPUIdentifier backing() const { return m_backing; }
    5957
    6058    void setLabelInternal(const String&) final;
    6159
    62     WGPUShaderModule m_backing { nullptr };
     60    WebGPUIdentifier m_backing { WebGPUIdentifier::generate() };
    6361    Ref<ConvertToBackingContext> m_convertToBackingContext;
    6462};
    6563
    66 } // namespace PAL::WebGPU
     64} // namespace WebKit::WebGPU
    6765
    68 #endif // HAVE(WEBGPU_IMPLEMENTATION)
     66#endif // ENABLE(GPU_PROCESS)
  • trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteGPUProxy.cpp

    r285879 r285881  
    2424 */
    2525
    26 #pragma once
     26#include "config.h"
     27#include "RemoteGPUProxy.h"
    2728
    28 #include "WebGPURequestAdapterOptions.h"
    29 #include <optional>
    30 #include <utility>
    31 #include <wtf/RefCounted.h>
    32 #include <wtf/RefPtr.h>
     29#if ENABLE(GPU_PROCESS)
    3330
    34 namespace PAL::WebGPU {
     31#include "WebGPUConvertToBackingContext.h"
    3532
    36 class Adapter;
     33namespace WebKit::WebGPU {
    3734
    38 class GPU : public RefCounted<GPU> {
    39 public:
    40     virtual ~GPU() = default;
     35RemoteGPUProxy::RemoteGPUProxy(ConvertToBackingContext& convertToBackingContext)
     36    : m_convertToBackingContext(convertToBackingContext)
     37{
     38}
    4139
    42     virtual void requestAdapter(const RequestAdapterOptions&, std::function<void(RefPtr<Adapter>&&)>&&) = 0;
     40RemoteGPUProxy::~RemoteGPUProxy()
     41{
     42}
    4343
    44 protected:
    45     GPU() = default;
     44void RemoteGPUProxy::requestAdapter(const PAL::WebGPU::RequestAdapterOptions& options, WTF::Function<void(RefPtr<PAL::WebGPU::Adapter>&&)>&& callback)
     45{
     46    UNUSED_PARAM(options);
     47    UNUSED_PARAM(callback);
     48}
    4649
    47 private:
    48     GPU(const GPU&) = delete;
    49     GPU(GPU&&) = delete;
    50     GPU& operator=(const GPU&) = delete;
    51     GPU& operator=(GPU&&) = delete;
    52 };
     50} // namespace WebKit::WebGPU
    5351
    54 } // namespace PAL::WebGPU
     52#endif // ENABLE(GPU_PROCESS)
  • trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteGPUProxy.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #if HAVE(WEBGPU_IMPLEMENTATION)
     28#if ENABLE(GPU_PROCESS)
    2929
    30 #include "WebGPUShaderModule.h"
    31 #include <WebGPU/WebGPU.h>
     30#include "WebGPUIdentifier.h"
     31#include <pal/graphics/WebGPU/WebGPU.h>
     32#include <wtf/Deque.h>
    3233
    33 namespace PAL::WebGPU {
     34namespace WebKit::WebGPU {
    3435
    3536class ConvertToBackingContext;
    3637
    37 class ShaderModuleImpl final : public ShaderModule {
     38class RemoteGPUProxy final : public PAL::WebGPU::GPU {
    3839public:
    39     static Ref<ShaderModuleImpl> create(WGPUShaderModule shaderModule, ConvertToBackingContext& convertToBackingContext)
     40    static Ref<RemoteGPUProxy> create(ConvertToBackingContext& convertToBackingContext)
    4041    {
    41         return adoptRef(*new ShaderModuleImpl(shaderModule, convertToBackingContext));
     42        return adoptRef(*new RemoteGPUProxy(convertToBackingContext));
    4243    }
    4344
    44     virtual ~ShaderModuleImpl();
     45    virtual ~RemoteGPUProxy();
    4546
    4647private:
    4748    friend class DowncastConvertToBackingContext;
    4849
    49     ShaderModuleImpl(WGPUShaderModule, ConvertToBackingContext&);
     50    RemoteGPUProxy(ConvertToBackingContext&);
    5051
    51     ShaderModuleImpl(const ShaderModuleImpl&) = delete;
    52     ShaderModuleImpl(ShaderModuleImpl&&) = delete;
    53     ShaderModuleImpl& operator=(const ShaderModuleImpl&) = delete;
    54     ShaderModuleImpl& operator=(ShaderModuleImpl&&) = delete;
     52    RemoteGPUProxy(const RemoteGPUProxy&) = delete;
     53    RemoteGPUProxy(RemoteGPUProxy&&) = delete;
     54    RemoteGPUProxy& operator=(const RemoteGPUProxy&) = delete;
     55    RemoteGPUProxy& operator=(RemoteGPUProxy&&) = delete;
    5556
    56     WGPUShaderModule backing() const { return m_backing; }
     57    WebGPUIdentifier backing() const { return m_backing; }
    5758
    58     void compilationInfo(std::function<void(Ref<CompilationInfo>&&)>&&) final;
     59    void requestAdapter(const PAL::WebGPU::RequestAdapterOptions&, WTF::Function<void(RefPtr<PAL::WebGPU::Adapter>&&)>&&) final;
    5960
    60     void setLabelInternal(const String&) final;
     61    Deque<WTF::Function<void(RefPtr<PAL::WebGPU::Adapter>&&)>> m_callbacks;
    6162
    62     WGPUShaderModule m_backing { nullptr };
     63    WebGPUIdentifier m_backing { WebGPUIdentifier::generate() };
    6364    Ref<ConvertToBackingContext> m_convertToBackingContext;
    6465};
    6566
    66 } // namespace PAL::WebGPU
     67} // namespace WebKit::WebGPU
    6768
    68 #endif // HAVE(WEBGPU_IMPLEMENTATION)
     69#endif // ENABLE(GPU_PROCESS)
  • trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemotePipelineLayoutProxy.cpp

    r285879 r285881  
    2424 */
    2525
    26 #pragma once
     26#include "config.h"
     27#include "RemotePipelineLayoutProxy.h"
    2728
    28 #include "WebGPUIntegralTypes.h"
    29 #include "WebGPULoadOp.h"
    30 #include "WebGPUStoreOp.h"
    31 #include "WebGPUTextureView.h"
    32 #include <variant>
    33 #include <wtf/Ref.h>
     29#if ENABLE(GPU_PROCESS)
    3430
    35 namespace PAL::WebGPU {
     31#include "WebGPUConvertToBackingContext.h"
    3632
    37 struct RenderPassDepthStencilAttachment {
    38     TextureView& view;
     33namespace WebKit::WebGPU {
    3934
    40     std::variant<LoadOp, float> depthLoadValue;
    41     StoreOp depthStoreOp;
    42     bool depthReadOnly;
     35RemotePipelineLayoutProxy::RemotePipelineLayoutProxy(ConvertToBackingContext& convertToBackingContext)
     36    : m_convertToBackingContext(convertToBackingContext)
     37{
     38}
    4339
    44     std::variant<LoadOp, StencilValue> stencilLoadValue;
    45     StoreOp stencilStoreOp;
    46     bool stencilReadOnly;
    47 };
     40RemotePipelineLayoutProxy::~RemotePipelineLayoutProxy()
     41{
     42}
    4843
    49 } // namespace PAL::WebGPU
     44void RemotePipelineLayoutProxy::setLabelInternal(const String& label)
     45{
     46    UNUSED_PARAM(label);
     47}
     48
     49} // namespace WebKit::WebGPU
     50
     51#endif // ENABLE(GPU_PROCESS)
  • trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemotePipelineLayoutProxy.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #if HAVE(WEBGPU_IMPLEMENTATION)
     28#if ENABLE(GPU_PROCESS)
    2929
    30 #include "WebGPUShaderModule.h"
    31 #include <WebGPU/WebGPU.h>
     30#include "WebGPUIdentifier.h"
     31#include <pal/graphics/WebGPU/WebGPUPipelineLayout.h>
    3232
    33 namespace PAL::WebGPU {
     33namespace WebKit::WebGPU {
    3434
    3535class ConvertToBackingContext;
    3636
    37 class ShaderModuleImpl final : public ShaderModule {
     37class RemotePipelineLayoutProxy final : public PAL::WebGPU::PipelineLayout {
    3838public:
    39     static Ref<ShaderModuleImpl> create(WGPUShaderModule shaderModule, ConvertToBackingContext& convertToBackingContext)
     39    static Ref<RemotePipelineLayoutProxy> create(ConvertToBackingContext& convertToBackingContext)
    4040    {
    41         return adoptRef(*new ShaderModuleImpl(shaderModule, convertToBackingContext));
     41        return adoptRef(*new RemotePipelineLayoutProxy(convertToBackingContext));
    4242    }
    4343
    44     virtual ~ShaderModuleImpl();
     44    virtual ~RemotePipelineLayoutProxy();
    4545
    4646private:
    4747    friend class DowncastConvertToBackingContext;
    4848
    49     ShaderModuleImpl(WGPUShaderModule, ConvertToBackingContext&);
     49    RemotePipelineLayoutProxy(ConvertToBackingContext&);
    5050
    51     ShaderModuleImpl(const ShaderModuleImpl&) = delete;
    52     ShaderModuleImpl(ShaderModuleImpl&&) = delete;
    53     ShaderModuleImpl& operator=(const ShaderModuleImpl&) = delete;
    54     ShaderModuleImpl& operator=(ShaderModuleImpl&&) = delete;
     51    RemotePipelineLayoutProxy(const RemotePipelineLayoutProxy&) = delete;
     52    RemotePipelineLayoutProxy(RemotePipelineLayoutProxy&&) = delete;
     53    RemotePipelineLayoutProxy& operator=(const RemotePipelineLayoutProxy&) = delete;
     54    RemotePipelineLayoutProxy& operator=(RemotePipelineLayoutProxy&&) = delete;
    5555
    56     WGPUShaderModule backing() const { return m_backing; }
    57 
    58     void compilationInfo(std::function<void(Ref<CompilationInfo>&&)>&&) final;
     56    WebGPUIdentifier backing() const { return m_backing; }
    5957
    6058    void setLabelInternal(const String&) final;
    6159
    62     WGPUShaderModule m_backing { nullptr };
     60    WebGPUIdentifier m_backing { WebGPUIdentifier::generate() };
    6361    Ref<ConvertToBackingContext> m_convertToBackingContext;
    6462};
    6563
    66 } // namespace PAL::WebGPU
     64} // namespace WebKit::WebGPU
    6765
    68 #endif // HAVE(WEBGPU_IMPLEMENTATION)
     66#endif // ENABLE(GPU_PROCESS)
  • trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteQuerySetProxy.cpp

    r285879 r285881  
    2424 */
    2525
    26 #pragma once
     26#include "config.h"
     27#include "RemoteQuerySetProxy.h"
    2728
    28 #include "WebGPUIntegralTypes.h"
    29 #include "WebGPULoadOp.h"
    30 #include "WebGPUStoreOp.h"
    31 #include "WebGPUTextureView.h"
    32 #include <variant>
    33 #include <wtf/Ref.h>
     29#if ENABLE(GPU_PROCESS)
    3430
    35 namespace PAL::WebGPU {
     31#include "WebGPUConvertToBackingContext.h"
    3632
    37 struct RenderPassDepthStencilAttachment {
    38     TextureView& view;
     33namespace WebKit::WebGPU {
    3934
    40     std::variant<LoadOp, float> depthLoadValue;
    41     StoreOp depthStoreOp;
    42     bool depthReadOnly;
     35RemoteQuerySetProxy::RemoteQuerySetProxy(ConvertToBackingContext& convertToBackingContext)
     36    : m_convertToBackingContext(convertToBackingContext)
     37{
     38}
    4339
    44     std::variant<LoadOp, StencilValue> stencilLoadValue;
    45     StoreOp stencilStoreOp;
    46     bool stencilReadOnly;
    47 };
     40RemoteQuerySetProxy::~RemoteQuerySetProxy()
     41{
     42}
    4843
    49 } // namespace PAL::WebGPU
     44void RemoteQuerySetProxy::destroy()
     45{
     46}
     47
     48void RemoteQuerySetProxy::setLabelInternal(const String& label)
     49{
     50    UNUSED_PARAM(label);
     51}
     52
     53} // namespace WebKit::WebGPU
     54
     55#endif // ENABLE(GPU_PROCESS)
  • trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteQuerySetProxy.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #if HAVE(WEBGPU_IMPLEMENTATION)
     28#if ENABLE(GPU_PROCESS)
    2929
    30 #include "WebGPUShaderModule.h"
    31 #include <WebGPU/WebGPU.h>
     30#include "WebGPUIdentifier.h"
     31#include <pal/graphics/WebGPU/WebGPUQuerySet.h>
    3232
    33 namespace PAL::WebGPU {
     33namespace WebKit::WebGPU {
    3434
    3535class ConvertToBackingContext;
    3636
    37 class ShaderModuleImpl final : public ShaderModule {
     37class RemoteQuerySetProxy final : public PAL::WebGPU::QuerySet {
    3838public:
    39     static Ref<ShaderModuleImpl> create(WGPUShaderModule shaderModule, ConvertToBackingContext& convertToBackingContext)
     39    static Ref<RemoteQuerySetProxy> create(ConvertToBackingContext& convertToBackingContext)
    4040    {
    41         return adoptRef(*new ShaderModuleImpl(shaderModule, convertToBackingContext));
     41        return adoptRef(*new RemoteQuerySetProxy(convertToBackingContext));
    4242    }
    4343
    44     virtual ~ShaderModuleImpl();
     44    virtual ~RemoteQuerySetProxy();
    4545
    4646private:
    4747    friend class DowncastConvertToBackingContext;
    4848
    49     ShaderModuleImpl(WGPUShaderModule, ConvertToBackingContext&);
     49    RemoteQuerySetProxy(ConvertToBackingContext&);
    5050
    51     ShaderModuleImpl(const ShaderModuleImpl&) = delete;
    52     ShaderModuleImpl(ShaderModuleImpl&&) = delete;
    53     ShaderModuleImpl& operator=(const ShaderModuleImpl&) = delete;
    54     ShaderModuleImpl& operator=(ShaderModuleImpl&&) = delete;
     51    RemoteQuerySetProxy(const RemoteQuerySetProxy&) = delete;
     52    RemoteQuerySetProxy(RemoteQuerySetProxy&&) = delete;
     53    RemoteQuerySetProxy& operator=(const RemoteQuerySetProxy&) = delete;
     54    RemoteQuerySetProxy& operator=(RemoteQuerySetProxy&&) = delete;
    5555
    56     WGPUShaderModule backing() const { return m_backing; }
     56    WebGPUIdentifier backing() const { return m_backing; }
    5757
    58     void compilationInfo(std::function<void(Ref<CompilationInfo>&&)>&&) final;
     58    void destroy() final;
    5959
    6060    void setLabelInternal(const String&) final;
    6161
    62     WGPUShaderModule m_backing { nullptr };
     62    WebGPUIdentifier m_backing { WebGPUIdentifier::generate() };
    6363    Ref<ConvertToBackingContext> m_convertToBackingContext;
    6464};
    6565
    66 } // namespace PAL::WebGPU
     66} // namespace WebKit::WebGPU
    6767
    68 #endif // HAVE(WEBGPU_IMPLEMENTATION)
     68#endif // ENABLE(GPU_PROCESS)
  • trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteQueueProxy.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #if HAVE(WEBGPU_IMPLEMENTATION)
     28#if ENABLE(GPU_PROCESS)
    2929
    30 #include "WebGPUQueue.h"
    31 #include <WebGPU/WebGPU.h>
     30#include "WebGPUIdentifier.h"
     31#include <pal/graphics/WebGPU/WebGPUQueue.h>
    3232#include <wtf/Deque.h>
    3333
    34 namespace PAL::WebGPU {
     34namespace WebKit::WebGPU {
    3535
    3636class ConvertToBackingContext;
    3737
    38 class QueueImpl final : public Queue {
     38class RemoteQueueProxy final : public PAL::WebGPU::Queue {
    3939public:
    40     static Ref<QueueImpl> create(WGPUQueue queue, ConvertToBackingContext& convertToBackingContext)
     40    static Ref<RemoteQueueProxy> create(ConvertToBackingContext& convertToBackingContext)
    4141    {
    42         return adoptRef(*new QueueImpl(queue, convertToBackingContext));
     42        return adoptRef(*new RemoteQueueProxy(convertToBackingContext));
    4343    }
    4444
    45     virtual ~QueueImpl();
     45    virtual ~RemoteQueueProxy();
    4646
    4747private:
    4848    friend class DowncastConvertToBackingContext;
    49     friend void onSubmittedWorkDoneCallback(WGPUQueueWorkDoneStatus, void* userdata);
    5049
    51     QueueImpl(WGPUQueue, ConvertToBackingContext&);
     50    RemoteQueueProxy(ConvertToBackingContext&);
    5251
    53     QueueImpl(const QueueImpl&) = delete;
    54     QueueImpl(QueueImpl&&) = delete;
    55     QueueImpl& operator=(const QueueImpl&) = delete;
    56     QueueImpl& operator=(QueueImpl&&) = delete;
     52    RemoteQueueProxy(const RemoteQueueProxy&) = delete;
     53    RemoteQueueProxy(RemoteQueueProxy&&) = delete;
     54    RemoteQueueProxy& operator=(const RemoteQueueProxy&) = delete;
     55    RemoteQueueProxy& operator=(RemoteQueueProxy&&) = delete;
    5756
    58     WGPUQueue backing() const { return m_backing; }
     57    WebGPUIdentifier backing() const { return m_backing; }
    5958
    60     void submit(Vector<std::reference_wrapper<CommandBuffer>>&&) final;
     59    void submit(Vector<std::reference_wrapper<PAL::WebGPU::CommandBuffer>>&&) final;
    6160
    62     void onSubmittedWorkDoneCallback(WGPUQueueWorkDoneStatus);
    63     void onSubmittedWorkDone(std::function<void()>&&) final;
     61    void onSubmittedWorkDone(WTF::Function<void()>&&) final;
    6462
    6563    void writeBuffer(
    66         const Buffer&,
    67         Size64 bufferOffset,
     64        const PAL::WebGPU::Buffer&,
     65        PAL::WebGPU::Size64 bufferOffset,
    6866        const void* source,
    6967        size_t byteLength,
    70         Size64 dataOffset,
    71         std::optional<Size64>) final;
     68        PAL::WebGPU::Size64 dataOffset,
     69        std::optional<PAL::WebGPU::Size64>) final;
    7270
    7371    void writeTexture(
    74         const ImageCopyTexture& destination,
     72        const PAL::WebGPU::ImageCopyTexture& destination,
    7573        const void* source,
    7674        size_t byteLength,
    77         const ImageDataLayout&,
    78         const Extent3D& size) final;
     75        const PAL::WebGPU::ImageDataLayout&,
     76        const PAL::WebGPU::Extent3D& size) final;
    7977
    8078    void copyExternalImageToTexture(
    81         const ImageCopyExternalImage& source,
    82         const ImageCopyTextureTagged& destination,
    83         const Extent3D& copySize) final;
     79        const PAL::WebGPU::ImageCopyExternalImage& source,
     80        const PAL::WebGPU::ImageCopyTextureTagged& destination,
     81        const PAL::WebGPU::Extent3D& copySize) final;
    8482
    8583    void setLabelInternal(const String&) final;
    8684
    87     uint64_t m_signalValue { 1 };
     85    Deque<WTF::Function<void()>> m_callbacks;
    8886
    89     Deque<std::function<void()>> m_callbacks;
    90 
    91     WGPUQueue m_backing { nullptr };
     87    WebGPUIdentifier m_backing { WebGPUIdentifier::generate() };
    9288    Ref<ConvertToBackingContext> m_convertToBackingContext;
    9389};
    9490
    95 } // namespace PAL::WebGPU
     91} // namespace WebKit::WebGPU
    9692
    97 #endif // HAVE(WEBGPU_IMPLEMENTATION)
     93#endif // ENABLE(GPU_PROCESS)
  • trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteRenderBundleProxy.cpp

    r285879 r285881  
    2424 */
    2525
    26 #pragma once
     26#include "config.h"
     27#include "RemoteRenderBundleProxy.h"
    2728
    28 #include "WebGPUIntegralTypes.h"
    29 #include "WebGPULoadOp.h"
    30 #include "WebGPUStoreOp.h"
    31 #include "WebGPUTextureView.h"
    32 #include <variant>
    33 #include <wtf/Ref.h>
     29#if ENABLE(GPU_PROCESS)
    3430
    35 namespace PAL::WebGPU {
     31#include "WebGPUConvertToBackingContext.h"
    3632
    37 struct RenderPassDepthStencilAttachment {
    38     TextureView& view;
     33namespace WebKit::WebGPU {
    3934
    40     std::variant<LoadOp, float> depthLoadValue;
    41     StoreOp depthStoreOp;
    42     bool depthReadOnly;
     35RemoteRenderBundleProxy::RemoteRenderBundleProxy(ConvertToBackingContext& convertToBackingContext)
     36    : m_convertToBackingContext(convertToBackingContext)
     37{
     38}
    4339
    44     std::variant<LoadOp, StencilValue> stencilLoadValue;
    45     StoreOp stencilStoreOp;
    46     bool stencilReadOnly;
    47 };
     40RemoteRenderBundleProxy::~RemoteRenderBundleProxy()
     41{
     42}
    4843
    49 } // namespace PAL::WebGPU
     44void RemoteRenderBundleProxy::setLabelInternal(const String& label)
     45{
     46    UNUSED_PARAM(label);
     47}
     48
     49} // namespace WebKit::WebGPU
     50
     51#endif // ENABLE(GPU_PROCESS)
  • trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteRenderBundleProxy.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #if HAVE(WEBGPU_IMPLEMENTATION)
     28#if ENABLE(GPU_PROCESS)
    2929
    30 #include "WebGPUShaderModule.h"
    31 #include <WebGPU/WebGPU.h>
     30#include "WebGPUIdentifier.h"
     31#include <pal/graphics/WebGPU/WebGPURenderBundle.h>
    3232
    33 namespace PAL::WebGPU {
     33namespace WebKit::WebGPU {
    3434
    3535class ConvertToBackingContext;
    3636
    37 class ShaderModuleImpl final : public ShaderModule {
     37class RemoteRenderBundleProxy final : public PAL::WebGPU::RenderBundle {
    3838public:
    39     static Ref<ShaderModuleImpl> create(WGPUShaderModule shaderModule, ConvertToBackingContext& convertToBackingContext)
     39    static Ref<RemoteRenderBundleProxy> create(ConvertToBackingContext& convertToBackingContext)
    4040    {
    41         return adoptRef(*new ShaderModuleImpl(shaderModule, convertToBackingContext));
     41        return adoptRef(*new RemoteRenderBundleProxy(convertToBackingContext));
    4242    }
    4343
    44     virtual ~ShaderModuleImpl();
     44    virtual ~RemoteRenderBundleProxy();
    4545
    4646private:
    4747    friend class DowncastConvertToBackingContext;
    4848
    49     ShaderModuleImpl(WGPUShaderModule, ConvertToBackingContext&);
     49    RemoteRenderBundleProxy(ConvertToBackingContext&);
    5050
    51     ShaderModuleImpl(const ShaderModuleImpl&) = delete;
    52     ShaderModuleImpl(ShaderModuleImpl&&) = delete;
    53     ShaderModuleImpl& operator=(const ShaderModuleImpl&) = delete;
    54     ShaderModuleImpl& operator=(ShaderModuleImpl&&) = delete;
     51    RemoteRenderBundleProxy(const RemoteRenderBundleProxy&) = delete;
     52    RemoteRenderBundleProxy(RemoteRenderBundleProxy&&) = delete;
     53    RemoteRenderBundleProxy& operator=(const RemoteRenderBundleProxy&) = delete;
     54    RemoteRenderBundleProxy& operator=(RemoteRenderBundleProxy&&) = delete;
    5555
    56     WGPUShaderModule backing() const { return m_backing; }
    57 
    58     void compilationInfo(std::function<void(Ref<CompilationInfo>&&)>&&) final;
     56    WebGPUIdentifier backing() const { return m_backing; }
    5957
    6058    void setLabelInternal(const String&) final;
    6159
    62     WGPUShaderModule m_backing { nullptr };
     60    WebGPUIdentifier m_backing { WebGPUIdentifier::generate() };
    6361    Ref<ConvertToBackingContext> m_convertToBackingContext;
    6462};
    6563
    66 } // namespace PAL::WebGPU
     64} // namespace WebKit::WebGPU
    6765
    68 #endif // HAVE(WEBGPU_IMPLEMENTATION)
     66#endif // ENABLE(GPU_PROCESS)
  • trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteRenderPipelineProxy.cpp

    r285879 r285881  
    2525
    2626#include "config.h"
    27 #include "WebGPUShaderModuleImpl.h"
     27#include "RemoteRenderPipelineProxy.h"
    2828
    29 #if HAVE(WEBGPU_IMPLEMENTATION)
     29#if ENABLE(GPU_PROCESS)
    3030
     31#include "RemoteBindGroupLayoutProxy.h"
    3132#include "WebGPUConvertToBackingContext.h"
    32 #include <WebGPU/WebGPUExt.h>
    3333
    34 namespace PAL::WebGPU {
     34namespace WebKit::WebGPU {
    3535
    36 ShaderModuleImpl::ShaderModuleImpl(WGPUShaderModule shaderModule, ConvertToBackingContext& convertToBackingContext)
    37     : m_backing(shaderModule)
    38     , m_convertToBackingContext(convertToBackingContext)
     36RemoteRenderPipelineProxy::RemoteRenderPipelineProxy(ConvertToBackingContext& convertToBackingContext)
     37    : m_convertToBackingContext(convertToBackingContext)
    3938{
    4039}
    4140
    42 ShaderModuleImpl::~ShaderModuleImpl()
    43 {
    44     wgpuShaderModuleRelease(m_backing);
    45 }
    46 
    47 void ShaderModuleImpl::compilationInfo(std::function<void(Ref<CompilationInfo>&&)>&&)
     41RemoteRenderPipelineProxy::~RemoteRenderPipelineProxy()
    4842{
    4943}
    5044
    51 void ShaderModuleImpl::setLabelInternal(const String& label)
     45Ref<PAL::WebGPU::BindGroupLayout> RemoteRenderPipelineProxy::getBindGroupLayout(uint32_t index)
    5246{
    53     wgpuShaderModuleSetLabel(m_backing, label.utf8().data());
     47    UNUSED_PARAM(index);
     48    return RemoteBindGroupLayoutProxy::create(m_convertToBackingContext);
    5449}
    5550
    56 } // namespace PAL::WebGPU
     51void RemoteRenderPipelineProxy::setLabelInternal(const String& label)
     52{
     53    UNUSED_PARAM(label);
     54}
    5755
    58 #endif // HAVE(WEBGPU_IMPLEMENTATION)
     56} // namespace WebKit::WebGPU
     57
     58#endif // ENABLE(GPU_PROCESS)
  • trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteRenderPipelineProxy.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #if HAVE(WEBGPU_IMPLEMENTATION)
     28#if ENABLE(GPU_PROCESS)
    2929
    30 #include "WebGPUShaderModule.h"
    31 #include <WebGPU/WebGPU.h>
     30#include "WebGPUIdentifier.h"
     31#include <pal/graphics/WebGPU/WebGPURenderPipeline.h>
    3232
    33 namespace PAL::WebGPU {
     33namespace WebKit::WebGPU {
    3434
    3535class ConvertToBackingContext;
    3636
    37 class ShaderModuleImpl final : public ShaderModule {
     37class RemoteRenderPipelineProxy final : public PAL::WebGPU::RenderPipeline {
    3838public:
    39     static Ref<ShaderModuleImpl> create(WGPUShaderModule shaderModule, ConvertToBackingContext& convertToBackingContext)
     39    static Ref<RemoteRenderPipelineProxy> create(ConvertToBackingContext& convertToBackingContext)
    4040    {
    41         return adoptRef(*new ShaderModuleImpl(shaderModule, convertToBackingContext));
     41        return adoptRef(*new RemoteRenderPipelineProxy(convertToBackingContext));
    4242    }
    4343
    44     virtual ~ShaderModuleImpl();
     44    virtual ~RemoteRenderPipelineProxy();
    4545
    4646private:
    4747    friend class DowncastConvertToBackingContext;
    4848
    49     ShaderModuleImpl(WGPUShaderModule, ConvertToBackingContext&);
     49    RemoteRenderPipelineProxy(ConvertToBackingContext&);
    5050
    51     ShaderModuleImpl(const ShaderModuleImpl&) = delete;
    52     ShaderModuleImpl(ShaderModuleImpl&&) = delete;
    53     ShaderModuleImpl& operator=(const ShaderModuleImpl&) = delete;
    54     ShaderModuleImpl& operator=(ShaderModuleImpl&&) = delete;
     51    RemoteRenderPipelineProxy(const RemoteRenderPipelineProxy&) = delete;
     52    RemoteRenderPipelineProxy(RemoteRenderPipelineProxy&&) = delete;
     53    RemoteRenderPipelineProxy& operator=(const RemoteRenderPipelineProxy&) = delete;
     54    RemoteRenderPipelineProxy& operator=(RemoteRenderPipelineProxy&&) = delete;
    5555
    56     WGPUShaderModule backing() const { return m_backing; }
     56    WebGPUIdentifier backing() const { return m_backing; }
    5757
    58     void compilationInfo(std::function<void(Ref<CompilationInfo>&&)>&&) final;
     58    Ref<PAL::WebGPU::BindGroupLayout> getBindGroupLayout(uint32_t index) final;
    5959
    6060    void setLabelInternal(const String&) final;
    6161
    62     WGPUShaderModule m_backing { nullptr };
     62    WebGPUIdentifier m_backing { WebGPUIdentifier::generate() };
    6363    Ref<ConvertToBackingContext> m_convertToBackingContext;
    6464};
    6565
    66 } // namespace PAL::WebGPU
     66} // namespace WebKit::WebGPU
    6767
    68 #endif // HAVE(WEBGPU_IMPLEMENTATION)
     68#endif // ENABLE(GPU_PROCESS)
  • trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteSamplerProxy.cpp

    r285879 r285881  
    2424 */
    2525
    26 #pragma once
     26#include "config.h"
     27#include "RemoteSamplerProxy.h"
    2728
    28 #include "WebGPUShaderModule.h"
    29 #include <wtf/KeyValuePair.h>
    30 #include <wtf/Ref.h>
    31 #include <wtf/Vector.h>
     29#if ENABLE(GPU_PROCESS)
    3230
    33 namespace PAL::WebGPU {
     31#include "WebGPUConvertToBackingContext.h"
    3432
    35 using PipelineConstantValue = double; // May represent WGSL’s bool, f32, i32, u32.
     33namespace WebKit::WebGPU {
    3634
    37 struct ProgrammableStage {
    38     ShaderModule& module;
    39     String entryPoint;
    40     Vector<KeyValuePair<String, PipelineConstantValue>> constants;
    41 };
     35RemoteSamplerProxy::RemoteSamplerProxy(ConvertToBackingContext& convertToBackingContext)
     36    : m_convertToBackingContext(convertToBackingContext)
     37{
     38}
    4239
    43 } // namespace PAL::WebGPU
     40RemoteSamplerProxy::~RemoteSamplerProxy()
     41{
     42}
     43
     44void RemoteSamplerProxy::setLabelInternal(const String& label)
     45{
     46    UNUSED_PARAM(label);
     47}
     48
     49} // namespace WebKit::WebGPU
     50
     51#endif // ENABLE(GPU_PROCESS)
  • trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteSamplerProxy.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #if HAVE(WEBGPU_IMPLEMENTATION)
     28#if ENABLE(GPU_PROCESS)
    2929
    30 #include "WebGPUShaderModule.h"
    31 #include <WebGPU/WebGPU.h>
     30#include "WebGPUIdentifier.h"
     31#include <pal/graphics/WebGPU/WebGPUSampler.h>
    3232
    33 namespace PAL::WebGPU {
     33namespace WebKit::WebGPU {
    3434
    3535class ConvertToBackingContext;
    3636
    37 class ShaderModuleImpl final : public ShaderModule {
     37class RemoteSamplerProxy final : public PAL::WebGPU::Sampler {
    3838public:
    39     static Ref<ShaderModuleImpl> create(WGPUShaderModule shaderModule, ConvertToBackingContext& convertToBackingContext)
     39    static Ref<RemoteSamplerProxy> create(ConvertToBackingContext& convertToBackingContext)
    4040    {
    41         return adoptRef(*new ShaderModuleImpl(shaderModule, convertToBackingContext));
     41        return adoptRef(*new RemoteSamplerProxy(convertToBackingContext));
    4242    }
    4343
    44     virtual ~ShaderModuleImpl();
     44    virtual ~RemoteSamplerProxy();
    4545
    4646private:
    4747    friend class DowncastConvertToBackingContext;
    4848
    49     ShaderModuleImpl(WGPUShaderModule, ConvertToBackingContext&);
     49    RemoteSamplerProxy(ConvertToBackingContext&);
    5050
    51     ShaderModuleImpl(const ShaderModuleImpl&) = delete;
    52     ShaderModuleImpl(ShaderModuleImpl&&) = delete;
    53     ShaderModuleImpl& operator=(const ShaderModuleImpl&) = delete;
    54     ShaderModuleImpl& operator=(ShaderModuleImpl&&) = delete;
     51    RemoteSamplerProxy(const RemoteSamplerProxy&) = delete;
     52    RemoteSamplerProxy(RemoteSamplerProxy&&) = delete;
     53    RemoteSamplerProxy& operator=(const RemoteSamplerProxy&) = delete;
     54    RemoteSamplerProxy& operator=(RemoteSamplerProxy&&) = delete;
    5555
    56     WGPUShaderModule backing() const { return m_backing; }
    57 
    58     void compilationInfo(std::function<void(Ref<CompilationInfo>&&)>&&) final;
     56    WebGPUIdentifier backing() const { return m_backing; }
    5957
    6058    void setLabelInternal(const String&) final;
    6159
    62     WGPUShaderModule m_backing { nullptr };
     60    WebGPUIdentifier m_backing { WebGPUIdentifier::generate() };
    6361    Ref<ConvertToBackingContext> m_convertToBackingContext;
    6462};
    6563
    66 } // namespace PAL::WebGPU
     64} // namespace WebKit::WebGPU
    6765
    68 #endif // HAVE(WEBGPU_IMPLEMENTATION)
     66#endif // ENABLE(GPU_PROCESS)
  • trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteShaderModuleProxy.cpp

    r285879 r285881  
    2525
    2626#include "config.h"
    27 #include "WebGPUShaderModuleImpl.h"
     27#include "RemoteShaderModuleProxy.h"
    2828
    29 #if HAVE(WEBGPU_IMPLEMENTATION)
     29#if ENABLE(GPU_PROCESS)
    3030
    3131#include "WebGPUConvertToBackingContext.h"
    32 #include <WebGPU/WebGPUExt.h>
    3332
    34 namespace PAL::WebGPU {
     33namespace WebKit::WebGPU {
    3534
    36 ShaderModuleImpl::ShaderModuleImpl(WGPUShaderModule shaderModule, ConvertToBackingContext& convertToBackingContext)
    37     : m_backing(shaderModule)
    38     , m_convertToBackingContext(convertToBackingContext)
     35RemoteShaderModuleProxy::RemoteShaderModuleProxy(ConvertToBackingContext& convertToBackingContext)
     36    : m_convertToBackingContext(convertToBackingContext)
    3937{
    4038}
    4139
    42 ShaderModuleImpl::~ShaderModuleImpl()
    43 {
    44     wgpuShaderModuleRelease(m_backing);
    45 }
    46 
    47 void ShaderModuleImpl::compilationInfo(std::function<void(Ref<CompilationInfo>&&)>&&)
     40RemoteShaderModuleProxy::~RemoteShaderModuleProxy()
    4841{
    4942}
    5043
    51 void ShaderModuleImpl::setLabelInternal(const String& label)
     44void RemoteShaderModuleProxy::compilationInfo(WTF::Function<void(Ref<PAL::WebGPU::CompilationInfo>&&)>&& callback)
    5245{
    53     wgpuShaderModuleSetLabel(m_backing, label.utf8().data());
     46    UNUSED_PARAM(callback);
    5447}
    5548
    56 } // namespace PAL::WebGPU
     49void RemoteShaderModuleProxy::setLabelInternal(const String& label)
     50{
     51    UNUSED_PARAM(label);
     52}
    5753
    58 #endif // HAVE(WEBGPU_IMPLEMENTATION)
     54} // namespace WebKit::WebGPU
     55
     56#endif // ENABLE(GPU_PROCESS)
  • trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteShaderModuleProxy.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #if HAVE(WEBGPU_IMPLEMENTATION)
     28#if ENABLE(GPU_PROCESS)
    2929
    30 #include "WebGPUShaderModule.h"
    31 #include <WebGPU/WebGPU.h>
     30#include "WebGPUIdentifier.h"
     31#include <pal/graphics/WebGPU/WebGPUShaderModule.h>
    3232
    33 namespace PAL::WebGPU {
     33namespace WebKit::WebGPU {
    3434
    3535class ConvertToBackingContext;
    3636
    37 class ShaderModuleImpl final : public ShaderModule {
     37class RemoteShaderModuleProxy final : public PAL::WebGPU::ShaderModule {
    3838public:
    39     static Ref<ShaderModuleImpl> create(WGPUShaderModule shaderModule, ConvertToBackingContext& convertToBackingContext)
     39    static Ref<RemoteShaderModuleProxy> create(ConvertToBackingContext& convertToBackingContext)
    4040    {
    41         return adoptRef(*new ShaderModuleImpl(shaderModule, convertToBackingContext));
     41        return adoptRef(*new RemoteShaderModuleProxy(convertToBackingContext));
    4242    }
    4343
    44     virtual ~ShaderModuleImpl();
     44    virtual ~RemoteShaderModuleProxy();
    4545
    4646private:
    4747    friend class DowncastConvertToBackingContext;
    4848
    49     ShaderModuleImpl(WGPUShaderModule, ConvertToBackingContext&);
     49    RemoteShaderModuleProxy(ConvertToBackingContext&);
    5050
    51     ShaderModuleImpl(const ShaderModuleImpl&) = delete;
    52     ShaderModuleImpl(ShaderModuleImpl&&) = delete;
    53     ShaderModuleImpl& operator=(const ShaderModuleImpl&) = delete;
    54     ShaderModuleImpl& operator=(ShaderModuleImpl&&) = delete;
     51    RemoteShaderModuleProxy(const RemoteShaderModuleProxy&) = delete;
     52    RemoteShaderModuleProxy(RemoteShaderModuleProxy&&) = delete;
     53    RemoteShaderModuleProxy& operator=(const RemoteShaderModuleProxy&) = delete;
     54    RemoteShaderModuleProxy& operator=(RemoteShaderModuleProxy&&) = delete;
    5555
    56     WGPUShaderModule backing() const { return m_backing; }
     56    WebGPUIdentifier backing() const { return m_backing; }
    5757
    58     void compilationInfo(std::function<void(Ref<CompilationInfo>&&)>&&) final;
     58    void compilationInfo(WTF::Function<void(Ref<PAL::WebGPU::CompilationInfo>&&)>&&) final;
    5959
    6060    void setLabelInternal(const String&) final;
    6161
    62     WGPUShaderModule m_backing { nullptr };
     62    WebGPUIdentifier m_backing { WebGPUIdentifier::generate() };
    6363    Ref<ConvertToBackingContext> m_convertToBackingContext;
    6464};
    6565
    66 } // namespace PAL::WebGPU
     66} // namespace WebKit::WebGPU
    6767
    68 #endif // HAVE(WEBGPU_IMPLEMENTATION)
     68#endif // ENABLE(GPU_PROCESS)
  • trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteTextureProxy.cpp

    r285879 r285881  
    2525
    2626#include "config.h"
    27 #include "WebGPUShaderModuleImpl.h"
     27#include "RemoteTextureProxy.h"
    2828
    29 #if HAVE(WEBGPU_IMPLEMENTATION)
     29#if ENABLE(GPU_PROCESS)
    3030
     31#include "RemoteTextureViewProxy.h"
    3132#include "WebGPUConvertToBackingContext.h"
    32 #include <WebGPU/WebGPUExt.h>
    3333
    34 namespace PAL::WebGPU {
     34namespace WebKit::WebGPU {
    3535
    36 ShaderModuleImpl::ShaderModuleImpl(WGPUShaderModule shaderModule, ConvertToBackingContext& convertToBackingContext)
    37     : m_backing(shaderModule)
    38     , m_convertToBackingContext(convertToBackingContext)
     36RemoteTextureProxy::RemoteTextureProxy(ConvertToBackingContext& convertToBackingContext)
     37    : m_convertToBackingContext(convertToBackingContext)
    3938{
    4039}
    4140
    42 ShaderModuleImpl::~ShaderModuleImpl()
    43 {
    44     wgpuShaderModuleRelease(m_backing);
    45 }
    46 
    47 void ShaderModuleImpl::compilationInfo(std::function<void(Ref<CompilationInfo>&&)>&&)
     41RemoteTextureProxy::~RemoteTextureProxy()
    4842{
    4943}
    5044
    51 void ShaderModuleImpl::setLabelInternal(const String& label)
     45Ref<PAL::WebGPU::TextureView> RemoteTextureProxy::createView(const std::optional<PAL::WebGPU::TextureViewDescriptor>& descriptor) const
    5246{
    53     wgpuShaderModuleSetLabel(m_backing, label.utf8().data());
     47    UNUSED_PARAM(descriptor);
     48    return RemoteTextureViewProxy::create(m_convertToBackingContext);
    5449}
    5550
    56 } // namespace PAL::WebGPU
     51void RemoteTextureProxy::destroy()
     52{
     53}
    5754
    58 #endif // HAVE(WEBGPU_IMPLEMENTATION)
     55void RemoteTextureProxy::setLabelInternal(const String& label)
     56{
     57    UNUSED_PARAM(label);
     58}
     59
     60} // namespace WebKit::WebGPU
     61
     62#endif // ENABLE(GPU_PROCESS)
  • trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteTextureProxy.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #if HAVE(WEBGPU_IMPLEMENTATION)
     28#if ENABLE(GPU_PROCESS)
    2929
    30 #include "WebGPUBuffer.h"
    31 #include <WebGPU/WebGPU.h>
    32 #include <wtf/Deque.h>
     30#include "WebGPUIdentifier.h"
     31#include <pal/graphics/WebGPU/WebGPUIntegralTypes.h>
     32#include <pal/graphics/WebGPU/WebGPUTexture.h>
     33#include <pal/graphics/WebGPU/WebGPUTextureDimension.h>
     34#include <pal/graphics/WebGPU/WebGPUTextureFormat.h>
    3335
    34 namespace PAL::WebGPU {
     36namespace WebKit::WebGPU {
    3537
    3638class ConvertToBackingContext;
    3739
    38 class BufferImpl final : public Buffer {
     40class RemoteTextureProxy final : public PAL::WebGPU::Texture {
    3941public:
    40     static Ref<BufferImpl> create(WGPUBuffer buffer, ConvertToBackingContext& convertToBackingContext)
     42    static Ref<RemoteTextureProxy> create(ConvertToBackingContext& convertToBackingContext)
    4143    {
    42         return adoptRef(*new BufferImpl(buffer, convertToBackingContext));
     44        return adoptRef(*new RemoteTextureProxy(convertToBackingContext));
    4345    }
    4446
    45     virtual ~BufferImpl();
     47    virtual ~RemoteTextureProxy();
    4648
    4749private:
    4850    friend class DowncastConvertToBackingContext;
    49     friend void mapCallback(WGPUBufferMapAsyncStatus, void* userdata);
    5051
    51     BufferImpl(WGPUBuffer, ConvertToBackingContext&);
     52    RemoteTextureProxy(ConvertToBackingContext&);
    5253
    53     BufferImpl(const BufferImpl&) = delete;
    54     BufferImpl(BufferImpl&&) = delete;
    55     BufferImpl& operator=(const BufferImpl&) = delete;
    56     BufferImpl& operator=(BufferImpl&&) = delete;
     54    RemoteTextureProxy(const RemoteTextureProxy&) = delete;
     55    RemoteTextureProxy(RemoteTextureProxy&&) = delete;
     56    RemoteTextureProxy& operator=(const RemoteTextureProxy&) = delete;
     57    RemoteTextureProxy& operator=(RemoteTextureProxy&&) = delete;
    5758
    58     WGPUBuffer backing() const { return m_backing; }
     59    WebGPUIdentifier backing() const { return m_backing; }
    5960
    60     void mapCallback(WGPUBufferMapAsyncStatus);
    61     void mapAsync(MapModeFlags, std::optional<Size64> offset, std::optional<Size64> sizeForMap, std::function<void()>&&) final;
    62     MappedRange getMappedRange(std::optional<Size64> offset, std::optional<Size64>) final;
    63     void unmap() final;
     61    Ref<PAL::WebGPU::TextureView> createView(const std::optional<PAL::WebGPU::TextureViewDescriptor>&) const final;
    6462
    6563    void destroy() final;
     
    6765    void setLabelInternal(const String&) final;
    6866
    69     Deque<std::function<void()>> m_callbacks;
    70 
    71     WGPUBuffer m_backing { nullptr };
     67    WebGPUIdentifier m_backing { WebGPUIdentifier::generate() };
    7268    Ref<ConvertToBackingContext> m_convertToBackingContext;
    7369};
    7470
    75 } // namespace PAL::WebGPU
     71} // namespace WebKit::WebGPU
    7672
    77 #endif // HAVE(WEBGPU_IMPLEMENTATION)
     73#endif // ENABLE(GPU_PROCESS)
  • trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteTextureViewProxy.cpp

    r285879 r285881  
    2424 */
    2525
    26 #pragma once
     26#include "config.h"
     27#include "RemoteTextureViewProxy.h"
    2728
    28 #include "WebGPUIntegralTypes.h"
    29 #include "WebGPULoadOp.h"
    30 #include "WebGPUStoreOp.h"
    31 #include "WebGPUTextureView.h"
    32 #include <variant>
    33 #include <wtf/Ref.h>
     29#if ENABLE(GPU_PROCESS)
    3430
    35 namespace PAL::WebGPU {
     31#include "WebGPUConvertToBackingContext.h"
    3632
    37 struct RenderPassDepthStencilAttachment {
    38     TextureView& view;
     33namespace WebKit::WebGPU {
    3934
    40     std::variant<LoadOp, float> depthLoadValue;
    41     StoreOp depthStoreOp;
    42     bool depthReadOnly;
     35RemoteTextureViewProxy::RemoteTextureViewProxy(ConvertToBackingContext& convertToBackingContext)
     36    : m_convertToBackingContext(convertToBackingContext)
     37{
     38}
    4339
    44     std::variant<LoadOp, StencilValue> stencilLoadValue;
    45     StoreOp stencilStoreOp;
    46     bool stencilReadOnly;
    47 };
     40RemoteTextureViewProxy::~RemoteTextureViewProxy()
     41{
     42}
    4843
    49 } // namespace PAL::WebGPU
     44void RemoteTextureViewProxy::setLabelInternal(const String& label)
     45{
     46    UNUSED_PARAM(label);
     47}
     48
     49} // namespace WebKit::WebGPU
     50
     51#endif // ENABLE(GPU_PROCESS)
  • trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteTextureViewProxy.h

    r285879 r285881  
    2626#pragma once
    2727
    28 #if HAVE(WEBGPU_IMPLEMENTATION)
     28#if ENABLE(GPU_PROCESS)
    2929
    30 #include "WebGPUShaderModule.h"
    31 #include <WebGPU/WebGPU.h>
     30#include "WebGPUIdentifier.h"
     31#include <pal/graphics/WebGPU/WebGPUTextureView.h>
    3232
    33 namespace PAL::WebGPU {
     33namespace WebKit::WebGPU {
    3434
    3535class ConvertToBackingContext;
    3636
    37 class ShaderModuleImpl final : public ShaderModule {
     37class RemoteTextureViewProxy final : public PAL::WebGPU::TextureView {
    3838public:
    39     static Ref<ShaderModuleImpl> create(WGPUShaderModule shaderModule, ConvertToBackingContext& convertToBackingContext)
     39    static Ref<RemoteTextureViewProxy> create(ConvertToBackingContext& convertToBackingContext)
    4040    {
    41         return adoptRef(*new ShaderModuleImpl(shaderModule, convertToBackingContext));
     41        return adoptRef(*new RemoteTextureViewProxy(convertToBackingContext));
    4242    }
    4343
    44     virtual ~ShaderModuleImpl();
     44    virtual ~RemoteTextureViewProxy();
    4545
    4646private:
    4747    friend class DowncastConvertToBackingContext;
    4848
    49     ShaderModuleImpl(WGPUShaderModule, ConvertToBackingContext&);
     49    RemoteTextureViewProxy(ConvertToBackingContext&);
    5050
    51     ShaderModuleImpl(const ShaderModuleImpl&) = delete;
    52     ShaderModuleImpl(ShaderModuleImpl&&) = delete;
    53     ShaderModuleImpl& operator=(const ShaderModuleImpl&) = delete;
    54     ShaderModuleImpl& operator=(ShaderModuleImpl&&) = delete;
     51    RemoteTextureViewProxy(const RemoteTextureViewProxy&) = delete;
     52    RemoteTextureViewProxy(RemoteTextureViewProxy&&) = delete;
     53    RemoteTextureViewProxy& operator=(const RemoteTextureViewProxy&) = delete;
     54    RemoteTextureViewProxy& operator=(RemoteTextureViewProxy&&) = delete;
    5555
    56     WGPUShaderModule backing() const { return m_backing; }
    57 
    58     void compilationInfo(std::function<void(Ref<CompilationInfo>&&)>&&) final;
     56    WebGPUIdentifier backing() const { return m_backing; }
    5957
    6058    void setLabelInternal(const String&) final;
    6159
    62     WGPUShaderModule m_backing { nullptr };
     60    WebGPUIdentifier m_backing { WebGPUIdentifier::generate() };
    6361    Ref<ConvertToBackingContext> m_convertToBackingContext;
    6462};
    6563
    66 } // namespace PAL::WebGPU
     64} // namespace WebKit::WebGPU
    6765
    68 #endif // HAVE(WEBGPU_IMPLEMENTATION)
     66#endif // ENABLE(GPU_PROCESS)
  • trunk/Source/WebKit/WebProcess/GPU/graphics/cocoa/ImageBufferShareableIOSurfaceBackend.cpp

    r284991 r285881  
    3131#include <WebCore/GraphicsContextCG.h>
    3232#include <WebCore/ImageBufferIOSurfaceBackend.h>
     33#include <WebCore/PixelBuffer.h>
    3334#include <wtf/IsoMallocInlines.h>
    3435#include <wtf/StdLibExtras.h>
Note: See TracChangeset for help on using the changeset viewer.