Changeset 285881 in webkit
- Timestamp:
- Nov 16, 2021, 1:19:35 PM (5 years ago)
- Location:
- trunk/Source
- Files:
-
- 17 added
- 37 edited
- 91 copied
-
WebCore/PAL/ChangeLog (modified) (1 diff)
-
WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.cpp (modified) (1 diff)
-
WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.h (modified) (1 diff)
-
WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUBufferImpl.cpp (modified) (1 diff)
-
WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUBufferImpl.h (modified) (2 diffs)
-
WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUDeviceImpl.cpp (modified) (3 diffs)
-
WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUDeviceImpl.h (modified) (2 diffs)
-
WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUImpl.cpp (modified) (1 diff)
-
WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUImpl.h (modified) (1 diff)
-
WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUQueueImpl.cpp (modified) (1 diff)
-
WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUQueueImpl.h (modified) (2 diffs)
-
WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUShaderModuleImpl.cpp (modified) (1 diff)
-
WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUShaderModuleImpl.h (modified) (1 diff)
-
WebCore/PAL/pal/graphics/WebGPU/WebGPU.h (modified) (2 diffs)
-
WebCore/PAL/pal/graphics/WebGPU/WebGPUAdapter.h (modified) (2 diffs)
-
WebCore/PAL/pal/graphics/WebGPU/WebGPUBindGroupDescriptor.h (modified) (1 diff)
-
WebCore/PAL/pal/graphics/WebGPU/WebGPUBindGroupEntry.h (modified) (1 diff)
-
WebCore/PAL/pal/graphics/WebGPU/WebGPUBuffer.h (modified) (2 diffs)
-
WebCore/PAL/pal/graphics/WebGPU/WebGPUBufferBinding.h (modified) (2 diffs)
-
WebCore/PAL/pal/graphics/WebGPU/WebGPUComputePassTimestampWrites.h (modified) (1 diff)
-
WebCore/PAL/pal/graphics/WebGPU/WebGPUDevice.h (modified) (3 diffs)
-
WebCore/PAL/pal/graphics/WebGPU/WebGPUDeviceDescriptor.h (modified) (1 diff)
-
WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h (modified) (1 diff)
-
WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyTexture.h (modified) (2 diffs)
-
WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h (modified) (1 diff)
-
WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineLayoutDescriptor.h (modified) (1 diff)
-
WebCore/PAL/pal/graphics/WebGPU/WebGPUProgrammableStage.h (modified) (2 diffs)
-
WebCore/PAL/pal/graphics/WebGPU/WebGPUQueue.h (modified) (2 diffs)
-
WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassColorAttachment.h (modified) (2 diffs)
-
WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h (modified) (1 diff)
-
WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassEncoder.h (modified) (1 diff)
-
WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassTimestampWrites.h (modified) (2 diffs)
-
WebCore/PAL/pal/graphics/WebGPU/WebGPUShaderModule.h (modified) (2 diffs)
-
WebKit/ChangeLog (modified) (1 diff)
-
WebKit/Shared/WebGPU (added)
-
WebKit/Shared/WebGPU/WebGPUBindGroupDescriptor.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBindGroupDescriptor.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUBindGroupEntry.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBindGroupEntry.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUBindGroupLayoutDescriptor.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUBindGroupLayoutEntry.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPU.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUBlendComponent.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUBlendState.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUBufferBinding.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBufferBinding.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUBufferBindingLayout.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUBufferDescriptor.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUCanvasConfiguration.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBufferBinding.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUColor.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUColorTargetState.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyTexture.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUCommandBufferDescriptor.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUCommandEncoderDescriptor.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUComputePassDescriptor.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUComputePassTimestampWrites.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUComputePassTimestampWrites.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUComputePipelineDescriptor.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUConvertFromBackingContext.h (added)
-
WebKit/Shared/WebGPU/WebGPUConvertToBackingContext.h (added)
-
WebKit/Shared/WebGPU/WebGPUDepthStencilState.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPU.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUDeviceDescriptor.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUDeviceDescriptor.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUExtent3D.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassColorAttachment.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUExternalTextureBindingLayout.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUExternalTextureDescriptor.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUFragmentState.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUIdentifier.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h ) (2 diffs)
-
WebKit/Shared/WebGPU/WebGPUImageCopyBuffer.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUImageCopyExternalImage.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBufferBinding.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUImageCopyTexture.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyTexture.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUImageCopyTextureTagged.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUImageDataLayout.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBufferBinding.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUMultisampleState.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUObjectDescriptorBase.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUOrigin2D.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineLayoutDescriptor.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUOrigin3D.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassColorAttachment.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUPipelineDescriptorBase.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUPipelineLayoutDescriptor.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineLayoutDescriptor.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUPrimitiveState.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPU.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUProgrammableStage.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUProgrammableStage.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUQuerySetDescriptor.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUDeviceDescriptor.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPURenderBundleDescriptor.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPURenderBundleEncoderDescriptor.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPURenderPassColorAttachment.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassColorAttachment.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPURenderPassDepthStencilAttachment.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPURenderPassDescriptor.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineLayoutDescriptor.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPURenderPassLayout.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUDeviceDescriptor.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPURenderPassTimestampWrites.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassTimestampWrites.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPURenderPipelineDescriptor.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyTexture.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPURequestAdapterOptions.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBufferBinding.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUSamplerBindingLayout.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUSamplerDescriptor.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUDeviceDescriptor.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUShaderModuleDescriptor.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUStencilFaceState.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyTexture.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUStorageTextureBindingLayout.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUDeviceDescriptor.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUTextureBindingLayout.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUTextureDescriptor.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUDeviceDescriptor.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUTextureViewDescriptor.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUDeviceDescriptor.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUVertexAttribute.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUVertexBufferLayout.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineLayoutDescriptor.h ) (1 diff)
-
WebKit/Shared/WebGPU/WebGPUVertexState.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBufferBinding.h ) (1 diff)
-
WebKit/Sources.txt (modified) (1 diff)
-
WebKit/WebKit.xcodeproj/project.pbxproj (modified) (6 diffs)
-
WebKit/WebProcess/GPU/graphics/WebGPU (added)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteAdapterProxy.cpp (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUShaderModuleImpl.cpp ) (1 diff)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteAdapterProxy.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUBufferImpl.h ) (1 diff)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteBindGroupLayoutProxy.cpp (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h ) (1 diff)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteBindGroupLayoutProxy.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUShaderModuleImpl.h ) (1 diff)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteBindGroupProxy.cpp (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h ) (1 diff)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteBindGroupProxy.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUShaderModuleImpl.h ) (1 diff)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteBufferProxy.cpp (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUShaderModuleImpl.cpp ) (1 diff)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteBufferProxy.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUBufferImpl.h ) (2 diffs)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteCommandBufferProxy.cpp (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h ) (1 diff)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteCommandBufferProxy.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUShaderModuleImpl.h ) (1 diff)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteCommandEncoderProxy.cpp (added)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteCommandEncoderProxy.h (added)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteComputePassEncoderProxy.cpp (added)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteComputePassEncoderProxy.h (added)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteComputePipelineProxy.cpp (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUShaderModuleImpl.cpp ) (1 diff)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteComputePipelineProxy.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUShaderModuleImpl.h ) (1 diff)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteDeviceProxy.cpp (added)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteDeviceProxy.h (added)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteExternalTextureProxy.cpp (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h ) (1 diff)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteExternalTextureProxy.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUShaderModuleImpl.h ) (1 diff)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteGPUProxy.cpp (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPU.h ) (1 diff)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteGPUProxy.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUShaderModuleImpl.h ) (1 diff)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemotePipelineLayoutProxy.cpp (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h ) (1 diff)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemotePipelineLayoutProxy.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUShaderModuleImpl.h ) (1 diff)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteQuerySetProxy.cpp (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h ) (1 diff)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteQuerySetProxy.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUShaderModuleImpl.h ) (1 diff)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteQueueProxy.cpp (added)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteQueueProxy.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUQueueImpl.h ) (1 diff)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteRenderBundleEncoderProxy.cpp (added)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteRenderBundleEncoderProxy.h (added)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteRenderBundleProxy.cpp (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h ) (1 diff)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteRenderBundleProxy.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUShaderModuleImpl.h ) (1 diff)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteRenderPassEncoderProxy.cpp (added)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteRenderPassEncoderProxy.h (added)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteRenderPipelineProxy.cpp (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUShaderModuleImpl.cpp ) (1 diff)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteRenderPipelineProxy.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUShaderModuleImpl.h ) (1 diff)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteSamplerProxy.cpp (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUProgrammableStage.h ) (1 diff)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteSamplerProxy.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUShaderModuleImpl.h ) (1 diff)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteShaderModuleProxy.cpp (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUShaderModuleImpl.cpp ) (1 diff)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteShaderModuleProxy.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUShaderModuleImpl.h ) (1 diff)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteTextureProxy.cpp (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUShaderModuleImpl.cpp ) (1 diff)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteTextureProxy.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUBufferImpl.h ) (2 diffs)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteTextureViewProxy.cpp (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h ) (1 diff)
-
WebKit/WebProcess/GPU/graphics/WebGPU/RemoteTextureViewProxy.h (copied) (copied from trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUShaderModuleImpl.h ) (1 diff)
-
WebKit/WebProcess/GPU/graphics/WebGPU/WebGPUDowncastConvertToBackingContext.cpp (added)
-
WebKit/WebProcess/GPU/graphics/WebGPU/WebGPUDowncastConvertToBackingContext.h (added)
-
WebKit/WebProcess/GPU/graphics/cocoa/ImageBufferShareableIOSurfaceBackend.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/PAL/ChangeLog
r285879 r285881 1 2021-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 1 23 2021-11-16 Myles C. Maxfield <mmaxfield@apple.com> 2 24 -
trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.cpp
r285879 r285881 146 146 } 147 147 148 void AdapterImpl::requestDevice(const DeviceDescriptor& descriptor, std::function<void(Ref<Device>)>&& callback)148 void AdapterImpl::requestDevice(const DeviceDescriptor& descriptor, WTF::Function<void(Ref<Device>)>&& callback) 149 149 { 150 150 Ref protectedThis(*this); -
trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.h
r285879 r285881 59 59 60 60 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; 62 64 63 65 WGPUAdapter m_backing { nullptr }; 64 65 Deque<std::function<void(Ref<Device>)>> m_callbacks;66 66 Ref<ConvertToBackingContext> m_convertToBackingContext; 67 67 }; -
trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUBufferImpl.cpp
r285879 r285881 51 51 } 52 52 53 void BufferImpl::mapAsync(MapModeFlags mapModeFlags, std::optional<Size64> offset, std::optional<Size64> size, std::function<void()>&& callback)53 void BufferImpl::mapAsync(MapModeFlags mapModeFlags, std::optional<Size64> offset, std::optional<Size64> size, WTF::Function<void()>&& callback) 54 54 { 55 55 Ref protectedThis(*this); -
trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUBufferImpl.h
r285879 r285881 59 59 60 60 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; 62 62 MappedRange getMappedRange(std::optional<Size64> offset, std::optional<Size64>) final; 63 63 void unmap() final; … … 67 67 void setLabelInternal(const String&) final; 68 68 69 Deque< std::function<void()>> m_callbacks;69 Deque<WTF::Function<void()>> m_callbacks; 70 70 71 71 WGPUBuffer m_backing { nullptr }; -
trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUDeviceImpl.cpp
r285879 r285881 483 483 } 484 484 485 void DeviceImpl::createComputePipelineAsync(const ComputePipelineDescriptor& descriptor, std::function<void(Ref<ComputePipeline>&&)>&& callback)485 void DeviceImpl::createComputePipelineAsync(const ComputePipelineDescriptor& descriptor, WTF::Function<void(Ref<ComputePipeline>&&)>&& callback) 486 486 { 487 487 Ref protectedThis(*this); … … 507 507 } 508 508 509 void DeviceImpl::createRenderPipelineAsync(const RenderPipelineDescriptor& descriptor, std::function<void(Ref<RenderPipeline>&&)>&& callback)509 void DeviceImpl::createRenderPipelineAsync(const RenderPipelineDescriptor& descriptor, WTF::Function<void(Ref<RenderPipeline>&&)>&& callback) 510 510 { 511 511 Ref protectedThis(*this); … … 590 590 } 591 591 592 void DeviceImpl::popErrorScope( std::function<void(std::optional<Error>&&)>&& callback)592 void DeviceImpl::popErrorScope(WTF::Function<void(std::optional<Error>&&)>&& callback) 593 593 { 594 594 Ref protectedThis(*this); -
trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUDeviceImpl.h
r285879 r285881 75 75 Ref<RenderPipeline> createRenderPipeline(const RenderPipelineDescriptor&) final; 76 76 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; 78 78 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; 80 80 81 81 Ref<CommandEncoder> createCommandEncoder(const std::optional<CommandEncoderDescriptor>&) final; … … 86 86 void pushErrorScope(ErrorFilter) final; 87 87 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; 89 89 90 90 void setLabelInternal(const String&) final; 91 91 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; 95 95 96 96 WGPUDevice m_backing { nullptr }; -
trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUImpl.cpp
r285879 r285881 52 52 } 53 53 54 void GPUImpl::requestAdapter(const RequestAdapterOptions& options, std::function<void(RefPtr<Adapter>&&)>&& callback)54 void GPUImpl::requestAdapter(const RequestAdapterOptions& options, WTF::Function<void(RefPtr<Adapter>&&)>&& callback) 55 55 { 56 56 Ref protectedThis(*this); -
trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUImpl.h
r285879 r285881 59 59 60 60 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; 62 62 63 Deque< std::function<void(RefPtr<Adapter>&&)>> m_callbacks;63 Deque<WTF::Function<void(RefPtr<Adapter>&&)>> m_callbacks; 64 64 65 65 WGPUInstance m_backing { nullptr }; -
trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUQueueImpl.cpp
r285879 r285881 64 64 } 65 65 66 void QueueImpl::onSubmittedWorkDone( std::function<void()>&& callback)66 void QueueImpl::onSubmittedWorkDone(WTF::Function<void()>&& callback) 67 67 { 68 68 Ref protectedThis(*this); -
trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUQueueImpl.h
r285879 r285881 61 61 62 62 void onSubmittedWorkDoneCallback(WGPUQueueWorkDoneStatus); 63 void onSubmittedWorkDone( std::function<void()>&&) final;63 void onSubmittedWorkDone(WTF::Function<void()>&&) final; 64 64 65 65 void writeBuffer( … … 87 87 uint64_t m_signalValue { 1 }; 88 88 89 Deque< std::function<void()>> m_callbacks;89 Deque<WTF::Function<void()>> m_callbacks; 90 90 91 91 WGPUQueue m_backing { nullptr }; -
trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUShaderModuleImpl.cpp
r285879 r285881 45 45 } 46 46 47 void ShaderModuleImpl::compilationInfo( std::function<void(Ref<CompilationInfo>&&)>&&)47 void ShaderModuleImpl::compilationInfo(WTF::Function<void(Ref<CompilationInfo>&&)>&&) 48 48 { 49 49 } -
trunk/Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUShaderModuleImpl.h
r285879 r285881 56 56 WGPUShaderModule backing() const { return m_backing; } 57 57 58 void compilationInfo( std::function<void(Ref<CompilationInfo>&&)>&&) final;58 void compilationInfo(WTF::Function<void(Ref<CompilationInfo>&&)>&&) final; 59 59 60 60 void setLabelInternal(const String&) final; -
trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPU.h
r285879 r285881 28 28 #include "WebGPURequestAdapterOptions.h" 29 29 #include <optional> 30 #include < utility>30 #include <wtf/Function.h> 31 31 #include <wtf/RefCounted.h> 32 32 #include <wtf/RefPtr.h> … … 40 40 virtual ~GPU() = default; 41 41 42 virtual void requestAdapter(const RequestAdapterOptions&, std::function<void(RefPtr<Adapter>&&)>&&) = 0;42 virtual void requestAdapter(const RequestAdapterOptions&, WTF::Function<void(RefPtr<Adapter>&&)>&&) = 0; 43 43 44 44 protected: -
trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUAdapter.h
r285879 r285881 30 30 #include "WebGPUSupportedLimits.h" 31 31 #include <optional> 32 #include < utility>32 #include <wtf/Function.h> 33 33 #include <wtf/Ref.h> 34 34 #include <wtf/RefCounted.h> … … 48 48 bool isFallbackAdapter() const { return m_isFallbackAdapter; } 49 49 50 virtual void requestDevice(const DeviceDescriptor&, std::function<void(Ref<Device>)>&&) = 0;50 virtual void requestDevice(const DeviceDescriptor&, WTF::Function<void(Ref<Device>)>&&) = 0; 51 51 52 52 protected: -
trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBindGroupDescriptor.h
r285879 r285881 27 27 28 28 #include "WebGPUBindGroupEntry.h" 29 #include "WebGPUBindGroupLayout.h"30 29 #include "WebGPUObjectDescriptorBase.h" 31 30 #include <wtf/Vector.h> 32 31 33 32 namespace PAL::WebGPU { 33 34 class BindGroupLayout; 34 35 35 36 struct BindGroupDescriptor : public ObjectDescriptorBase { -
trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBindGroupEntry.h
r285879 r285881 31 31 #include "WebGPUSampler.h" 32 32 #include "WebGPUTextureView.h" 33 #include < utility>33 #include <functional> 34 34 #include <variant> 35 35 -
trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBuffer.h
r285879 r285881 30 30 #include <cstdint> 31 31 #include <optional> 32 #include < utility>32 #include <wtf/Function.h> 33 33 #include <wtf/Ref.h> 34 34 #include <wtf/RefCounted.h> … … 49 49 } 50 50 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; 52 52 struct MappedRange { 53 53 const void* source; -
trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUBufferBinding.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPUBuffer.h"29 28 #include "WebGPUIntegralTypes.h" 30 29 #include <optional> … … 32 31 33 32 namespace PAL::WebGPU { 33 34 class Buffer; 34 35 35 36 struct BufferBinding { -
trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUComputePassTimestampWrites.h
r285879 r285881 28 28 #include "WebGPUComputePassTimestampLocation.h" 29 29 #include "WebGPUIntegralTypes.h" 30 #include "WebGPUQuerySet.h"31 30 #include <wtf/Ref.h> 32 31 #include <wtf/Vector.h> 33 32 34 33 namespace PAL::WebGPU { 34 35 class QuerySet; 35 36 36 37 struct ComputePassTimestampWrite { -
trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUDevice.h
r285879 r285881 34 34 #include "WebGPUSupportedLimits.h" 35 35 #include <optional> 36 #include < utility>36 #include <wtf/Function.h> 37 37 #include <wtf/HashSet.h> 38 38 #include <wtf/Ref.h> … … 101 101 virtual Ref<ComputePipeline> createComputePipeline(const ComputePipelineDescriptor&) = 0; 102 102 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; 105 105 106 106 virtual Ref<CommandEncoder> createCommandEncoder(const std::optional<CommandEncoderDescriptor>&) = 0; … … 110 110 111 111 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; 113 113 114 114 class DeviceLostClient { -
trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUDeviceDescriptor.h
r285879 r285881 37 37 struct DeviceDescriptor : public ObjectDescriptorBase { 38 38 Vector<FeatureName> requiredFeatures; 39 // Vector<KeyValuePair<String, uint64_t>> requiredLimits;39 // FIXME: Add support for requiredLimits. 40 40 }; 41 41 -
trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyBuffer.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPUBuffer.h"29 28 #include "WebGPUImageDataLayout.h" 30 29 #include <wtf/Ref.h> 31 30 32 31 namespace PAL::WebGPU { 32 33 class Buffer; 33 34 34 35 struct ImageCopyBuffer : public ImageDataLayout { -
trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUImageCopyTexture.h
r285879 r285881 28 28 #include "WebGPUIntegralTypes.h" 29 29 #include "WebGPUOrigin3D.h" 30 #include "WebGPUTexture.h"31 30 #include "WebGPUTextureAspect.h" 32 31 #include <optional> … … 34 33 35 34 namespace PAL::WebGPU { 35 36 class Texture; 36 37 37 38 struct ImageCopyTexture { -
trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h
r285879 r285881 27 27 28 28 #include "WebGPUObjectDescriptorBase.h" 29 #include "WebGPUPipelineLayout.h"30 29 31 30 namespace PAL::WebGPU { 31 32 class PipelineLayout; 32 33 33 34 struct PipelineDescriptorBase : public ObjectDescriptorBase { -
trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPipelineLayoutDescriptor.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPUBindGroupLayout.h"29 28 #include "WebGPUObjectDescriptorBase.h" 30 #include < utility>29 #include <functional> 31 30 #include <wtf/Vector.h> 32 31 33 32 namespace PAL::WebGPU { 33 34 class BindGroupLayout; 34 35 35 36 struct PipelineLayoutDescriptor : public ObjectDescriptorBase { -
trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUProgrammableStage.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPUShaderModule.h"29 28 #include <wtf/KeyValuePair.h> 30 29 #include <wtf/Ref.h> … … 32 31 33 32 namespace PAL::WebGPU { 33 34 class ShaderModule; 34 35 35 36 using PipelineConstantValue = double; // May represent WGSL’s bool, f32, i32, u32. -
trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUQueue.h
r285879 r285881 33 33 #include "WebGPUImageDataLayout.h" 34 34 #include "WebGPUIntegralTypes.h" 35 #include <functional> 35 36 #include <optional> 36 #include < utility>37 #include <wtf/Function.h> 37 38 #include <wtf/Ref.h> 38 39 #include <wtf/RefCounted.h> … … 58 59 virtual void submit(Vector<std::reference_wrapper<CommandBuffer>>&&) = 0; 59 60 60 virtual void onSubmittedWorkDone( std::function<void()>&&) = 0;61 virtual void onSubmittedWorkDone(WTF::Function<void()>&&) = 0; 61 62 62 63 virtual void writeBuffer( -
trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassColorAttachment.h
r285879 r285881 29 29 #include "WebGPULoadOp.h" 30 30 #include "WebGPUStoreOp.h" 31 #include "WebGPUTextureView.h"32 31 #include <variant> 33 32 #include <wtf/Ref.h> … … 35 34 36 35 namespace PAL::WebGPU { 36 37 class TextureView; 37 38 38 39 struct RenderPassColorAttachment { -
trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h
r285879 r285881 29 29 #include "WebGPULoadOp.h" 30 30 #include "WebGPUStoreOp.h" 31 #include "WebGPUTextureView.h"32 31 #include <variant> 33 32 #include <wtf/Ref.h> 34 33 35 34 namespace PAL::WebGPU { 35 36 class TextureView; 36 37 37 38 struct RenderPassDepthStencilAttachment { -
trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassEncoder.h
r285879 r285881 29 29 #include "WebGPUIndexFormat.h" 30 30 #include "WebGPUIntegralTypes.h" 31 #include <functional> 31 32 #include <optional> 32 #include <utility>33 33 #include <wtf/Ref.h> 34 34 #include <wtf/RefCounted.h> -
trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPURenderPassTimestampWrites.h
r285879 r285881 27 27 28 28 #include "WebGPUIntegralTypes.h" 29 #include "WebGPUQuerySet.h"30 29 #include "WebGPURenderPassTimestampLocation.h" 31 30 #include <wtf/Ref.h> … … 33 32 34 33 namespace PAL::WebGPU { 34 35 class QuerySet; 35 36 36 37 struct RenderPassTimestampWrite { -
trunk/Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUShaderModule.h
r285879 r285881 27 27 28 28 #include "WebGPUBindGroupLayout.h" 29 #include < utility>29 #include <wtf/Function.h> 30 30 #include <wtf/Ref.h> 31 31 #include <wtf/RefCounted.h> … … 48 48 } 49 49 50 virtual void compilationInfo( std::function<void(Ref<CompilationInfo>&&)>&&) = 0;50 virtual void compilationInfo(WTF::Function<void(Ref<CompilationInfo>&&)>&&) = 0; 51 51 52 52 protected: -
trunk/Source/WebKit/ChangeLog
r285878 r285881 1 2021-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 1 314 2021-11-16 Per Arne Vollan <pvollan@apple.com> 2 315 -
trunk/Source/WebKit/Shared/WebGPU/WebGPUBindGroupDescriptor.h
r285879 r285881 27 27 28 28 #include "WebGPUBindGroupEntry.h" 29 #include "WebGPU BindGroupLayout.h"29 #include "WebGPUIdentifier.h" 30 30 #include "WebGPUObjectDescriptorBase.h" 31 31 #include <wtf/Vector.h> 32 32 33 namespace PAL::WebGPU {33 namespace WebKit::WebGPU { 34 34 35 35 struct BindGroupDescriptor : public ObjectDescriptorBase { 36 BindGroupLayout& layout;36 WebGPUIdentifier bindGroupLayout; 37 37 Vector<BindGroupEntry> entries; 38 38 }; 39 39 40 } // namespace PAL::WebGPU40 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUBindGroupEntry.h
r285879 r285881 27 27 28 28 #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> 35 32 36 namespace PAL::WebGPU {33 namespace WebKit::WebGPU { 37 34 38 using BindingResource = std::variant<std::reference_wrapper<Sampler>, std::reference_wrapper<TextureView>, BufferBinding, std::reference_wrapper<ExternalTexture>>; 35 enum class BindingResourceType : uint8_t { 36 Sampler, 37 TextureView, 38 BufferBinding, 39 ExternalTexture, 40 }; 39 41 40 42 struct BindGroupEntry { 41 Index32 binding; 42 BindingResource resource; 43 PAL::WebGPU::Index32 binding; 44 BufferBinding bufferBinding; 45 WebGPUIdentifier identifier; 46 BindingResourceType type; 43 47 }; 44 48 45 } // namespace PAL::WebGPU49 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUBindGroupLayoutDescriptor.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPUBindGroupLayoutEntry.h" 28 29 #include "WebGPUObjectDescriptorBase.h" 29 #include "WebGPUPipelineLayout.h"30 #include <wtf/Vector.h> 30 31 31 namespace PAL::WebGPU {32 namespace WebKit::WebGPU { 32 33 33 struct PipelineDescriptorBase: public ObjectDescriptorBase {34 PipelineLayout* layout;34 struct BindGroupLayoutDescriptor : public ObjectDescriptorBase { 35 Vector<BindGroupLayoutEntry> entries; 35 36 }; 36 37 37 } // namespace PAL::WebGPU38 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUBindGroupLayoutEntry.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPURequestAdapterOptions.h" 28 #include "WebGPUBufferBindingLayout.h" 29 #include "WebGPUExternalTextureBindingLayout.h" 30 #include "WebGPUSamplerBindingLayout.h" 31 #include "WebGPUStorageTextureBindingLayout.h" 32 #include "WebGPUTextureBindingLayout.h" 29 33 #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> 33 36 34 namespace PAL::WebGPU {37 namespace WebKit::WebGPU { 35 38 36 class Adapter; 39 struct BindGroupLayoutEntry { 40 PAL::WebGPU::Index32 binding; 41 PAL::WebGPU::ShaderStageFlags visibility; 37 42 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; 52 48 }; 53 49 54 } // namespace PAL::WebGPU50 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUBlendComponent.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPUObjectDescriptorBase.h"29 #include "WebGPUPipelineLayout.h"28 #include <pal/graphics/WebGPU/WebGPUBlendFactor.h> 29 #include <pal/graphics/WebGPU/WebGPUBlendOperation.h> 30 30 31 namespace PAL::WebGPU {31 namespace WebKit::WebGPU { 32 32 33 struct PipelineDescriptorBase : public ObjectDescriptorBase { 34 PipelineLayout* layout; 33 struct BlendComponent { 34 PAL::WebGPU::BlendOperation operation; 35 PAL::WebGPU::BlendFactor srcFactor; 36 PAL::WebGPU::BlendFactor dstFactor; 35 37 }; 36 38 37 } // namespace PAL::WebGPU39 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUBlendState.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPUBuffer.h" 29 #include "WebGPUImageDataLayout.h" 30 #include <wtf/Ref.h> 28 #include "WebGPUBlendComponent.h" 31 29 32 namespace PAL::WebGPU {30 namespace WebKit::WebGPU { 33 31 34 struct ImageCopyBuffer : public ImageDataLayout { 35 Buffer& buffer; 32 struct BlendState { 33 BlendComponent color; 34 BlendComponent alpha; 36 35 }; 37 36 38 } // namespace PAL::WebGPU37 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUBufferBinding.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPUBuffer.h" 29 #include "WebGPUIntegralTypes.h" 28 #include "WebGPUIdentifier.h" 30 29 #include <optional> 30 #include <pal/graphics/WebGPU/WebGPUIntegralTypes.h> 31 31 #include <wtf/Ref.h> 32 32 33 namespace PAL::WebGPU {33 namespace WebKit::WebGPU { 34 34 35 35 struct 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; 39 39 }; 40 40 41 } // namespace PAL::WebGPU41 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUBufferBindingLayout.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPUObjectDescriptorBase.h"29 #include "WebGPUPipelineLayout.h"28 #include <pal/graphics/WebGPU/WebGPUBufferBindingType.h> 29 #include <pal/graphics/WebGPU/WebGPUIntegralTypes.h> 30 30 31 namespace PAL::WebGPU {31 namespace WebKit::WebGPU { 32 32 33 struct PipelineDescriptorBase : public ObjectDescriptorBase { 34 PipelineLayout* layout; 33 struct BufferBindingLayout { 34 PAL::WebGPU::BufferBindingType type; 35 bool hasDynamicOffset; 36 PAL::WebGPU::Size64 minBindingSize; 35 37 }; 36 38 37 } // namespace PAL::WebGPU39 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUBufferDescriptor.h
r285879 r285881 27 27 28 28 #include "WebGPUObjectDescriptorBase.h" 29 #include "WebGPUPipelineLayout.h" 29 #include <pal/graphics/WebGPU/WebGPUBufferUsage.h> 30 #include <pal/graphics/WebGPU/WebGPUIntegralTypes.h> 30 31 31 namespace PAL::WebGPU {32 namespace WebKit::WebGPU { 32 33 33 struct PipelineDescriptorBase : public ObjectDescriptorBase { 34 PipelineLayout* layout; 34 struct BufferDescriptor : public ObjectDescriptorBase { 35 PAL::WebGPU::Size64 size; 36 PAL::WebGPU::BufferUsageFlags usage; 37 bool mappedAtCreation; 35 38 }; 36 39 37 } // namespace PAL::WebGPU40 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUCanvasConfiguration.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPUBuffer.h" 29 #include "WebGPUIntegralTypes.h" 28 #include "WebGPUExtent3D.h" 29 #include "WebGPUIdentifier.h" 30 #include <cstdint> 30 31 #include <optional> 32 #include <pal/graphics/WebGPU/WebGPUCanvasCompositingAlphaMode.h> 33 #include <pal/graphics/WebGPU/WebGPUPredefinedColorSpace.h> 34 #include <pal/graphics/WebGPU/WebGPUTextureFormat.h> 31 35 #include <wtf/Ref.h> 32 36 33 namespace PAL::WebGPU {37 namespace WebKit::WebGPU { 34 38 35 struct BufferBinding { 36 Buffer& buffer; 37 Size64 offset; 38 std::optional<Size64> size; 39 class Device; 40 41 using TextureUsageFlags = uint32_t; // FIXME: This doesn't need to be here. 42 43 struct 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; 39 50 }; 40 51 41 } // namespace PAL::WebGPU52 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUColor.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPUObjectDescriptorBase.h" 29 #include "WebGPUPipelineLayout.h" 28 #include <variant> 29 #include <wtf/Vector.h> 30 #include <wtf/text/WTFString.h> 30 31 31 namespace PAL::WebGPU {32 namespace WebKit::WebGPU { 32 33 33 struct PipelineDescriptorBase : public ObjectDescriptorBase { 34 PipelineLayout* layout; 34 struct ColorDict { 35 double r; 36 double g; 37 double b; 38 double a; 35 39 }; 36 40 37 } // namespace PAL::WebGPU 41 using Color = std::variant<Vector<double>, ColorDict>; 42 43 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUColorTargetState.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPUIntegralTypes.h" 29 #include "WebGPUOrigin3D.h" 30 #include "WebGPUTexture.h" 31 #include "WebGPUTextureAspect.h" 28 #include "WebGPUBlendState.h" 32 29 #include <optional> 33 #include <wtf/Ref.h> 30 #include <pal/graphics/WebGPU/WebGPUColorWrite.h> 31 #include <pal/graphics/WebGPU/WebGPUTextureFormat.h> 34 32 35 namespace PAL::WebGPU {33 namespace WebKit::WebGPU { 36 34 37 struct ImageCopyTexture {38 Texture& texture;39 IntegerCoordinate mipLevel; 40 std::optional< Origin3D> origin;41 TextureAspect aspect;35 struct ColorTargetState { 36 PAL::WebGPU::TextureFormat format; 37 38 std::optional<BlendState> blend; 39 PAL::WebGPU::ColorWriteFlags writeMask; 42 40 }; 43 41 44 } // namespace PAL::WebGPU42 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUCommandBufferDescriptor.h
r285879 r285881 27 27 28 28 #include "WebGPUObjectDescriptorBase.h" 29 #include "WebGPUPipelineLayout.h"30 29 31 namespace PAL::WebGPU {30 namespace WebKit::WebGPU { 32 31 33 struct PipelineDescriptorBase : public ObjectDescriptorBase { 34 PipelineLayout* layout; 32 struct CommandBufferDescriptor : public ObjectDescriptorBase { 35 33 }; 36 34 37 } // namespace PAL::WebGPU35 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUCommandEncoderDescriptor.h
r285879 r285881 27 27 28 28 #include "WebGPUObjectDescriptorBase.h" 29 #include "WebGPUPipelineLayout.h"30 29 31 namespace PAL::WebGPU {30 namespace WebKit::WebGPU { 32 31 33 struct PipelineDescriptorBase : public ObjectDescriptorBase { 34 PipelineLayout* layout; 32 struct CommandEncoderDescriptor : public ObjectDescriptorBase { 35 33 }; 36 34 37 } // namespace PAL::WebGPU35 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUComputePassDescriptor.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPUComputePassTimestampWrites.h" 28 29 #include "WebGPUObjectDescriptorBase.h" 29 #include "WebGPUPipelineLayout.h"30 30 31 namespace PAL::WebGPU {31 namespace WebKit::WebGPU { 32 32 33 struct PipelineDescriptorBase: public ObjectDescriptorBase {34 PipelineLayout* layout;33 struct ComputePassDescriptor : public ObjectDescriptorBase { 34 ComputePassTimestampWrites timestampWrites; 35 35 }; 36 36 37 } // namespace PAL::WebGPU37 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUComputePassTimestampWrites.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPU ComputePassTimestampLocation.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> 31 31 #include <wtf/Ref.h> 32 32 #include <wtf/Vector.h> 33 33 34 namespace PAL::WebGPU {34 namespace WebKit::WebGPU { 35 35 36 36 struct ComputePassTimestampWrite { 37 QuerySet&querySet;38 Size32 queryIndex;39 ComputePassTimestampLocation location;37 WebGPUIdentifier querySet; 38 PAL::WebGPU::Size32 queryIndex; 39 PAL::WebGPU::ComputePassTimestampLocation location; 40 40 }; 41 41 42 42 using ComputePassTimestampWrites = Vector<ComputePassTimestampWrite>; 43 43 44 } // namespace PAL::WebGPU44 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUComputePipelineDescriptor.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPU ObjectDescriptorBase.h"29 #include "WebGPUP ipelineLayout.h"28 #include "WebGPUPipelineDescriptorBase.h" 29 #include "WebGPUProgrammableStage.h" 30 30 31 namespace PAL::WebGPU {31 namespace WebKit::WebGPU { 32 32 33 struct PipelineDescriptorBase : public ObjectDescriptorBase {34 P ipelineLayout* layout;33 struct ComputePipelineDescriptor : public PipelineDescriptorBase { 34 ProgrammableStage compute; 35 35 }; 36 36 37 } // namespace PAL::WebGPU37 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUDepthStencilState.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPU RequestAdapterOptions.h"28 #include "WebGPUStencilFaceState.h" 29 29 #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> 33 33 34 namespace PAL::WebGPU {34 namespace WebKit::WebGPU { 35 35 36 class Adapter; 36 struct DepthStencilState { 37 PAL::WebGPU::TextureFormat format; 37 38 38 class GPU : public RefCounted<GPU> { 39 public: 40 virtual ~GPU() = default; 39 bool depthWriteEnabled; 40 PAL::WebGPU::CompareFunction depthCompare; 41 41 42 virtual void requestAdapter(const RequestAdapterOptions&, std::function<void(RefPtr<Adapter>&&)>&&) = 0; 42 StencilFaceState stencilFront; 43 StencilFaceState stencilBack; 43 44 44 protected: 45 GPU() = default;45 std::optional<PAL::WebGPU::StencilValue> stencilReadMask; 46 std::optional<PAL::WebGPU::StencilValue> stencilWriteMask; 46 47 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; 52 51 }; 53 52 54 } // namespace PAL::WebGPU53 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUDeviceDescriptor.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPUFeatureName.h"29 28 #include "WebGPUObjectDescriptorBase.h" 30 29 #include <cstdint> 30 #include <pal/graphics/WebGPU/WebGPUFeatureName.h> 31 31 #include <wtf/HashMap.h> 32 32 #include <wtf/KeyValuePair.h> 33 33 #include <wtf/Vector.h> 34 34 35 namespace PAL::WebGPU {35 namespace WebKit::WebGPU { 36 36 37 37 struct 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. 40 40 }; 41 41 42 } // namespace PAL::WebGPU42 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUExtent3D.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPUColor.h" 29 #include "WebGPULoadOp.h" 30 #include "WebGPUStoreOp.h" 31 #include "WebGPUTextureView.h" 28 #include <pal/graphics/WebGPU/WebGPUIntegralTypes.h> 32 29 #include <variant> 33 #include <wtf/Ref.h>34 30 #include <wtf/Vector.h> 35 31 36 namespace PAL::WebGPU {32 namespace WebKit::WebGPU { 37 33 38 struct RenderPassColorAttachment { 39 TextureView& view; 40 TextureView* resolveTarget; 41 42 std::variant<LoadOp, Vector<double>, ColorDict> loadValue; 43 StoreOp storeOp; 34 struct Extent3DDict { 35 PAL::WebGPU::IntegerCoordinate width; 36 PAL::WebGPU::IntegerCoordinate height; 37 PAL::WebGPU::IntegerCoordinate depthOrArrayLayers; 44 38 }; 45 39 46 } // namespace PAL::WebGPU 40 using Extent3D = std::variant<Vector<PAL::WebGPU::IntegerCoordinate>, Extent3DDict>; 41 42 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUExternalTextureBindingLayout.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPUBuffer.h" 29 #include "WebGPUImageDataLayout.h" 30 #include <wtf/Ref.h> 28 namespace WebKit::WebGPU { 31 29 32 namespace PAL::WebGPU { 33 34 struct ImageCopyBuffer : public ImageDataLayout { 35 Buffer& buffer; 30 struct ExternalTextureBindingLayout { 36 31 }; 37 32 38 } // namespace PAL::WebGPU33 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUExternalTextureDescriptor.h
r285879 r285881 27 27 28 28 #include "WebGPUObjectDescriptorBase.h" 29 #include "WebGPUPipelineLayout.h"29 #include <pal/graphics/WebGPU/WebGPUPredefinedColorSpace.h> 30 30 31 namespace PAL::WebGPU {31 namespace WebKit::WebGPU { 32 32 33 struct PipelineDescriptorBase: public ObjectDescriptorBase {34 P ipelineLayout* layout;33 struct ExternalTextureDescriptor : public ObjectDescriptorBase { 34 PAL::WebGPU::PredefinedColorSpace colorSpace; 35 35 }; 36 36 37 } // namespace PAL::WebGPU37 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUFragmentState.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPUObjectDescriptorBase.h" 29 #include "WebGPUPipelineLayout.h" 28 #include "WebGPUColorTargetState.h" 29 #include "WebGPUProgrammableStage.h" 30 #include <wtf/Vector.h> 30 31 31 namespace PAL::WebGPU {32 namespace WebKit::WebGPU { 32 33 33 struct PipelineDescriptorBase : public ObjectDescriptorBase {34 PipelineLayout* layout;34 struct FragmentState : public ProgrammableStage { 35 Vector<ColorTargetState> targets; 35 36 }; 36 37 37 } // namespace PAL::WebGPU38 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUIdentifier.h
r285879 r285881 1 1 /* 2 * Copyright (C) 202 1Apple Inc. All rights reserved.2 * Copyright (C) 2020 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 26 26 #pragma once 27 27 28 #include "WebGPUBuffer.h" 29 #include "WebGPUImageDataLayout.h" 30 #include <wtf/Ref.h> 28 #if ENABLE(GPU_PROCESS) 31 29 32 namespace PAL::WebGPU { 30 #include <wtf/ObjectIdentifier.h> 33 31 34 struct ImageCopyBuffer : public ImageDataLayout { 35 Buffer& buffer; 36 }; 32 namespace WebKit { 37 33 38 } // namespace PAL::WebGPU 34 enum WebGPUIdentifierType { }; 35 using WebGPUIdentifier = ObjectIdentifier<WebGPUIdentifierType>; 36 37 } // namespace WebKit 38 39 #endif -
trunk/Source/WebKit/Shared/WebGPU/WebGPUImageCopyBuffer.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPU Buffer.h"28 #include "WebGPUIdentifier.h" 29 29 #include "WebGPUImageDataLayout.h" 30 30 #include <wtf/Ref.h> 31 31 32 namespace PAL::WebGPU {32 namespace WebKit::WebGPU { 33 33 34 34 struct ImageCopyBuffer : public ImageDataLayout { 35 Buffer&buffer;35 WebGPUIdentifier buffer; 36 36 }; 37 37 38 } // namespace PAL::WebGPU38 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUImageCopyExternalImage.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPUBuffer.h" 29 #include "WebGPUIntegralTypes.h" 28 #include "WebGPUOrigin2D.h" 30 29 #include <optional> 31 #include < wtf/Ref.h>30 #include <variant> 32 31 33 namespace PAL::WebGPU {32 namespace WebKit::WebGPU { 34 33 35 struct BufferBinding { 36 Buffer& buffer; 37 Size64 offset; 38 std::optional<Size64> size; 34 struct ImageCopyExternalImage { 35 // std::variant<RefPtr<ImageBitmap>, RefPtr<HTMLCanvasElement>> source; 36 std::optional<Origin2D> origin; 39 37 }; 40 38 41 } // namespace PAL::WebGPU39 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUImageCopyTexture.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPUI ntegralTypes.h"28 #include "WebGPUIdentifier.h" 29 29 #include "WebGPUOrigin3D.h" 30 #include "WebGPUTexture.h"31 #include "WebGPUTextureAspect.h"32 30 #include <optional> 31 #include <pal/graphics/WebGPU/WebGPUIntegralTypes.h> 32 #include <pal/graphics/WebGPU/WebGPUTextureAspect.h> 33 33 #include <wtf/Ref.h> 34 34 35 namespace PAL::WebGPU {35 namespace WebKit::WebGPU { 36 36 37 37 struct ImageCopyTexture { 38 Texture&texture;39 IntegerCoordinate mipLevel;38 WebGPUIdentifier texture; 39 PAL::WebGPU::IntegerCoordinate mipLevel; 40 40 std::optional<Origin3D> origin; 41 TextureAspect aspect;41 PAL::WebGPU::TextureAspect aspect; 42 42 }; 43 43 44 } // namespace PAL::WebGPU44 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUImageCopyTextureTagged.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPU ObjectDescriptorBase.h"29 #include "WebGPUPipelineLayout.h"28 #include "WebGPUImageCopyTexture.h" 29 #include <pal/graphics/WebGPU/WebGPUPredefinedColorSpace.h> 30 30 31 namespace PAL::WebGPU {31 namespace WebKit::WebGPU { 32 32 33 struct PipelineDescriptorBase : public ObjectDescriptorBase { 34 PipelineLayout* layout; 33 struct ImageCopyTextureTagged : public ImageCopyTexture { 34 PAL::WebGPU::PredefinedColorSpace colorSpace; 35 bool premultipliedAlpha; 35 36 }; 36 37 37 } // namespace PAL::WebGPU38 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUImageDataLayout.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPUBuffer.h"29 #include "WebGPUIntegralTypes.h"30 28 #include <optional> 31 #include < wtf/Ref.h>29 #include <pal/graphics/WebGPU/WebGPUIntegralTypes.h> 32 30 33 namespace PAL::WebGPU {31 namespace WebKit::WebGPU { 34 32 35 struct BufferBinding{36 Buffer& buffer;37 Size64 offset;38 std::optional< Size64> size;33 struct ImageDataLayout { 34 PAL::WebGPU::Size64 offset; 35 std::optional<PAL::WebGPU::Size32> bytesPerRow; 36 std::optional<PAL::WebGPU::Size32> rowsPerImage; 39 37 }; 40 38 41 } // namespace PAL::WebGPU39 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUMultisampleState.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPUObjectDescriptorBase.h" 29 #include "WebGPUPipelineLayout.h" 28 #include <pal/graphics/WebGPU/WebGPUIntegralTypes.h> 30 29 31 namespace PAL::WebGPU {30 namespace WebKit::WebGPU { 32 31 33 struct PipelineDescriptorBase : public ObjectDescriptorBase { 34 PipelineLayout* layout; 32 struct MultisampleState { 33 PAL::WebGPU::Size32 count; 34 PAL::WebGPU::SampleMask mask; 35 bool alphaToCoverageEnabled; 35 36 }; 36 37 37 } // namespace PAL::WebGPU38 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUObjectDescriptorBase.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPUBuffer.h" 29 #include "WebGPUImageDataLayout.h" 30 #include <wtf/Ref.h> 28 #include <wtf/text/WTFString.h> 31 29 32 namespace PAL::WebGPU {30 namespace WebKit::WebGPU { 33 31 34 struct ImageCopyBuffer : public ImageDataLayout{35 Buffer& buffer;32 struct ObjectDescriptorBase { 33 String label; 36 34 }; 37 35 38 } // namespace PAL::WebGPU36 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUOrigin2D.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPUBindGroupLayout.h" 29 #include "WebGPUObjectDescriptorBase.h" 30 #include <utility> 28 #include <pal/graphics/WebGPU/WebGPUIntegralTypes.h> 29 #include <variant> 31 30 #include <wtf/Vector.h> 32 31 33 namespace PAL::WebGPU {32 namespace WebKit::WebGPU { 34 33 35 struct PipelineLayoutDescriptor : public ObjectDescriptorBase { 36 Vector<std::reference_wrapper<BindGroupLayout>> bindGroupLayouts; 34 struct Origin2DDict { 35 PAL::WebGPU::IntegerCoordinate x; 36 PAL::WebGPU::IntegerCoordinate y; 37 37 }; 38 38 39 } // namespace PAL::WebGPU 39 using Origin2D = std::variant<Vector<PAL::WebGPU::IntegerCoordinate>, Origin2DDict>; 40 41 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUOrigin3D.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPUColor.h" 29 #include "WebGPULoadOp.h" 30 #include "WebGPUStoreOp.h" 31 #include "WebGPUTextureView.h" 28 #include <pal/graphics/WebGPU/WebGPUIntegralTypes.h> 32 29 #include <variant> 33 #include <wtf/Ref.h>34 30 #include <wtf/Vector.h> 35 31 36 namespace PAL::WebGPU {32 namespace WebKit::WebGPU { 37 33 38 struct RenderPassColorAttachment { 39 TextureView& view; 40 TextureView* resolveTarget; 41 42 std::variant<LoadOp, Vector<double>, ColorDict> loadValue; 43 StoreOp storeOp; 34 struct Origin3DDict { 35 PAL::WebGPU::IntegerCoordinate x; 36 PAL::WebGPU::IntegerCoordinate y; 37 PAL::WebGPU::IntegerCoordinate z; 44 38 }; 45 39 46 } // namespace PAL::WebGPU 40 using Origin3D = std::variant<Vector<PAL::WebGPU::IntegerCoordinate>, Origin3DDict>; 41 42 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUPipelineDescriptorBase.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPUIdentifier.h" 28 29 #include "WebGPUObjectDescriptorBase.h" 29 #include "WebGPUPipelineLayout.h"30 30 31 namespace PAL::WebGPU {31 namespace WebKit::WebGPU { 32 32 33 33 struct PipelineDescriptorBase : public ObjectDescriptorBase { 34 PipelineLayout*layout;34 WebGPUIdentifier layout; 35 35 }; 36 36 37 } // namespace PAL::WebGPU37 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUPipelineLayoutDescriptor.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPU BindGroupLayout.h"28 #include "WebGPUIdentifier.h" 29 29 #include "WebGPUObjectDescriptorBase.h" 30 #include <utility>31 30 #include <wtf/Vector.h> 32 31 33 namespace PAL::WebGPU {32 namespace WebKit::WebGPU { 34 33 35 34 struct PipelineLayoutDescriptor : public ObjectDescriptorBase { 36 Vector< std::reference_wrapper<BindGroupLayout>> bindGroupLayouts;35 Vector<WebGPUIdentifier> bindGroupLayouts; 37 36 }; 38 37 39 } // namespace PAL::WebGPU38 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUPrimitiveState.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPURequestAdapterOptions.h"29 28 #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> 33 34 34 namespace PAL::WebGPU {35 namespace WebKit::WebGPU { 35 36 36 class Adapter; 37 struct PrimitiveState { 38 PAL::WebGPU::PrimitiveTopology topology; 39 std::optional<PAL::WebGPU::IndexFormat> stripIndexFormat; 40 PAL::WebGPU::FrontFace frontFace; 41 PAL::WebGPU::CullMode cullMode; 37 42 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; 52 45 }; 53 46 54 } // namespace PAL::WebGPU47 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUProgrammableStage.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPU ShaderModule.h"28 #include "WebGPUIdentifier.h" 29 29 #include <wtf/KeyValuePair.h> 30 30 #include <wtf/Ref.h> 31 31 #include <wtf/Vector.h> 32 32 33 namespace PAL::WebGPU {33 namespace WebKit::WebGPU { 34 34 35 35 using PipelineConstantValue = double; // May represent WGSL’s bool, f32, i32, u32. 36 36 37 37 struct ProgrammableStage { 38 ShaderModule&module;38 WebGPUIdentifier module; 39 39 String entryPoint; 40 40 Vector<KeyValuePair<String, PipelineConstantValue>> constants; 41 41 }; 42 42 43 } // namespace PAL::WebGPU43 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUQuerySetDescriptor.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPUFeatureName.h"29 28 #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> 33 32 #include <wtf/Vector.h> 34 33 35 namespace PAL::WebGPU {34 namespace WebKit::WebGPU { 36 35 37 struct DeviceDescriptor : public ObjectDescriptorBase { 38 Vector<FeatureName> requiredFeatures; 39 // Vector<KeyValuePair<String, uint64_t>> requiredLimits; 36 struct QuerySetDescriptor : public ObjectDescriptorBase { 37 PAL::WebGPU::QueryType type; 38 PAL::WebGPU::Size32 count; 39 Vector<PAL::WebGPU::PipelineStatisticName> pipelineStatistics; 40 40 }; 41 41 42 } // namespace PAL::WebGPU42 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPURenderBundleDescriptor.h
r285879 r285881 27 27 28 28 #include "WebGPUObjectDescriptorBase.h" 29 #include "WebGPUPipelineLayout.h"30 29 31 namespace PAL::WebGPU {30 namespace WebKit::WebGPU { 32 31 33 struct PipelineDescriptorBase : public ObjectDescriptorBase { 34 PipelineLayout* layout; 32 struct RenderBundleDescriptor : public ObjectDescriptorBase { 35 33 }; 36 34 37 } // namespace PAL::WebGPU35 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPURenderBundleEncoderDescriptor.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPUBuffer.h" 29 #include "WebGPUImageDataLayout.h" 30 #include <wtf/Ref.h> 28 #include "WebGPURenderPassLayout.h" 31 29 32 namespace PAL::WebGPU {30 namespace WebKit::WebGPU { 33 31 34 struct ImageCopyBuffer : public ImageDataLayout { 35 Buffer& buffer; 32 struct RenderBundleEncoderDescriptor : public RenderPassLayout { 33 bool depthReadOnly; 34 bool stencilReadOnly; 36 35 }; 37 36 38 } // namespace PAL::WebGPU37 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPURenderPassColorAttachment.h
r285879 r285881 27 27 28 28 #include "WebGPUColor.h" 29 #include "WebGPU LoadOp.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> 32 32 #include <variant> 33 33 #include <wtf/Ref.h> 34 34 #include <wtf/Vector.h> 35 35 36 namespace PAL::WebGPU {36 namespace WebKit::WebGPU { 37 37 38 38 struct RenderPassColorAttachment { 39 TextureView&view;40 TextureView*resolveTarget;39 WebGPUIdentifier view; 40 WebGPUIdentifier resolveTarget; 41 41 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; 44 44 }; 45 45 46 } // namespace PAL::WebGPU46 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPURenderPassDepthStencilAttachment.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPUI ntegralTypes.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> 32 32 #include <variant> 33 33 #include <wtf/Ref.h> 34 34 35 namespace PAL::WebGPU {35 namespace WebKit::WebGPU { 36 36 37 37 struct RenderPassDepthStencilAttachment { 38 TextureView&view;38 WebGPUIdentifier view; 39 39 40 std::variant< LoadOp, float> depthLoadValue;41 StoreOp depthStoreOp;40 std::variant<PAL::WebGPU::LoadOp, float> depthLoadValue; 41 PAL::WebGPU::StoreOp depthStoreOp; 42 42 bool depthReadOnly; 43 43 44 std::variant< LoadOp,StencilValue> stencilLoadValue;45 StoreOp stencilStoreOp;44 std::variant<PAL::WebGPU::LoadOp, PAL::WebGPU::StencilValue> stencilLoadValue; 45 PAL::WebGPU::StoreOp stencilStoreOp; 46 46 bool stencilReadOnly; 47 47 }; 48 48 49 } // namespace PAL::WebGPU49 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPURenderPassDescriptor.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPU BindGroupLayout.h"28 #include "WebGPUIdentifier.h" 29 29 #include "WebGPUObjectDescriptorBase.h" 30 #include <utility> 30 #include "WebGPURenderPassColorAttachment.h" 31 #include "WebGPURenderPassDepthStencilAttachment.h" 32 #include "WebGPURenderPassTimestampWrites.h" 33 #include <optional> 31 34 #include <wtf/Vector.h> 32 35 33 namespace PAL::WebGPU {36 namespace WebKit::WebGPU { 34 37 35 struct PipelineLayoutDescriptor : public ObjectDescriptorBase { 36 Vector<std::reference_wrapper<BindGroupLayout>> bindGroupLayouts; 38 struct RenderPassDescriptor : public ObjectDescriptorBase { 39 Vector<RenderPassColorAttachment> colorAttachments; 40 std::optional<RenderPassDepthStencilAttachment> depthStencilAttachment; 41 WebGPUIdentifier occlusionQuerySet; 42 RenderPassTimestampWrites timestampWrites; 37 43 }; 38 44 39 } // namespace PAL::WebGPU45 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPURenderPassLayout.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPUFeatureName.h"29 28 #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> 33 32 #include <wtf/Vector.h> 34 33 35 namespace PAL::WebGPU {34 namespace WebKit::WebGPU { 36 35 37 struct DeviceDescriptor : public ObjectDescriptorBase { 38 Vector<FeatureName> requiredFeatures; 39 // Vector<KeyValuePair<String, uint64_t>> requiredLimits; 36 struct RenderPassLayout : public ObjectDescriptorBase { 37 Vector<PAL::WebGPU::TextureFormat> colorFormats; 38 std::optional<PAL::WebGPU::TextureFormat> depthStencilFormat; 39 PAL::WebGPU::Size32 sampleCount; 40 40 }; 41 41 42 } // namespace PAL::WebGPU42 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPURenderPassTimestampWrites.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPUI ntegralTypes.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> 31 31 #include <wtf/Ref.h> 32 32 #include <wtf/Vector.h> 33 33 34 namespace PAL::WebGPU {34 namespace WebKit::WebGPU { 35 35 36 36 struct RenderPassTimestampWrite { 37 QuerySet&querySet;38 Size32 queryIndex;39 RenderPassTimestampLocation location;37 WebGPUIdentifier querySet; 38 PAL::WebGPU::Size32 queryIndex; 39 PAL::WebGPU::RenderPassTimestampLocation location; 40 40 }; 41 41 42 42 using RenderPassTimestampWrites = Vector<RenderPassTimestampWrite>; 43 43 44 } // namespace PAL::WebGPU44 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPURenderPipelineDescriptor.h
r285879 r285881 26 26 #pragma once 27 27 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" 32 34 #include <optional> 33 #include <wtf/Ref.h>34 35 35 namespace PAL::WebGPU {36 namespace WebKit::WebGPU { 36 37 37 struct ImageCopyTexture { 38 Texture& texture; 39 IntegerCoordinate mipLevel; 40 std::optional<Origin3D> origin; 41 TextureAspect aspect; 38 struct 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; 42 44 }; 43 45 44 } // namespace PAL::WebGPU46 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPURequestAdapterOptions.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPUBuffer.h"29 #include "WebGPUIntegralTypes.h"30 28 #include <optional> 31 #include < wtf/Ref.h>29 #include <pal/graphics/WebGPU/WebGPUPowerPreference.h> 32 30 33 namespace PAL::WebGPU {31 namespace WebKit::WebGPU { 34 32 35 struct BufferBinding { 36 Buffer& buffer; 37 Size64 offset; 38 std::optional<Size64> size; 33 struct RequestAdapterOptions { 34 std::optional<PAL::WebGPU::PowerPreference> powerPreference; 35 bool forceFallbackAdapter; 39 36 }; 40 37 41 } // namespace PAL::WebGPU38 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUSamplerBindingLayout.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPUBuffer.h" 29 #include "WebGPUImageDataLayout.h" 30 #include <wtf/Ref.h> 28 #include <pal/graphics/WebGPU/WebGPUSamplerBindingType.h> 31 29 32 namespace PAL::WebGPU {30 namespace WebKit::WebGPU { 33 31 34 struct ImageCopyBuffer : public ImageDataLayout {35 Buffer& buffer;32 struct SamplerBindingLayout { 33 PAL::WebGPU::SamplerBindingType type; 36 34 }; 37 35 38 } // namespace PAL::WebGPU36 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUSamplerDescriptor.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPUFeatureName.h"29 28 #include "WebGPUObjectDescriptorBase.h" 30 29 #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> 34 34 35 namespace PAL::WebGPU {35 namespace WebKit::WebGPU { 36 36 37 struct DeviceDescriptor : public ObjectDescriptorBase { 38 Vector<FeatureName> requiredFeatures; 39 // Vector<KeyValuePair<String, uint64_t>> requiredLimits; 37 struct 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; 40 48 }; 41 49 42 } // namespace PAL::WebGPU50 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUShaderModuleDescriptor.h
r285879 r285881 27 27 28 28 #include "WebGPUObjectDescriptorBase.h" 29 #include "WebGPUPipelineLayout.h"29 #include <wtf/text/WTFString.h> 30 30 31 namespace PAL::WebGPU {31 namespace WebKit::WebGPU { 32 32 33 struct PipelineDescriptorBase : public ObjectDescriptorBase { 34 PipelineLayout* layout; 33 struct ShaderModuleDescriptor : public ObjectDescriptorBase { 34 String code; 35 // JSC::Strong<JSC::JSObject> sourceMap; 35 36 }; 36 37 37 } // namespace PAL::WebGPU38 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUStencilFaceState.h
r285879 r285881 26 26 #pragma once 27 27 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> 34 30 35 namespace PAL::WebGPU {31 namespace WebKit::WebGPU { 36 32 37 struct ImageCopyTexture {38 Texture& texture;39 IntegerCoordinate mipLevel;40 std::optional<Origin3D> origin;41 TextureAspect aspect;33 struct StencilFaceState { 34 PAL::WebGPU::CompareFunction compare; 35 PAL::WebGPU::StencilOperation failOp; 36 PAL::WebGPU::StencilOperation depthFailOp; 37 PAL::WebGPU::StencilOperation passOp; 42 38 }; 43 39 44 } // namespace PAL::WebGPU40 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUStorageTextureBindingLayout.h
r285879 r285881 26 26 #pragma once 27 27 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> 34 31 35 namespace PAL::WebGPU {32 namespace WebKit::WebGPU { 36 33 37 struct DeviceDescriptor : public ObjectDescriptorBase { 38 Vector<FeatureName> requiredFeatures; 39 // Vector<KeyValuePair<String, uint64_t>> requiredLimits; 34 struct StorageTextureBindingLayout { 35 PAL::WebGPU::StorageTextureAccess access; 36 PAL::WebGPU::TextureFormat format; 37 PAL::WebGPU::TextureViewDimension viewDimension; 40 38 }; 41 39 42 } // namespace PAL::WebGPU40 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUTextureBindingLayout.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPUObjectDescriptorBase.h"29 #include "WebGPUPipelineLayout.h"28 #include <pal/graphics/WebGPU/WebGPUTextureSampleType.h> 29 #include <pal/graphics/WebGPU/WebGPUTextureViewDimension.h> 30 30 31 namespace PAL::WebGPU {31 namespace WebKit::WebGPU { 32 32 33 struct PipelineDescriptorBase : public ObjectDescriptorBase { 34 PipelineLayout* layout; 33 struct TextureBindingLayout { 34 PAL::WebGPU::TextureSampleType sampleType; 35 PAL::WebGPU::TextureViewDimension viewDimension; 36 bool multisampled; 35 37 }; 36 38 37 } // namespace PAL::WebGPU39 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUTextureDescriptor.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPU FeatureName.h"28 #include "WebGPUExtent3D.h" 29 29 #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> 34 34 35 namespace PAL::WebGPU {35 namespace WebKit::WebGPU { 36 36 37 struct DeviceDescriptor : public ObjectDescriptorBase { 38 Vector<FeatureName> requiredFeatures; 39 // Vector<KeyValuePair<String, uint64_t>> requiredLimits; 37 struct 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; 40 44 }; 41 45 42 } // namespace PAL::WebGPU46 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUTextureViewDescriptor.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPUFeatureName.h"29 28 #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> 34 34 35 namespace PAL::WebGPU {35 namespace WebKit::WebGPU { 36 36 37 struct DeviceDescriptor : public ObjectDescriptorBase { 38 Vector<FeatureName> requiredFeatures; 39 // Vector<KeyValuePair<String, uint64_t>> requiredLimits; 37 struct 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; 40 45 }; 41 46 42 } // namespace PAL::WebGPU47 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUVertexAttribute.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPUObjectDescriptorBase.h"29 #include "WebGPUPipelineLayout.h"28 #include <pal/graphics/WebGPU/WebGPUIntegralTypes.h> 29 #include <pal/graphics/WebGPU/WebGPUVertexFormat.h> 30 30 31 namespace PAL::WebGPU {31 namespace WebKit::WebGPU { 32 32 33 struct PipelineDescriptorBase : public ObjectDescriptorBase { 34 PipelineLayout* layout; 33 struct VertexAttribute { 34 PAL::WebGPU::VertexFormat format; 35 PAL::WebGPU::Size64 offset; 36 37 PAL::WebGPU::Index32 shaderLocation; 35 38 }; 36 39 37 } // namespace PAL::WebGPU40 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUVertexBufferLayout.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPU BindGroupLayout.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> 31 31 #include <wtf/Vector.h> 32 32 33 namespace PAL::WebGPU {33 namespace WebKit::WebGPU { 34 34 35 struct PipelineLayoutDescriptor : public ObjectDescriptorBase { 36 Vector<std::reference_wrapper<BindGroupLayout>> bindGroupLayouts; 35 struct VertexBufferLayout { 36 PAL::WebGPU::Size64 arrayStride; 37 PAL::WebGPU::VertexStepMode stepMode; 38 Vector<VertexAttribute> attributes; 37 39 }; 38 40 39 } // namespace PAL::WebGPU41 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Shared/WebGPU/WebGPUVertexState.h
r285879 r285881 26 26 #pragma once 27 27 28 #include "WebGPU Buffer.h"29 #include "WebGPU IntegralTypes.h"28 #include "WebGPUProgrammableStage.h" 29 #include "WebGPUVertexBufferLayout.h" 30 30 #include <optional> 31 #include <wtf/ Ref.h>31 #include <wtf/Vector.h> 32 32 33 namespace PAL::WebGPU {33 namespace WebKit::WebGPU { 34 34 35 struct BufferBinding { 36 Buffer& buffer; 37 Size64 offset; 38 std::optional<Size64> size; 35 struct VertexState : public ProgrammableStage { 36 Vector<std::optional<VertexBufferLayout>> buffers; 39 37 }; 40 38 41 } // namespace PAL::WebGPU39 } // namespace WebKit::WebGPU -
trunk/Source/WebKit/Sources.txt
r285637 r285881 596 596 597 597 WebProcess/GPU/GPUProcessConnection.cpp 598 WebProcess/GPU/graphics/WebGPU/RemoteAdapterProxy.cpp 599 WebProcess/GPU/graphics/WebGPU/RemoteBindGroupLayoutProxy.cpp 600 WebProcess/GPU/graphics/WebGPU/RemoteBindGroupProxy.cpp 601 WebProcess/GPU/graphics/WebGPU/RemoteBufferProxy.cpp 602 WebProcess/GPU/graphics/WebGPU/RemoteCommandBufferProxy.cpp 603 WebProcess/GPU/graphics/WebGPU/RemoteCommandEncoderProxy.cpp 604 WebProcess/GPU/graphics/WebGPU/RemoteComputePassEncoderProxy.cpp 605 WebProcess/GPU/graphics/WebGPU/RemoteComputePipelineProxy.cpp 606 WebProcess/GPU/graphics/WebGPU/RemoteDeviceProxy.cpp 607 WebProcess/GPU/graphics/WebGPU/RemoteExternalTextureProxy.cpp 608 WebProcess/GPU/graphics/WebGPU/RemoteGPUProxy.cpp 609 WebProcess/GPU/graphics/WebGPU/RemotePipelineLayoutProxy.cpp 610 WebProcess/GPU/graphics/WebGPU/RemoteQuerySetProxy.cpp 611 WebProcess/GPU/graphics/WebGPU/RemoteQueueProxy.cpp 612 WebProcess/GPU/graphics/WebGPU/RemoteRenderBundleEncoderProxy.cpp 613 WebProcess/GPU/graphics/WebGPU/RemoteRenderBundleProxy.cpp 614 WebProcess/GPU/graphics/WebGPU/RemoteRenderPassEncoderProxy.cpp 615 WebProcess/GPU/graphics/WebGPU/RemoteRenderPipelineProxy.cpp 616 WebProcess/GPU/graphics/WebGPU/RemoteSamplerProxy.cpp 617 WebProcess/GPU/graphics/WebGPU/RemoteShaderModuleProxy.cpp 618 WebProcess/GPU/graphics/WebGPU/RemoteTextureProxy.cpp 619 WebProcess/GPU/graphics/WebGPU/RemoteTextureViewProxy.cpp 620 WebProcess/GPU/graphics/WebGPU/WebGPUDowncastConvertToBackingContext.cpp 598 621 WebProcess/GPU/graphics/DisplayListWriterHandle.cpp 599 622 WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp -
trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj
r285799 r285881 389 389 1CA8B945127C882A00576C2B /* WebInspectorUIProxyMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1CA8B943127C882A00576C2B /* WebInspectorUIProxyMessageReceiver.cpp */; }; 390 390 1CA8B946127C882A00576C2B /* WebInspectorUIProxyMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CA8B944127C882A00576C2B /* WebInspectorUIProxyMessages.h */; }; 391 1CB7464D274380C800F19874 /* WebGPUDowncastConvertToBackingContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CB7464B274380C800F19874 /* WebGPUDowncastConvertToBackingContext.h */; }; 391 392 1CBBE4A019B66C53006B7D81 /* WebInspectorUIMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1CBBE49E19B66C53006B7D81 /* WebInspectorUIMessageReceiver.cpp */; }; 392 393 1CBBE4A119B66C53006B7D81 /* WebInspectorUIMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CBBE49F19B66C53006B7D81 /* WebInspectorUIMessages.h */; }; … … 2899 2900 1CA8B943127C882A00576C2B /* WebInspectorUIProxyMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebInspectorUIProxyMessageReceiver.cpp; path = DerivedSources/WebKit2/WebInspectorUIProxyMessageReceiver.cpp; sourceTree = BUILT_PRODUCTS_DIR; }; 2900 2901 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>"; }; 2901 3008 1CBBE49E19B66C53006B7D81 /* WebInspectorUIMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebInspectorUIMessageReceiver.cpp; path = DerivedSources/WebKit2/WebInspectorUIMessageReceiver.cpp; sourceTree = BUILT_PRODUCTS_DIR; }; 2902 3009 1CBBE49F19B66C53006B7D81 /* WebInspectorUIMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebInspectorUIMessages.h; path = DerivedSources/WebKit2/WebInspectorUIMessages.h; sourceTree = BUILT_PRODUCTS_DIR; }; … … 6586 6693 2D2E04761F5BEC4F00BB25ED /* RemoteLayerTree */, 6587 6694 E3612FF026F90862007B1175 /* Sandbox */, 6695 1CB74645274379F100F19874 /* WebGPU */, 6588 6696 1ABF43781A368035003FB0E6 /* WebsiteData */, 6589 6697 118502602673B0DA00A6425E /* XR */, … … 7072 7180 ); 7073 7181 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; 7074 7302 sourceTree = "<group>"; 7075 7303 }; … … 8791 9019 children = ( 8792 9020 727A7F3324078527004D2931 /* cocoa */, 9021 1CB7461927436DE300F19874 /* WebGPU */, 8793 9022 F4094CBA2553047E003D73E3 /* DisplayListWriterHandle.cpp */, 8794 9023 F4094CB92553047E003D73E3 /* DisplayListWriterHandle.h */, … … 12511 12740 BC1BE1F212D54DBD0004A228 /* WebGeolocationProvider.h in Headers */, 12512 12741 2D5036761BCED19F00E20BB3 /* WebGestureEvent.h in Headers */, 12742 1CB7464D274380C800F19874 /* WebGPUDowncastConvertToBackingContext.h in Headers */, 12513 12743 93A88B331BC6E9CD00ABA5C2 /* WebHitTestResultData.h in Headers */, 12514 12744 F44DFEB21E9E752F0038D196 /* WebIconUtilities.h in Headers */, -
trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteAdapterProxy.cpp
r285879 r285881 25 25 26 26 #include "config.h" 27 #include " WebGPUShaderModuleImpl.h"27 #include "RemoteAdapterProxy.h" 28 28 29 #if HAVE(WEBGPU_IMPLEMENTATION)29 #if ENABLE(GPU_PROCESS) 30 30 31 31 #include "WebGPUConvertToBackingContext.h" 32 #include <WebGPU/WebGPUExt.h>33 32 34 namespace PAL::WebGPU {33 namespace WebKit::WebGPU { 35 34 36 ShaderModuleImpl::ShaderModuleImpl(WGPUShaderModule shaderModule, ConvertToBackingContext& convertToBackingContext)37 : m_backing(shaderModule)35 RemoteAdapterProxy::RemoteAdapterProxy(String&& name, PAL::WebGPU::SupportedFeatures& features, PAL::WebGPU::SupportedLimits& limits, bool isFallbackAdapter, ConvertToBackingContext& convertToBackingContext) 36 : Adapter(WTFMove(name), features, limits, isFallbackAdapter) 38 37 , m_convertToBackingContext(convertToBackingContext) 39 38 { 40 39 } 41 40 42 ShaderModuleImpl::~ShaderModuleImpl() 43 { 44 wgpuShaderModuleRelease(m_backing); 45 } 46 47 void ShaderModuleImpl::compilationInfo(std::function<void(Ref<CompilationInfo>&&)>&&) 41 RemoteAdapterProxy::~RemoteAdapterProxy() 48 42 { 49 43 } 50 44 51 void ShaderModuleImpl::setLabelInternal(const String& label)45 void RemoteAdapterProxy::requestDevice(const PAL::WebGPU::DeviceDescriptor& descriptor, WTF::Function<void(Ref<PAL::WebGPU::Device>)>&& callback) 52 46 { 53 wgpuShaderModuleSetLabel(m_backing, label.utf8().data()); 47 UNUSED_PARAM(descriptor); 48 UNUSED_PARAM(callback); 54 49 } 55 50 56 } // namespace PAL::WebGPU51 } // namespace WebKit::WebGPU 57 52 58 #endif // HAVE( WEBGPU_IMPLEMENTATION)53 #endif // HAVE(GPU_PROCESS) -
trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteAdapterProxy.h
r285879 r285881 26 26 #pragma once 27 27 28 #if HAVE(WEBGPU_IMPLEMENTATION)28 #if ENABLE(GPU_PROCESS) 29 29 30 #include "WebGPU Buffer.h"31 #include < WebGPU/WebGPU.h>30 #include "WebGPUIdentifier.h" 31 #include <pal/graphics/WebGPU/WebGPUAdapter.h> 32 32 #include <wtf/Deque.h> 33 33 34 namespace PAL::WebGPU {34 namespace WebKit::WebGPU { 35 35 36 36 class ConvertToBackingContext; 37 37 38 class BufferImpl final : public Buffer {38 class RemoteAdapterProxy final : public PAL::WebGPU::Adapter { 39 39 public: 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) 41 41 { 42 return adoptRef(*new BufferImpl(buffer, convertToBackingContext));42 return adoptRef(*new RemoteAdapterProxy(WTFMove(name), features, limits, isFallbackAdapter, convertToBackingContext)); 43 43 } 44 44 45 virtual ~ BufferImpl();45 virtual ~RemoteAdapterProxy(); 46 46 47 47 private: 48 48 friend class DowncastConvertToBackingContext; 49 friend void mapCallback(WGPUBufferMapAsyncStatus, void* userdata);50 49 51 BufferImpl(WGPUBuffer, ConvertToBackingContext&);50 RemoteAdapterProxy(String&& name, PAL::WebGPU::SupportedFeatures&, PAL::WebGPU::SupportedLimits&, bool isFallbackAdapter, ConvertToBackingContext&); 52 51 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; 57 56 58 W GPUBuffer backing() const { return m_backing; }57 WebGPUIdentifier backing() const { return m_backing; } 59 58 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; 64 60 65 void destroy() final;61 Deque<WTF::Function<void(Ref<PAL::WebGPU::Device>)>> m_callbacks; 66 62 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() }; 72 64 Ref<ConvertToBackingContext> m_convertToBackingContext; 73 65 }; 74 66 75 } // namespace PAL::WebGPU67 } // namespace WebKit::WebGPU 76 68 77 #endif // HAVE(WEBGPU_IMPLEMENTATION)69 #endif // ENABLE(GPU_PROCESS) -
trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteBindGroupLayoutProxy.cpp
r285879 r285881 24 24 */ 25 25 26 #pragma once 26 #include "config.h" 27 #include "RemoteBindGroupLayoutProxy.h" 27 28 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) 34 30 35 namespace PAL::WebGPU { 31 #include "WebGPUConvertToBackingContext.h" 36 32 37 struct RenderPassDepthStencilAttachment { 38 TextureView& view; 33 namespace WebKit::WebGPU { 39 34 40 std::variant<LoadOp, float> depthLoadValue; 41 StoreOp depthStoreOp; 42 bool depthReadOnly; 35 RemoteBindGroupLayoutProxy::RemoteBindGroupLayoutProxy(ConvertToBackingContext& convertToBackingContext) 36 : m_convertToBackingContext(convertToBackingContext) 37 { 38 } 43 39 44 std::variant<LoadOp, StencilValue> stencilLoadValue; 45 StoreOp stencilStoreOp; 46 bool stencilReadOnly; 47 }; 40 RemoteBindGroupLayoutProxy::~RemoteBindGroupLayoutProxy() 41 { 42 } 48 43 49 } // namespace PAL::WebGPU 44 void 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 26 26 #pragma once 27 27 28 #if HAVE(WEBGPU_IMPLEMENTATION)28 #if ENABLE(GPU_PROCESS) 29 29 30 #include "WebGPU ShaderModule.h"31 #include < WebGPU/WebGPU.h>30 #include "WebGPUIdentifier.h" 31 #include <pal/graphics/WebGPU/WebGPUBindGroupLayout.h> 32 32 33 namespace PAL::WebGPU {33 namespace WebKit::WebGPU { 34 34 35 35 class ConvertToBackingContext; 36 36 37 class ShaderModuleImpl final : public ShaderModule{37 class RemoteBindGroupLayoutProxy final : public PAL::WebGPU::BindGroupLayout { 38 38 public: 39 static Ref< ShaderModuleImpl> create(WGPUShaderModule shaderModule,ConvertToBackingContext& convertToBackingContext)39 static Ref<RemoteBindGroupLayoutProxy> create(ConvertToBackingContext& convertToBackingContext) 40 40 { 41 return adoptRef(*new ShaderModuleImpl(shaderModule,convertToBackingContext));41 return adoptRef(*new RemoteBindGroupLayoutProxy(convertToBackingContext)); 42 42 } 43 43 44 virtual ~ ShaderModuleImpl();44 virtual ~RemoteBindGroupLayoutProxy(); 45 45 46 46 private: 47 47 friend class DowncastConvertToBackingContext; 48 48 49 ShaderModuleImpl(WGPUShaderModule,ConvertToBackingContext&);49 RemoteBindGroupLayoutProxy(ConvertToBackingContext&); 50 50 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; 55 55 56 WGPUShaderModule backing() const { return m_backing; } 57 58 void compilationInfo(std::function<void(Ref<CompilationInfo>&&)>&&) final; 56 WebGPUIdentifier backing() const { return m_backing; } 59 57 60 58 void setLabelInternal(const String&) final; 61 59 62 W GPUShaderModule m_backing { nullptr};60 WebGPUIdentifier m_backing { WebGPUIdentifier::generate() }; 63 61 Ref<ConvertToBackingContext> m_convertToBackingContext; 64 62 }; 65 63 66 } // namespace PAL::WebGPU64 } // namespace WebKit::WebGPU 67 65 68 #endif // HAVE(WEBGPU_IMPLEMENTATION)66 #endif // ENABLE(GPU_PROCESS) -
trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteBindGroupProxy.cpp
r285879 r285881 24 24 */ 25 25 26 #pragma once 26 #include "config.h" 27 #include "RemoteBindGroupProxy.h" 27 28 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) 34 30 35 namespace PAL::WebGPU { 31 #include "WebGPUConvertToBackingContext.h" 36 32 37 struct RenderPassDepthStencilAttachment { 38 TextureView& view; 33 namespace WebKit::WebGPU { 39 34 40 std::variant<LoadOp, float> depthLoadValue; 41 StoreOp depthStoreOp; 42 bool depthReadOnly; 35 RemoteBindGroupProxy::RemoteBindGroupProxy(ConvertToBackingContext& convertToBackingContext) 36 : m_convertToBackingContext(convertToBackingContext) 37 { 38 } 43 39 44 std::variant<LoadOp, StencilValue> stencilLoadValue; 45 StoreOp stencilStoreOp; 46 bool stencilReadOnly; 47 }; 40 RemoteBindGroupProxy::~RemoteBindGroupProxy() 41 { 42 } 48 43 49 } // namespace PAL::WebGPU 44 void 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 26 26 #pragma once 27 27 28 #if HAVE(WEBGPU_IMPLEMENTATION)28 #if ENABLE(GPU_PROCESS) 29 29 30 #include "WebGPU ShaderModule.h"31 #include < WebGPU/WebGPU.h>30 #include "WebGPUIdentifier.h" 31 #include <pal/graphics/WebGPU/WebGPUBindGroup.h> 32 32 33 namespace PAL::WebGPU {33 namespace WebKit::WebGPU { 34 34 35 35 class ConvertToBackingContext; 36 36 37 class ShaderModuleImpl final : public ShaderModule{37 class RemoteBindGroupProxy final : public PAL::WebGPU::BindGroup { 38 38 public: 39 static Ref< ShaderModuleImpl> create(WGPUShaderModule shaderModule,ConvertToBackingContext& convertToBackingContext)39 static Ref<RemoteBindGroupProxy> create(ConvertToBackingContext& convertToBackingContext) 40 40 { 41 return adoptRef(*new ShaderModuleImpl(shaderModule,convertToBackingContext));41 return adoptRef(*new RemoteBindGroupProxy(convertToBackingContext)); 42 42 } 43 43 44 virtual ~ ShaderModuleImpl();44 virtual ~RemoteBindGroupProxy(); 45 45 46 46 private: 47 47 friend class DowncastConvertToBackingContext; 48 48 49 ShaderModuleImpl(WGPUShaderModule,ConvertToBackingContext&);49 RemoteBindGroupProxy(ConvertToBackingContext&); 50 50 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; 55 55 56 WGPUShaderModule backing() const { return m_backing; } 57 58 void compilationInfo(std::function<void(Ref<CompilationInfo>&&)>&&) final; 56 WebGPUIdentifier backing() const { return m_backing; } 59 57 60 58 void setLabelInternal(const String&) final; 61 59 62 W GPUShaderModule m_backing { nullptr};60 WebGPUIdentifier m_backing { WebGPUIdentifier::generate() }; 63 61 Ref<ConvertToBackingContext> m_convertToBackingContext; 64 62 }; 65 63 66 } // namespace PAL::WebGPU64 } // namespace WebKit::WebGPU 67 65 68 #endif // HAVE(WEBGPU_IMPLEMENTATION)66 #endif // ENABLE(GPU_PROCESS) -
trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteBufferProxy.cpp
r285879 r285881 25 25 26 26 #include "config.h" 27 #include " WebGPUShaderModuleImpl.h"27 #include "RemoteBufferProxy.h" 28 28 29 #if HAVE(WEBGPU_IMPLEMENTATION)29 #if ENABLE(GPU_PROCESS) 30 30 31 31 #include "WebGPUConvertToBackingContext.h" 32 #include <WebGPU/WebGPUExt.h>33 32 34 namespace PAL::WebGPU {33 namespace WebKit::WebGPU { 35 34 36 ShaderModuleImpl::ShaderModuleImpl(WGPUShaderModule shaderModule, ConvertToBackingContext& convertToBackingContext) 37 : m_backing(shaderModule) 38 , m_convertToBackingContext(convertToBackingContext) 35 RemoteBufferProxy::RemoteBufferProxy(ConvertToBackingContext& convertToBackingContext) 36 : m_convertToBackingContext(convertToBackingContext) 39 37 { 40 38 } 41 39 42 ShaderModuleImpl::~ShaderModuleImpl() 43 { 44 wgpuShaderModuleRelease(m_backing); 45 } 46 47 void ShaderModuleImpl::compilationInfo(std::function<void(Ref<CompilationInfo>&&)>&&) 40 RemoteBufferProxy::~RemoteBufferProxy() 48 41 { 49 42 } 50 43 51 void ShaderModuleImpl::setLabelInternal(const String& label)44 void RemoteBufferProxy::mapAsync(PAL::WebGPU::MapModeFlags mapModeFlags, std::optional<PAL::WebGPU::Size64> offset, std::optional<PAL::WebGPU::Size64> size, WTF::Function<void()>&& callback) 52 45 { 53 wgpuShaderModuleSetLabel(m_backing, label.utf8().data()); 46 UNUSED_PARAM(mapModeFlags); 47 UNUSED_PARAM(offset); 48 UNUSED_PARAM(callback); 54 49 } 55 50 56 } // namespace PAL::WebGPU 51 auto 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 } 57 57 58 #endif // HAVE(WEBGPU_IMPLEMENTATION) 58 void RemoteBufferProxy::unmap() 59 { 60 } 61 62 void RemoteBufferProxy::destroy() 63 { 64 } 65 66 void 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 26 26 #pragma once 27 27 28 #if HAVE(WEBGPU_IMPLEMENTATION)28 #if ENABLE(GPU_PROCESS) 29 29 30 #include "WebGPU Buffer.h"31 #include < WebGPU/WebGPU.h>30 #include "WebGPUIdentifier.h" 31 #include <pal/graphics/WebGPU/WebGPUBuffer.h> 32 32 #include <wtf/Deque.h> 33 33 34 namespace PAL::WebGPU {34 namespace WebKit::WebGPU { 35 35 36 36 class ConvertToBackingContext; 37 37 38 class BufferImpl final : publicBuffer {38 class RemoteBufferProxy final : public PAL::WebGPU::Buffer { 39 39 public: 40 static Ref< BufferImpl> create(WGPUBuffer buffer,ConvertToBackingContext& convertToBackingContext)40 static Ref<RemoteBufferProxy> create(ConvertToBackingContext& convertToBackingContext) 41 41 { 42 return adoptRef(*new BufferImpl(buffer,convertToBackingContext));42 return adoptRef(*new RemoteBufferProxy(convertToBackingContext)); 43 43 } 44 44 45 virtual ~ BufferImpl();45 virtual ~RemoteBufferProxy(); 46 46 47 47 private: 48 48 friend class DowncastConvertToBackingContext; 49 friend void mapCallback(WGPUBufferMapAsyncStatus, void* userdata);50 49 51 BufferImpl(WGPUBuffer,ConvertToBackingContext&);50 RemoteBufferProxy(ConvertToBackingContext&); 52 51 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; 57 56 58 W GPUBuffer backing() const { return m_backing; }57 WebGPUIdentifier backing() const { return m_backing; } 59 58 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; 63 61 void unmap() final; 64 62 … … 67 65 void setLabelInternal(const String&) final; 68 66 69 Deque< std::function<void()>> m_callbacks;67 Deque<WTF::Function<void()>> m_callbacks; 70 68 71 W GPUBuffer m_backing { nullptr};69 WebGPUIdentifier m_backing { WebGPUIdentifier::generate() }; 72 70 Ref<ConvertToBackingContext> m_convertToBackingContext; 73 71 }; 74 72 75 } // namespace PAL::WebGPU73 } // namespace WebKit::WebGPU 76 74 77 #endif // HAVE(WEBGPU_IMPLEMENTATION)75 #endif // ENABLE(GPU_PROCESS) -
trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteCommandBufferProxy.cpp
r285879 r285881 24 24 */ 25 25 26 #pragma once 26 #include "config.h" 27 #include "RemoteCommandBufferProxy.h" 27 28 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) 34 30 35 namespace PAL::WebGPU { 31 #include "WebGPUConvertToBackingContext.h" 36 32 37 struct RenderPassDepthStencilAttachment { 38 TextureView& view; 33 namespace WebKit::WebGPU { 39 34 40 std::variant<LoadOp, float> depthLoadValue; 41 StoreOp depthStoreOp; 42 bool depthReadOnly; 35 RemoteCommandBufferProxy::RemoteCommandBufferProxy(ConvertToBackingContext& convertToBackingContext) 36 : m_convertToBackingContext(convertToBackingContext) 37 { 38 } 43 39 44 std::variant<LoadOp, StencilValue> stencilLoadValue; 45 StoreOp stencilStoreOp; 46 bool stencilReadOnly; 47 }; 40 RemoteCommandBufferProxy::~RemoteCommandBufferProxy() 41 { 42 } 48 43 49 } // namespace PAL::WebGPU 44 void 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 26 26 #pragma once 27 27 28 #if HAVE(WEBGPU_IMPLEMENTATION)28 #if ENABLE(GPU_PROCESS) 29 29 30 #include "WebGPU ShaderModule.h"31 #include < WebGPU/WebGPU.h>30 #include "WebGPUIdentifier.h" 31 #include <pal/graphics/WebGPU/WebGPUCommandBuffer.h> 32 32 33 namespace PAL::WebGPU {33 namespace WebKit::WebGPU { 34 34 35 35 class ConvertToBackingContext; 36 36 37 class ShaderModuleImpl final : public ShaderModule{37 class RemoteCommandBufferProxy final : public PAL::WebGPU::CommandBuffer { 38 38 public: 39 static Ref< ShaderModuleImpl> create(WGPUShaderModule shaderModule,ConvertToBackingContext& convertToBackingContext)39 static Ref<RemoteCommandBufferProxy> create(ConvertToBackingContext& convertToBackingContext) 40 40 { 41 return adoptRef(*new ShaderModuleImpl(shaderModule,convertToBackingContext));41 return adoptRef(*new RemoteCommandBufferProxy(convertToBackingContext)); 42 42 } 43 43 44 virtual ~ ShaderModuleImpl();44 virtual ~RemoteCommandBufferProxy(); 45 45 46 46 private: 47 47 friend class DowncastConvertToBackingContext; 48 48 49 ShaderModuleImpl(WGPUShaderModule,ConvertToBackingContext&);49 RemoteCommandBufferProxy(ConvertToBackingContext&); 50 50 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; 55 55 56 WGPUShaderModule backing() const { return m_backing; } 57 58 void compilationInfo(std::function<void(Ref<CompilationInfo>&&)>&&) final; 56 WebGPUIdentifier backing() const { return m_backing; } 59 57 60 58 void setLabelInternal(const String&) final; 61 59 62 W GPUShaderModule m_backing { nullptr};60 WebGPUIdentifier m_backing { WebGPUIdentifier::generate() }; 63 61 Ref<ConvertToBackingContext> m_convertToBackingContext; 64 62 }; 65 63 66 } // namespace PAL::WebGPU64 } // namespace WebKit::WebGPU 67 65 68 #endif // HAVE(WEBGPU_IMPLEMENTATION)66 #endif // ENABLE(GPU_PROCESS) -
trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteComputePipelineProxy.cpp
r285879 r285881 25 25 26 26 #include "config.h" 27 #include " WebGPUShaderModuleImpl.h"27 #include "RemoteComputePipelineProxy.h" 28 28 29 #if HAVE(WEBGPU_IMPLEMENTATION)29 #if ENABLE(GPU_PROCESS) 30 30 31 #include "RemoteBindGroupLayoutProxy.h" 31 32 #include "WebGPUConvertToBackingContext.h" 32 #include <WebGPU/WebGPUExt.h>33 33 34 namespace PAL::WebGPU {34 namespace WebKit::WebGPU { 35 35 36 ShaderModuleImpl::ShaderModuleImpl(WGPUShaderModule shaderModule, ConvertToBackingContext& convertToBackingContext) 37 : m_backing(shaderModule) 38 , m_convertToBackingContext(convertToBackingContext) 36 RemoteComputePipelineProxy::RemoteComputePipelineProxy(ConvertToBackingContext& convertToBackingContext) 37 : m_convertToBackingContext(convertToBackingContext) 39 38 { 40 39 } 41 40 42 ShaderModuleImpl::~ShaderModuleImpl() 43 { 44 wgpuShaderModuleRelease(m_backing); 45 } 46 47 void ShaderModuleImpl::compilationInfo(std::function<void(Ref<CompilationInfo>&&)>&&) 41 RemoteComputePipelineProxy::~RemoteComputePipelineProxy() 48 42 { 49 43 } 50 44 51 void ShaderModuleImpl::setLabelInternal(const String& label)45 Ref<PAL::WebGPU::BindGroupLayout> RemoteComputePipelineProxy::getBindGroupLayout(uint32_t index) 52 46 { 53 wgpuShaderModuleSetLabel(m_backing, label.utf8().data()); 47 UNUSED_PARAM(index); 48 return RemoteBindGroupLayoutProxy::create(m_convertToBackingContext); 54 49 } 55 50 56 } // namespace PAL::WebGPU 51 void RemoteComputePipelineProxy::setLabelInternal(const String& label) 52 { 53 UNUSED_PARAM(label); 54 } 57 55 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 26 26 #pragma once 27 27 28 #if HAVE(WEBGPU_IMPLEMENTATION)28 #if ENABLE(GPU_PROCESS) 29 29 30 #include "WebGPU ShaderModule.h"31 #include < WebGPU/WebGPU.h>30 #include "WebGPUIdentifier.h" 31 #include <pal/graphics/WebGPU/WebGPUComputePipeline.h> 32 32 33 namespace PAL::WebGPU {33 namespace WebKit::WebGPU { 34 34 35 35 class ConvertToBackingContext; 36 36 37 class ShaderModuleImpl final : public ShaderModule {37 class RemoteComputePipelineProxy final : public PAL::WebGPU::ComputePipeline { 38 38 public: 39 static Ref< ShaderModuleImpl> create(WGPUShaderModule shaderModule,ConvertToBackingContext& convertToBackingContext)39 static Ref<RemoteComputePipelineProxy> create(ConvertToBackingContext& convertToBackingContext) 40 40 { 41 return adoptRef(*new ShaderModuleImpl(shaderModule,convertToBackingContext));41 return adoptRef(*new RemoteComputePipelineProxy(convertToBackingContext)); 42 42 } 43 43 44 virtual ~ ShaderModuleImpl();44 virtual ~RemoteComputePipelineProxy(); 45 45 46 46 private: 47 47 friend class DowncastConvertToBackingContext; 48 48 49 ShaderModuleImpl(WGPUShaderModule,ConvertToBackingContext&);49 RemoteComputePipelineProxy(ConvertToBackingContext&); 50 50 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; 55 55 56 W GPUShaderModulebacking() const { return m_backing; }56 WebGPUIdentifier backing() const { return m_backing; } 57 57 58 void compilationInfo(std::function<void(Ref<CompilationInfo>&&)>&&) final;58 Ref<PAL::WebGPU::BindGroupLayout> getBindGroupLayout(uint32_t index) final; 59 59 60 60 void setLabelInternal(const String&) final; 61 61 62 W GPUShaderModule m_backing { nullptr};62 WebGPUIdentifier m_backing { WebGPUIdentifier::generate() }; 63 63 Ref<ConvertToBackingContext> m_convertToBackingContext; 64 64 }; 65 65 66 } // namespace PAL::WebGPU66 } // namespace WebKit::WebGPU 67 67 68 #endif // HAVE(WEBGPU_IMPLEMENTATION)68 #endif // ENABLE(GPU_PROCESS) -
trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteExternalTextureProxy.cpp
r285879 r285881 24 24 */ 25 25 26 #pragma once 26 #include "config.h" 27 #include "RemoteExternalTextureProxy.h" 27 28 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) 34 30 35 namespace PAL::WebGPU { 31 #include "WebGPUConvertToBackingContext.h" 36 32 37 struct RenderPassDepthStencilAttachment { 38 TextureView& view; 33 namespace WebKit::WebGPU { 39 34 40 std::variant<LoadOp, float> depthLoadValue; 41 StoreOp depthStoreOp; 42 bool depthReadOnly; 35 RemoteExternalTextureProxy::RemoteExternalTextureProxy(ConvertToBackingContext& convertToBackingContext) 36 : m_convertToBackingContext(convertToBackingContext) 37 { 38 } 43 39 44 std::variant<LoadOp, StencilValue> stencilLoadValue; 45 StoreOp stencilStoreOp; 46 bool stencilReadOnly; 47 }; 40 RemoteExternalTextureProxy::~RemoteExternalTextureProxy() 41 { 42 } 48 43 49 } // namespace PAL::WebGPU 44 void 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 26 26 #pragma once 27 27 28 #if HAVE(WEBGPU_IMPLEMENTATION)28 #if ENABLE(GPU_PROCESS) 29 29 30 #include "WebGPU ShaderModule.h"31 #include < WebGPU/WebGPU.h>30 #include "WebGPUIdentifier.h" 31 #include <pal/graphics/WebGPU/WebGPUExternalTexture.h> 32 32 33 namespace PAL::WebGPU {33 namespace WebKit::WebGPU { 34 34 35 35 class ConvertToBackingContext; 36 36 37 class ShaderModuleImpl final : public ShaderModule {37 class RemoteExternalTextureProxy final : public PAL::WebGPU::ExternalTexture { 38 38 public: 39 static Ref< ShaderModuleImpl> create(WGPUShaderModule shaderModule,ConvertToBackingContext& convertToBackingContext)39 static Ref<RemoteExternalTextureProxy> create(ConvertToBackingContext& convertToBackingContext) 40 40 { 41 return adoptRef(*new ShaderModuleImpl(shaderModule,convertToBackingContext));41 return adoptRef(*new RemoteExternalTextureProxy(convertToBackingContext)); 42 42 } 43 43 44 virtual ~ ShaderModuleImpl();44 virtual ~RemoteExternalTextureProxy(); 45 45 46 46 private: 47 47 friend class DowncastConvertToBackingContext; 48 48 49 ShaderModuleImpl(WGPUShaderModule,ConvertToBackingContext&);49 RemoteExternalTextureProxy(ConvertToBackingContext&); 50 50 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; 55 55 56 WGPUShaderModule backing() const { return m_backing; } 57 58 void compilationInfo(std::function<void(Ref<CompilationInfo>&&)>&&) final; 56 WebGPUIdentifier backing() const { return m_backing; } 59 57 60 58 void setLabelInternal(const String&) final; 61 59 62 W GPUShaderModule m_backing { nullptr};60 WebGPUIdentifier m_backing { WebGPUIdentifier::generate() }; 63 61 Ref<ConvertToBackingContext> m_convertToBackingContext; 64 62 }; 65 63 66 } // namespace PAL::WebGPU64 } // namespace WebKit::WebGPU 67 65 68 #endif // HAVE(WEBGPU_IMPLEMENTATION)66 #endif // ENABLE(GPU_PROCESS) -
trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteGPUProxy.cpp
r285879 r285881 24 24 */ 25 25 26 #pragma once 26 #include "config.h" 27 #include "RemoteGPUProxy.h" 27 28 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) 33 30 34 namespace PAL::WebGPU { 31 #include "WebGPUConvertToBackingContext.h" 35 32 36 class Adapter; 33 namespace WebKit::WebGPU { 37 34 38 class GPU : public RefCounted<GPU> { 39 public: 40 virtual ~GPU() = default; 35 RemoteGPUProxy::RemoteGPUProxy(ConvertToBackingContext& convertToBackingContext) 36 : m_convertToBackingContext(convertToBackingContext) 37 { 38 } 41 39 42 virtual void requestAdapter(const RequestAdapterOptions&, std::function<void(RefPtr<Adapter>&&)>&&) = 0; 40 RemoteGPUProxy::~RemoteGPUProxy() 41 { 42 } 43 43 44 protected: 45 GPU() = default; 44 void 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 } 46 49 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 53 51 54 } // namespace PAL::WebGPU 52 #endif // ENABLE(GPU_PROCESS) -
trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteGPUProxy.h
r285879 r285881 26 26 #pragma once 27 27 28 #if HAVE(WEBGPU_IMPLEMENTATION)28 #if ENABLE(GPU_PROCESS) 29 29 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> 32 33 33 namespace PAL::WebGPU {34 namespace WebKit::WebGPU { 34 35 35 36 class ConvertToBackingContext; 36 37 37 class ShaderModuleImpl final : public ShaderModule{38 class RemoteGPUProxy final : public PAL::WebGPU::GPU { 38 39 public: 39 static Ref< ShaderModuleImpl> create(WGPUShaderModule shaderModule,ConvertToBackingContext& convertToBackingContext)40 static Ref<RemoteGPUProxy> create(ConvertToBackingContext& convertToBackingContext) 40 41 { 41 return adoptRef(*new ShaderModuleImpl(shaderModule,convertToBackingContext));42 return adoptRef(*new RemoteGPUProxy(convertToBackingContext)); 42 43 } 43 44 44 virtual ~ ShaderModuleImpl();45 virtual ~RemoteGPUProxy(); 45 46 46 47 private: 47 48 friend class DowncastConvertToBackingContext; 48 49 49 ShaderModuleImpl(WGPUShaderModule,ConvertToBackingContext&);50 RemoteGPUProxy(ConvertToBackingContext&); 50 51 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; 55 56 56 W GPUShaderModulebacking() const { return m_backing; }57 WebGPUIdentifier backing() const { return m_backing; } 57 58 58 void compilationInfo(std::function<void(Ref<CompilationInfo>&&)>&&) final;59 void requestAdapter(const PAL::WebGPU::RequestAdapterOptions&, WTF::Function<void(RefPtr<PAL::WebGPU::Adapter>&&)>&&) final; 59 60 60 void setLabelInternal(const String&) final;61 Deque<WTF::Function<void(RefPtr<PAL::WebGPU::Adapter>&&)>> m_callbacks; 61 62 62 W GPUShaderModule m_backing { nullptr};63 WebGPUIdentifier m_backing { WebGPUIdentifier::generate() }; 63 64 Ref<ConvertToBackingContext> m_convertToBackingContext; 64 65 }; 65 66 66 } // namespace PAL::WebGPU67 } // namespace WebKit::WebGPU 67 68 68 #endif // HAVE(WEBGPU_IMPLEMENTATION)69 #endif // ENABLE(GPU_PROCESS) -
trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemotePipelineLayoutProxy.cpp
r285879 r285881 24 24 */ 25 25 26 #pragma once 26 #include "config.h" 27 #include "RemotePipelineLayoutProxy.h" 27 28 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) 34 30 35 namespace PAL::WebGPU { 31 #include "WebGPUConvertToBackingContext.h" 36 32 37 struct RenderPassDepthStencilAttachment { 38 TextureView& view; 33 namespace WebKit::WebGPU { 39 34 40 std::variant<LoadOp, float> depthLoadValue; 41 StoreOp depthStoreOp; 42 bool depthReadOnly; 35 RemotePipelineLayoutProxy::RemotePipelineLayoutProxy(ConvertToBackingContext& convertToBackingContext) 36 : m_convertToBackingContext(convertToBackingContext) 37 { 38 } 43 39 44 std::variant<LoadOp, StencilValue> stencilLoadValue; 45 StoreOp stencilStoreOp; 46 bool stencilReadOnly; 47 }; 40 RemotePipelineLayoutProxy::~RemotePipelineLayoutProxy() 41 { 42 } 48 43 49 } // namespace PAL::WebGPU 44 void 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 26 26 #pragma once 27 27 28 #if HAVE(WEBGPU_IMPLEMENTATION)28 #if ENABLE(GPU_PROCESS) 29 29 30 #include "WebGPU ShaderModule.h"31 #include < WebGPU/WebGPU.h>30 #include "WebGPUIdentifier.h" 31 #include <pal/graphics/WebGPU/WebGPUPipelineLayout.h> 32 32 33 namespace PAL::WebGPU {33 namespace WebKit::WebGPU { 34 34 35 35 class ConvertToBackingContext; 36 36 37 class ShaderModuleImpl final : public ShaderModule{37 class RemotePipelineLayoutProxy final : public PAL::WebGPU::PipelineLayout { 38 38 public: 39 static Ref< ShaderModuleImpl> create(WGPUShaderModule shaderModule,ConvertToBackingContext& convertToBackingContext)39 static Ref<RemotePipelineLayoutProxy> create(ConvertToBackingContext& convertToBackingContext) 40 40 { 41 return adoptRef(*new ShaderModuleImpl(shaderModule,convertToBackingContext));41 return adoptRef(*new RemotePipelineLayoutProxy(convertToBackingContext)); 42 42 } 43 43 44 virtual ~ ShaderModuleImpl();44 virtual ~RemotePipelineLayoutProxy(); 45 45 46 46 private: 47 47 friend class DowncastConvertToBackingContext; 48 48 49 ShaderModuleImpl(WGPUShaderModule,ConvertToBackingContext&);49 RemotePipelineLayoutProxy(ConvertToBackingContext&); 50 50 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; 55 55 56 WGPUShaderModule backing() const { return m_backing; } 57 58 void compilationInfo(std::function<void(Ref<CompilationInfo>&&)>&&) final; 56 WebGPUIdentifier backing() const { return m_backing; } 59 57 60 58 void setLabelInternal(const String&) final; 61 59 62 W GPUShaderModule m_backing { nullptr};60 WebGPUIdentifier m_backing { WebGPUIdentifier::generate() }; 63 61 Ref<ConvertToBackingContext> m_convertToBackingContext; 64 62 }; 65 63 66 } // namespace PAL::WebGPU64 } // namespace WebKit::WebGPU 67 65 68 #endif // HAVE(WEBGPU_IMPLEMENTATION)66 #endif // ENABLE(GPU_PROCESS) -
trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteQuerySetProxy.cpp
r285879 r285881 24 24 */ 25 25 26 #pragma once 26 #include "config.h" 27 #include "RemoteQuerySetProxy.h" 27 28 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) 34 30 35 namespace PAL::WebGPU { 31 #include "WebGPUConvertToBackingContext.h" 36 32 37 struct RenderPassDepthStencilAttachment { 38 TextureView& view; 33 namespace WebKit::WebGPU { 39 34 40 std::variant<LoadOp, float> depthLoadValue; 41 StoreOp depthStoreOp; 42 bool depthReadOnly; 35 RemoteQuerySetProxy::RemoteQuerySetProxy(ConvertToBackingContext& convertToBackingContext) 36 : m_convertToBackingContext(convertToBackingContext) 37 { 38 } 43 39 44 std::variant<LoadOp, StencilValue> stencilLoadValue; 45 StoreOp stencilStoreOp; 46 bool stencilReadOnly; 47 }; 40 RemoteQuerySetProxy::~RemoteQuerySetProxy() 41 { 42 } 48 43 49 } // namespace PAL::WebGPU 44 void RemoteQuerySetProxy::destroy() 45 { 46 } 47 48 void 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 26 26 #pragma once 27 27 28 #if HAVE(WEBGPU_IMPLEMENTATION)28 #if ENABLE(GPU_PROCESS) 29 29 30 #include "WebGPU ShaderModule.h"31 #include < WebGPU/WebGPU.h>30 #include "WebGPUIdentifier.h" 31 #include <pal/graphics/WebGPU/WebGPUQuerySet.h> 32 32 33 namespace PAL::WebGPU {33 namespace WebKit::WebGPU { 34 34 35 35 class ConvertToBackingContext; 36 36 37 class ShaderModuleImpl final : public ShaderModule{37 class RemoteQuerySetProxy final : public PAL::WebGPU::QuerySet { 38 38 public: 39 static Ref< ShaderModuleImpl> create(WGPUShaderModule shaderModule,ConvertToBackingContext& convertToBackingContext)39 static Ref<RemoteQuerySetProxy> create(ConvertToBackingContext& convertToBackingContext) 40 40 { 41 return adoptRef(*new ShaderModuleImpl(shaderModule,convertToBackingContext));41 return adoptRef(*new RemoteQuerySetProxy(convertToBackingContext)); 42 42 } 43 43 44 virtual ~ ShaderModuleImpl();44 virtual ~RemoteQuerySetProxy(); 45 45 46 46 private: 47 47 friend class DowncastConvertToBackingContext; 48 48 49 ShaderModuleImpl(WGPUShaderModule,ConvertToBackingContext&);49 RemoteQuerySetProxy(ConvertToBackingContext&); 50 50 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; 55 55 56 W GPUShaderModulebacking() const { return m_backing; }56 WebGPUIdentifier backing() const { return m_backing; } 57 57 58 void compilationInfo(std::function<void(Ref<CompilationInfo>&&)>&&) final;58 void destroy() final; 59 59 60 60 void setLabelInternal(const String&) final; 61 61 62 W GPUShaderModule m_backing { nullptr};62 WebGPUIdentifier m_backing { WebGPUIdentifier::generate() }; 63 63 Ref<ConvertToBackingContext> m_convertToBackingContext; 64 64 }; 65 65 66 } // namespace PAL::WebGPU66 } // namespace WebKit::WebGPU 67 67 68 #endif // HAVE(WEBGPU_IMPLEMENTATION)68 #endif // ENABLE(GPU_PROCESS) -
trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteQueueProxy.h
r285879 r285881 26 26 #pragma once 27 27 28 #if HAVE(WEBGPU_IMPLEMENTATION)28 #if ENABLE(GPU_PROCESS) 29 29 30 #include "WebGPU Queue.h"31 #include < WebGPU/WebGPU.h>30 #include "WebGPUIdentifier.h" 31 #include <pal/graphics/WebGPU/WebGPUQueue.h> 32 32 #include <wtf/Deque.h> 33 33 34 namespace PAL::WebGPU {34 namespace WebKit::WebGPU { 35 35 36 36 class ConvertToBackingContext; 37 37 38 class QueueImpl final : publicQueue {38 class RemoteQueueProxy final : public PAL::WebGPU::Queue { 39 39 public: 40 static Ref< QueueImpl> create(WGPUQueue queue,ConvertToBackingContext& convertToBackingContext)40 static Ref<RemoteQueueProxy> create(ConvertToBackingContext& convertToBackingContext) 41 41 { 42 return adoptRef(*new QueueImpl(queue,convertToBackingContext));42 return adoptRef(*new RemoteQueueProxy(convertToBackingContext)); 43 43 } 44 44 45 virtual ~ QueueImpl();45 virtual ~RemoteQueueProxy(); 46 46 47 47 private: 48 48 friend class DowncastConvertToBackingContext; 49 friend void onSubmittedWorkDoneCallback(WGPUQueueWorkDoneStatus, void* userdata);50 49 51 QueueImpl(WGPUQueue,ConvertToBackingContext&);50 RemoteQueueProxy(ConvertToBackingContext&); 52 51 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; 57 56 58 W GPUQueuebacking() const { return m_backing; }57 WebGPUIdentifier backing() const { return m_backing; } 59 58 60 void submit(Vector<std::reference_wrapper< CommandBuffer>>&&) final;59 void submit(Vector<std::reference_wrapper<PAL::WebGPU::CommandBuffer>>&&) final; 61 60 62 void onSubmittedWorkDoneCallback(WGPUQueueWorkDoneStatus); 63 void onSubmittedWorkDone(std::function<void()>&&) final; 61 void onSubmittedWorkDone(WTF::Function<void()>&&) final; 64 62 65 63 void writeBuffer( 66 const Buffer&,67 Size64 bufferOffset,64 const PAL::WebGPU::Buffer&, 65 PAL::WebGPU::Size64 bufferOffset, 68 66 const void* source, 69 67 size_t byteLength, 70 Size64 dataOffset,71 std::optional< Size64>) final;68 PAL::WebGPU::Size64 dataOffset, 69 std::optional<PAL::WebGPU::Size64>) final; 72 70 73 71 void writeTexture( 74 const ImageCopyTexture& destination,72 const PAL::WebGPU::ImageCopyTexture& destination, 75 73 const void* source, 76 74 size_t byteLength, 77 const ImageDataLayout&,78 const Extent3D& size) final;75 const PAL::WebGPU::ImageDataLayout&, 76 const PAL::WebGPU::Extent3D& size) final; 79 77 80 78 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; 84 82 85 83 void setLabelInternal(const String&) final; 86 84 87 uint64_t m_signalValue { 1 };85 Deque<WTF::Function<void()>> m_callbacks; 88 86 89 Deque<std::function<void()>> m_callbacks; 90 91 WGPUQueue m_backing { nullptr }; 87 WebGPUIdentifier m_backing { WebGPUIdentifier::generate() }; 92 88 Ref<ConvertToBackingContext> m_convertToBackingContext; 93 89 }; 94 90 95 } // namespace PAL::WebGPU91 } // namespace WebKit::WebGPU 96 92 97 #endif // HAVE(WEBGPU_IMPLEMENTATION)93 #endif // ENABLE(GPU_PROCESS) -
trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteRenderBundleProxy.cpp
r285879 r285881 24 24 */ 25 25 26 #pragma once 26 #include "config.h" 27 #include "RemoteRenderBundleProxy.h" 27 28 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) 34 30 35 namespace PAL::WebGPU { 31 #include "WebGPUConvertToBackingContext.h" 36 32 37 struct RenderPassDepthStencilAttachment { 38 TextureView& view; 33 namespace WebKit::WebGPU { 39 34 40 std::variant<LoadOp, float> depthLoadValue; 41 StoreOp depthStoreOp; 42 bool depthReadOnly; 35 RemoteRenderBundleProxy::RemoteRenderBundleProxy(ConvertToBackingContext& convertToBackingContext) 36 : m_convertToBackingContext(convertToBackingContext) 37 { 38 } 43 39 44 std::variant<LoadOp, StencilValue> stencilLoadValue; 45 StoreOp stencilStoreOp; 46 bool stencilReadOnly; 47 }; 40 RemoteRenderBundleProxy::~RemoteRenderBundleProxy() 41 { 42 } 48 43 49 } // namespace PAL::WebGPU 44 void 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 26 26 #pragma once 27 27 28 #if HAVE(WEBGPU_IMPLEMENTATION)28 #if ENABLE(GPU_PROCESS) 29 29 30 #include "WebGPU ShaderModule.h"31 #include < WebGPU/WebGPU.h>30 #include "WebGPUIdentifier.h" 31 #include <pal/graphics/WebGPU/WebGPURenderBundle.h> 32 32 33 namespace PAL::WebGPU {33 namespace WebKit::WebGPU { 34 34 35 35 class ConvertToBackingContext; 36 36 37 class ShaderModuleImpl final : public ShaderModule {37 class RemoteRenderBundleProxy final : public PAL::WebGPU::RenderBundle { 38 38 public: 39 static Ref< ShaderModuleImpl> create(WGPUShaderModule shaderModule,ConvertToBackingContext& convertToBackingContext)39 static Ref<RemoteRenderBundleProxy> create(ConvertToBackingContext& convertToBackingContext) 40 40 { 41 return adoptRef(*new ShaderModuleImpl(shaderModule,convertToBackingContext));41 return adoptRef(*new RemoteRenderBundleProxy(convertToBackingContext)); 42 42 } 43 43 44 virtual ~ ShaderModuleImpl();44 virtual ~RemoteRenderBundleProxy(); 45 45 46 46 private: 47 47 friend class DowncastConvertToBackingContext; 48 48 49 ShaderModuleImpl(WGPUShaderModule,ConvertToBackingContext&);49 RemoteRenderBundleProxy(ConvertToBackingContext&); 50 50 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; 55 55 56 WGPUShaderModule backing() const { return m_backing; } 57 58 void compilationInfo(std::function<void(Ref<CompilationInfo>&&)>&&) final; 56 WebGPUIdentifier backing() const { return m_backing; } 59 57 60 58 void setLabelInternal(const String&) final; 61 59 62 W GPUShaderModule m_backing { nullptr};60 WebGPUIdentifier m_backing { WebGPUIdentifier::generate() }; 63 61 Ref<ConvertToBackingContext> m_convertToBackingContext; 64 62 }; 65 63 66 } // namespace PAL::WebGPU64 } // namespace WebKit::WebGPU 67 65 68 #endif // HAVE(WEBGPU_IMPLEMENTATION)66 #endif // ENABLE(GPU_PROCESS) -
trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteRenderPipelineProxy.cpp
r285879 r285881 25 25 26 26 #include "config.h" 27 #include " WebGPUShaderModuleImpl.h"27 #include "RemoteRenderPipelineProxy.h" 28 28 29 #if HAVE(WEBGPU_IMPLEMENTATION)29 #if ENABLE(GPU_PROCESS) 30 30 31 #include "RemoteBindGroupLayoutProxy.h" 31 32 #include "WebGPUConvertToBackingContext.h" 32 #include <WebGPU/WebGPUExt.h>33 33 34 namespace PAL::WebGPU {34 namespace WebKit::WebGPU { 35 35 36 ShaderModuleImpl::ShaderModuleImpl(WGPUShaderModule shaderModule, ConvertToBackingContext& convertToBackingContext) 37 : m_backing(shaderModule) 38 , m_convertToBackingContext(convertToBackingContext) 36 RemoteRenderPipelineProxy::RemoteRenderPipelineProxy(ConvertToBackingContext& convertToBackingContext) 37 : m_convertToBackingContext(convertToBackingContext) 39 38 { 40 39 } 41 40 42 ShaderModuleImpl::~ShaderModuleImpl() 43 { 44 wgpuShaderModuleRelease(m_backing); 45 } 46 47 void ShaderModuleImpl::compilationInfo(std::function<void(Ref<CompilationInfo>&&)>&&) 41 RemoteRenderPipelineProxy::~RemoteRenderPipelineProxy() 48 42 { 49 43 } 50 44 51 void ShaderModuleImpl::setLabelInternal(const String& label)45 Ref<PAL::WebGPU::BindGroupLayout> RemoteRenderPipelineProxy::getBindGroupLayout(uint32_t index) 52 46 { 53 wgpuShaderModuleSetLabel(m_backing, label.utf8().data()); 47 UNUSED_PARAM(index); 48 return RemoteBindGroupLayoutProxy::create(m_convertToBackingContext); 54 49 } 55 50 56 } // namespace PAL::WebGPU 51 void RemoteRenderPipelineProxy::setLabelInternal(const String& label) 52 { 53 UNUSED_PARAM(label); 54 } 57 55 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 26 26 #pragma once 27 27 28 #if HAVE(WEBGPU_IMPLEMENTATION)28 #if ENABLE(GPU_PROCESS) 29 29 30 #include "WebGPU ShaderModule.h"31 #include < WebGPU/WebGPU.h>30 #include "WebGPUIdentifier.h" 31 #include <pal/graphics/WebGPU/WebGPURenderPipeline.h> 32 32 33 namespace PAL::WebGPU {33 namespace WebKit::WebGPU { 34 34 35 35 class ConvertToBackingContext; 36 36 37 class ShaderModuleImpl final : public ShaderModule {37 class RemoteRenderPipelineProxy final : public PAL::WebGPU::RenderPipeline { 38 38 public: 39 static Ref< ShaderModuleImpl> create(WGPUShaderModule shaderModule,ConvertToBackingContext& convertToBackingContext)39 static Ref<RemoteRenderPipelineProxy> create(ConvertToBackingContext& convertToBackingContext) 40 40 { 41 return adoptRef(*new ShaderModuleImpl(shaderModule,convertToBackingContext));41 return adoptRef(*new RemoteRenderPipelineProxy(convertToBackingContext)); 42 42 } 43 43 44 virtual ~ ShaderModuleImpl();44 virtual ~RemoteRenderPipelineProxy(); 45 45 46 46 private: 47 47 friend class DowncastConvertToBackingContext; 48 48 49 ShaderModuleImpl(WGPUShaderModule,ConvertToBackingContext&);49 RemoteRenderPipelineProxy(ConvertToBackingContext&); 50 50 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; 55 55 56 W GPUShaderModulebacking() const { return m_backing; }56 WebGPUIdentifier backing() const { return m_backing; } 57 57 58 void compilationInfo(std::function<void(Ref<CompilationInfo>&&)>&&) final;58 Ref<PAL::WebGPU::BindGroupLayout> getBindGroupLayout(uint32_t index) final; 59 59 60 60 void setLabelInternal(const String&) final; 61 61 62 W GPUShaderModule m_backing { nullptr};62 WebGPUIdentifier m_backing { WebGPUIdentifier::generate() }; 63 63 Ref<ConvertToBackingContext> m_convertToBackingContext; 64 64 }; 65 65 66 } // namespace PAL::WebGPU66 } // namespace WebKit::WebGPU 67 67 68 #endif // HAVE(WEBGPU_IMPLEMENTATION)68 #endif // ENABLE(GPU_PROCESS) -
trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteSamplerProxy.cpp
r285879 r285881 24 24 */ 25 25 26 #pragma once 26 #include "config.h" 27 #include "RemoteSamplerProxy.h" 27 28 28 #include "WebGPUShaderModule.h" 29 #include <wtf/KeyValuePair.h> 30 #include <wtf/Ref.h> 31 #include <wtf/Vector.h> 29 #if ENABLE(GPU_PROCESS) 32 30 33 namespace PAL::WebGPU { 31 #include "WebGPUConvertToBackingContext.h" 34 32 35 using PipelineConstantValue = double; // May represent WGSL’s bool, f32, i32, u32. 33 namespace WebKit::WebGPU { 36 34 37 struct ProgrammableStage { 38 ShaderModule& module; 39 String entryPoint; 40 Vector<KeyValuePair<String, PipelineConstantValue>> constants; 41 }; 35 RemoteSamplerProxy::RemoteSamplerProxy(ConvertToBackingContext& convertToBackingContext) 36 : m_convertToBackingContext(convertToBackingContext) 37 { 38 } 42 39 43 } // namespace PAL::WebGPU 40 RemoteSamplerProxy::~RemoteSamplerProxy() 41 { 42 } 43 44 void 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 26 26 #pragma once 27 27 28 #if HAVE(WEBGPU_IMPLEMENTATION)28 #if ENABLE(GPU_PROCESS) 29 29 30 #include "WebGPU ShaderModule.h"31 #include < WebGPU/WebGPU.h>30 #include "WebGPUIdentifier.h" 31 #include <pal/graphics/WebGPU/WebGPUSampler.h> 32 32 33 namespace PAL::WebGPU {33 namespace WebKit::WebGPU { 34 34 35 35 class ConvertToBackingContext; 36 36 37 class ShaderModuleImpl final : public ShaderModule{37 class RemoteSamplerProxy final : public PAL::WebGPU::Sampler { 38 38 public: 39 static Ref< ShaderModuleImpl> create(WGPUShaderModule shaderModule,ConvertToBackingContext& convertToBackingContext)39 static Ref<RemoteSamplerProxy> create(ConvertToBackingContext& convertToBackingContext) 40 40 { 41 return adoptRef(*new ShaderModuleImpl(shaderModule,convertToBackingContext));41 return adoptRef(*new RemoteSamplerProxy(convertToBackingContext)); 42 42 } 43 43 44 virtual ~ ShaderModuleImpl();44 virtual ~RemoteSamplerProxy(); 45 45 46 46 private: 47 47 friend class DowncastConvertToBackingContext; 48 48 49 ShaderModuleImpl(WGPUShaderModule,ConvertToBackingContext&);49 RemoteSamplerProxy(ConvertToBackingContext&); 50 50 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; 55 55 56 WGPUShaderModule backing() const { return m_backing; } 57 58 void compilationInfo(std::function<void(Ref<CompilationInfo>&&)>&&) final; 56 WebGPUIdentifier backing() const { return m_backing; } 59 57 60 58 void setLabelInternal(const String&) final; 61 59 62 W GPUShaderModule m_backing { nullptr};60 WebGPUIdentifier m_backing { WebGPUIdentifier::generate() }; 63 61 Ref<ConvertToBackingContext> m_convertToBackingContext; 64 62 }; 65 63 66 } // namespace PAL::WebGPU64 } // namespace WebKit::WebGPU 67 65 68 #endif // HAVE(WEBGPU_IMPLEMENTATION)66 #endif // ENABLE(GPU_PROCESS) -
trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteShaderModuleProxy.cpp
r285879 r285881 25 25 26 26 #include "config.h" 27 #include " WebGPUShaderModuleImpl.h"27 #include "RemoteShaderModuleProxy.h" 28 28 29 #if HAVE(WEBGPU_IMPLEMENTATION)29 #if ENABLE(GPU_PROCESS) 30 30 31 31 #include "WebGPUConvertToBackingContext.h" 32 #include <WebGPU/WebGPUExt.h>33 32 34 namespace PAL::WebGPU {33 namespace WebKit::WebGPU { 35 34 36 ShaderModuleImpl::ShaderModuleImpl(WGPUShaderModule shaderModule, ConvertToBackingContext& convertToBackingContext) 37 : m_backing(shaderModule) 38 , m_convertToBackingContext(convertToBackingContext) 35 RemoteShaderModuleProxy::RemoteShaderModuleProxy(ConvertToBackingContext& convertToBackingContext) 36 : m_convertToBackingContext(convertToBackingContext) 39 37 { 40 38 } 41 39 42 ShaderModuleImpl::~ShaderModuleImpl() 43 { 44 wgpuShaderModuleRelease(m_backing); 45 } 46 47 void ShaderModuleImpl::compilationInfo(std::function<void(Ref<CompilationInfo>&&)>&&) 40 RemoteShaderModuleProxy::~RemoteShaderModuleProxy() 48 41 { 49 42 } 50 43 51 void ShaderModuleImpl::setLabelInternal(const String& label)44 void RemoteShaderModuleProxy::compilationInfo(WTF::Function<void(Ref<PAL::WebGPU::CompilationInfo>&&)>&& callback) 52 45 { 53 wgpuShaderModuleSetLabel(m_backing, label.utf8().data());46 UNUSED_PARAM(callback); 54 47 } 55 48 56 } // namespace PAL::WebGPU 49 void RemoteShaderModuleProxy::setLabelInternal(const String& label) 50 { 51 UNUSED_PARAM(label); 52 } 57 53 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 26 26 #pragma once 27 27 28 #if HAVE(WEBGPU_IMPLEMENTATION)28 #if ENABLE(GPU_PROCESS) 29 29 30 #include "WebGPU ShaderModule.h"31 #include < WebGPU/WebGPU.h>30 #include "WebGPUIdentifier.h" 31 #include <pal/graphics/WebGPU/WebGPUShaderModule.h> 32 32 33 namespace PAL::WebGPU {33 namespace WebKit::WebGPU { 34 34 35 35 class ConvertToBackingContext; 36 36 37 class ShaderModuleImpl final : publicShaderModule {37 class RemoteShaderModuleProxy final : public PAL::WebGPU::ShaderModule { 38 38 public: 39 static Ref< ShaderModuleImpl> create(WGPUShaderModule shaderModule,ConvertToBackingContext& convertToBackingContext)39 static Ref<RemoteShaderModuleProxy> create(ConvertToBackingContext& convertToBackingContext) 40 40 { 41 return adoptRef(*new ShaderModuleImpl(shaderModule,convertToBackingContext));41 return adoptRef(*new RemoteShaderModuleProxy(convertToBackingContext)); 42 42 } 43 43 44 virtual ~ ShaderModuleImpl();44 virtual ~RemoteShaderModuleProxy(); 45 45 46 46 private: 47 47 friend class DowncastConvertToBackingContext; 48 48 49 ShaderModuleImpl(WGPUShaderModule,ConvertToBackingContext&);49 RemoteShaderModuleProxy(ConvertToBackingContext&); 50 50 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; 55 55 56 W GPUShaderModulebacking() const { return m_backing; }56 WebGPUIdentifier backing() const { return m_backing; } 57 57 58 void compilationInfo( std::function<void(Ref<CompilationInfo>&&)>&&) final;58 void compilationInfo(WTF::Function<void(Ref<PAL::WebGPU::CompilationInfo>&&)>&&) final; 59 59 60 60 void setLabelInternal(const String&) final; 61 61 62 W GPUShaderModule m_backing { nullptr};62 WebGPUIdentifier m_backing { WebGPUIdentifier::generate() }; 63 63 Ref<ConvertToBackingContext> m_convertToBackingContext; 64 64 }; 65 65 66 } // namespace PAL::WebGPU66 } // namespace WebKit::WebGPU 67 67 68 #endif // HAVE(WEBGPU_IMPLEMENTATION)68 #endif // ENABLE(GPU_PROCESS) -
trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteTextureProxy.cpp
r285879 r285881 25 25 26 26 #include "config.h" 27 #include " WebGPUShaderModuleImpl.h"27 #include "RemoteTextureProxy.h" 28 28 29 #if HAVE(WEBGPU_IMPLEMENTATION)29 #if ENABLE(GPU_PROCESS) 30 30 31 #include "RemoteTextureViewProxy.h" 31 32 #include "WebGPUConvertToBackingContext.h" 32 #include <WebGPU/WebGPUExt.h>33 33 34 namespace PAL::WebGPU {34 namespace WebKit::WebGPU { 35 35 36 ShaderModuleImpl::ShaderModuleImpl(WGPUShaderModule shaderModule, ConvertToBackingContext& convertToBackingContext) 37 : m_backing(shaderModule) 38 , m_convertToBackingContext(convertToBackingContext) 36 RemoteTextureProxy::RemoteTextureProxy(ConvertToBackingContext& convertToBackingContext) 37 : m_convertToBackingContext(convertToBackingContext) 39 38 { 40 39 } 41 40 42 ShaderModuleImpl::~ShaderModuleImpl() 43 { 44 wgpuShaderModuleRelease(m_backing); 45 } 46 47 void ShaderModuleImpl::compilationInfo(std::function<void(Ref<CompilationInfo>&&)>&&) 41 RemoteTextureProxy::~RemoteTextureProxy() 48 42 { 49 43 } 50 44 51 void ShaderModuleImpl::setLabelInternal(const String& label) 45 Ref<PAL::WebGPU::TextureView> RemoteTextureProxy::createView(const std::optional<PAL::WebGPU::TextureViewDescriptor>& descriptor) const 52 46 { 53 wgpuShaderModuleSetLabel(m_backing, label.utf8().data()); 47 UNUSED_PARAM(descriptor); 48 return RemoteTextureViewProxy::create(m_convertToBackingContext); 54 49 } 55 50 56 } // namespace PAL::WebGPU 51 void RemoteTextureProxy::destroy() 52 { 53 } 57 54 58 #endif // HAVE(WEBGPU_IMPLEMENTATION) 55 void 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 26 26 #pragma once 27 27 28 #if HAVE(WEBGPU_IMPLEMENTATION)28 #if ENABLE(GPU_PROCESS) 29 29 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> 33 35 34 namespace PAL::WebGPU {36 namespace WebKit::WebGPU { 35 37 36 38 class ConvertToBackingContext; 37 39 38 class BufferImpl final : public Buffer{40 class RemoteTextureProxy final : public PAL::WebGPU::Texture { 39 41 public: 40 static Ref< BufferImpl> create(WGPUBuffer buffer,ConvertToBackingContext& convertToBackingContext)42 static Ref<RemoteTextureProxy> create(ConvertToBackingContext& convertToBackingContext) 41 43 { 42 return adoptRef(*new BufferImpl(buffer,convertToBackingContext));44 return adoptRef(*new RemoteTextureProxy(convertToBackingContext)); 43 45 } 44 46 45 virtual ~ BufferImpl();47 virtual ~RemoteTextureProxy(); 46 48 47 49 private: 48 50 friend class DowncastConvertToBackingContext; 49 friend void mapCallback(WGPUBufferMapAsyncStatus, void* userdata);50 51 51 BufferImpl(WGPUBuffer,ConvertToBackingContext&);52 RemoteTextureProxy(ConvertToBackingContext&); 52 53 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; 57 58 58 W GPUBuffer backing() const { return m_backing; }59 WebGPUIdentifier backing() const { return m_backing; } 59 60 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; 64 62 65 63 void destroy() final; … … 67 65 void setLabelInternal(const String&) final; 68 66 69 Deque<std::function<void()>> m_callbacks; 70 71 WGPUBuffer m_backing { nullptr }; 67 WebGPUIdentifier m_backing { WebGPUIdentifier::generate() }; 72 68 Ref<ConvertToBackingContext> m_convertToBackingContext; 73 69 }; 74 70 75 } // namespace PAL::WebGPU71 } // namespace WebKit::WebGPU 76 72 77 #endif // HAVE(WEBGPU_IMPLEMENTATION)73 #endif // ENABLE(GPU_PROCESS) -
trunk/Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteTextureViewProxy.cpp
r285879 r285881 24 24 */ 25 25 26 #pragma once 26 #include "config.h" 27 #include "RemoteTextureViewProxy.h" 27 28 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) 34 30 35 namespace PAL::WebGPU { 31 #include "WebGPUConvertToBackingContext.h" 36 32 37 struct RenderPassDepthStencilAttachment { 38 TextureView& view; 33 namespace WebKit::WebGPU { 39 34 40 std::variant<LoadOp, float> depthLoadValue; 41 StoreOp depthStoreOp; 42 bool depthReadOnly; 35 RemoteTextureViewProxy::RemoteTextureViewProxy(ConvertToBackingContext& convertToBackingContext) 36 : m_convertToBackingContext(convertToBackingContext) 37 { 38 } 43 39 44 std::variant<LoadOp, StencilValue> stencilLoadValue; 45 StoreOp stencilStoreOp; 46 bool stencilReadOnly; 47 }; 40 RemoteTextureViewProxy::~RemoteTextureViewProxy() 41 { 42 } 48 43 49 } // namespace PAL::WebGPU 44 void 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 26 26 #pragma once 27 27 28 #if HAVE(WEBGPU_IMPLEMENTATION)28 #if ENABLE(GPU_PROCESS) 29 29 30 #include "WebGPU ShaderModule.h"31 #include < WebGPU/WebGPU.h>30 #include "WebGPUIdentifier.h" 31 #include <pal/graphics/WebGPU/WebGPUTextureView.h> 32 32 33 namespace PAL::WebGPU {33 namespace WebKit::WebGPU { 34 34 35 35 class ConvertToBackingContext; 36 36 37 class ShaderModuleImpl final : public ShaderModule{37 class RemoteTextureViewProxy final : public PAL::WebGPU::TextureView { 38 38 public: 39 static Ref< ShaderModuleImpl> create(WGPUShaderModule shaderModule,ConvertToBackingContext& convertToBackingContext)39 static Ref<RemoteTextureViewProxy> create(ConvertToBackingContext& convertToBackingContext) 40 40 { 41 return adoptRef(*new ShaderModuleImpl(shaderModule,convertToBackingContext));41 return adoptRef(*new RemoteTextureViewProxy(convertToBackingContext)); 42 42 } 43 43 44 virtual ~ ShaderModuleImpl();44 virtual ~RemoteTextureViewProxy(); 45 45 46 46 private: 47 47 friend class DowncastConvertToBackingContext; 48 48 49 ShaderModuleImpl(WGPUShaderModule,ConvertToBackingContext&);49 RemoteTextureViewProxy(ConvertToBackingContext&); 50 50 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; 55 55 56 WGPUShaderModule backing() const { return m_backing; } 57 58 void compilationInfo(std::function<void(Ref<CompilationInfo>&&)>&&) final; 56 WebGPUIdentifier backing() const { return m_backing; } 59 57 60 58 void setLabelInternal(const String&) final; 61 59 62 W GPUShaderModule m_backing { nullptr};60 WebGPUIdentifier m_backing { WebGPUIdentifier::generate() }; 63 61 Ref<ConvertToBackingContext> m_convertToBackingContext; 64 62 }; 65 63 66 } // namespace PAL::WebGPU64 } // namespace WebKit::WebGPU 67 65 68 #endif // HAVE(WEBGPU_IMPLEMENTATION)66 #endif // ENABLE(GPU_PROCESS) -
trunk/Source/WebKit/WebProcess/GPU/graphics/cocoa/ImageBufferShareableIOSurfaceBackend.cpp
r284991 r285881 31 31 #include <WebCore/GraphicsContextCG.h> 32 32 #include <WebCore/ImageBufferIOSurfaceBackend.h> 33 #include <WebCore/PixelBuffer.h> 33 34 #include <wtf/IsoMallocInlines.h> 34 35 #include <wtf/StdLibExtras.h>
Note:
See TracChangeset
for help on using the changeset viewer.