[webkit-changes] [WebKit/WebKit] cb91b7: [WebGPU] Implement GPUExternalTexture

mwyrzykowski noreply at github.com
Tue May 16 00:45:18 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: cb91b749f30d1cc1bb01bfce9adbe18ad3cea698
      https://github.com/WebKit/WebKit/commit/cb91b749f30d1cc1bb01bfce9adbe18ad3cea698
  Author: Mike Wyrzykowski <mwyrzykowski at apple.com>
  Date:   2023-05-16 (Tue, 16 May 2023)

  Changed paths:
    M Source/WTF/wtf/PlatformHave.h
    M Source/WebCore/Modules/WebGPU/GPUExternalTextureDescriptor.h
    M Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUConvertToBackingContext.h
    M Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUDeviceImpl.cpp
    M Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUDowncastConvertToBackingContext.cpp
    M Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUDowncastConvertToBackingContext.h
    M Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUExternalTextureImpl.cpp
    M Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUExternalTextureImpl.h
    M Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUExternalTextureDescriptor.h
    M Source/WebCore/PAL/pal/graphics/WebGPU/WebGPUPredefinedColorSpace.h
    M Source/WebGPU/WebGPU.xcodeproj/project.pbxproj
    M Source/WebGPU/WebGPU/APIConversions.h
    M Source/WebGPU/WebGPU/BindGroup.mm
    M Source/WebGPU/WebGPU/BindGroupLayout.mm
    M Source/WebGPU/WebGPU/Device.h
    M Source/WebGPU/WebGPU/Device.mm
    A Source/WebGPU/WebGPU/ExternalTexture.h
    A Source/WebGPU/WebGPU/ExternalTexture.mm
    M Source/WebGPU/WebGPU/WebGPUExt.h
    M Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp
    M Source/WebKit/GPUProcess/graphics/WebGPU/RemoteAdapter.cpp
    M Source/WebKit/GPUProcess/graphics/WebGPU/RemoteAdapter.h
    M Source/WebKit/GPUProcess/graphics/WebGPU/RemoteDevice.cpp
    M Source/WebKit/GPUProcess/graphics/WebGPU/RemoteDevice.h
    M Source/WebKit/GPUProcess/graphics/WebGPU/RemoteGPU.cpp
    M Source/WebKit/GPUProcess/graphics/WebGPU/RemoteGPU.h
    M Source/WebKit/Shared/WebGPU/WebGPUExternalTextureDescriptor.cpp
    M Source/WebKit/Shared/WebGPU/WebGPUExternalTextureDescriptor.h
    M Source/WebKit/Shared/WebGPU/WebGPUExternalTextureDescriptor.serialization.in
    A Websites/webkit.org/demos/webgpu/external-textured-cube.html
    A Websites/webkit.org/demos/webgpu/scripts/external-textured-cube.js

  Log Message:
  -----------
  [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




More information about the webkit-changes mailing list