forked from WebKit/WebKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WebGPU] Implement GPUExternalTexture
https://bugs.webkit.org/show_bug.cgi?id=255883 <radar://108463707> Reviewed by Myles C. Maxfield. Implement GPUExternalTexture and pass it through to WebGPU.framework. * Source/WebCore/Modules/WebGPU/GPUExternalTextureDescriptor.h: (WebCore::GPUExternalTextureDescriptor::convertToBacking const): * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUConvertToBackingContext.h: * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUDeviceImpl.cpp: (PAL::WebGPU::DeviceImpl::importExternalTexture): (PAL::WebGPU::DeviceImpl::createBindGroupLayout): (PAL::WebGPU::DeviceImpl::createBindGroup): * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUDowncastConvertToBackingContext.cpp: (PAL::WebGPU::DowncastConvertToBackingContext::convertToBacking): * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUDowncastConvertToBackingContext.h: * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUExternalTextureImpl.cpp: (PAL::WebGPU::ExternalTextureImpl::ExternalTextureImpl): * Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUExternalTextureImpl.h: * Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUExternalTextureDescriptor.h: * Source/WebGPU/WebGPU.xcodeproj/project.pbxproj: * Source/WebGPU/WebGPU/APIConversions.h: (WebGPU::fromAPI): * Source/WebGPU/WebGPU/BindGroup.mm: (WebGPU::Device::createBindGroup): * Source/WebGPU/WebGPU/Device.h: * Source/WebGPU/WebGPU/Device.mm: (WebGPU::Device::Device): (WebGPU::metalPixelFormatForCVPixelBuffer): (WebGPU::Device::createTextureFromPixelBuffer const): (wgpuDeviceCreateExternalTexture): * Source/WebGPU/WebGPU/ExternalTexture.h: Added. (WebGPU::ExternalTexture::create): (WebGPU::ExternalTexture::createInvalid): (WebGPU::ExternalTexture::pixelBuffer const): * Source/WebGPU/WebGPU/ExternalTexture.mm: Added. (WebGPU::Device::createExternalTexture): (WebGPU::ExternalTexture::ExternalTexture): * Source/WebGPU/WebGPU/WebGPUExt.h: * Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp: (WebKit::RemoteRenderingBackend::createRemoteGPU): * Source/WebKit/GPUProcess/graphics/WebGPU/RemoteAdapter.cpp: (WebKit::RemoteAdapter::RemoteAdapter): (WebKit::RemoteAdapter::requestDevice): * Source/WebKit/GPUProcess/graphics/WebGPU/RemoteAdapter.h: * Source/WebKit/GPUProcess/graphics/WebGPU/RemoteDevice.cpp: (WebKit::RemoteDevice::RemoteDevice): (WebKit::RemoteDevice::importExternalTexture): * Source/WebKit/GPUProcess/graphics/WebGPU/RemoteDevice.h: * Source/WebKit/GPUProcess/graphics/WebGPU/RemoteGPU.cpp: (WebKit::RemoteGPU::RemoteGPU): (WebKit::RemoteGPU::remoteRenderingBackend const): (WebKit::RemoteGPU::requestAdapter): * Source/WebKit/GPUProcess/graphics/WebGPU/RemoteGPU.h: * Source/WebKit/GPUProcess/graphics/WebGPU/RemoteRenderPassEncoder.cpp: (WebKit::RemoteRenderPassEncoder::setBindGroup): * Source/WebKit/Shared/WebGPU/WebGPUExternalTextureDescriptor.cpp: (WebKit::WebGPU::ConvertToBackingContext::convertToBacking): (WebKit::WebGPU::ConvertFromBackingContext::convertFromBacking): * Source/WebKit/Shared/WebGPU/WebGPUExternalTextureDescriptor.h: * Source/WebKit/Shared/WebGPU/WebGPUExternalTextureDescriptor.serialization.in: * Websites/webkit.org/demos/webgpu/external-textured-cube.html: Added. * Websites/webkit.org/demos/webgpu/scripts/external-textured-cube.js: Added. (async helloCube.frameUpdate): (async helloCube): Canonical link: https://commits.webkit.org/264108@main
- Loading branch information
1 parent
4a2d770
commit cb91b74
Showing
31 changed files
with
798 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.