[webkit-changes] [WebKit/WebKit] 936c42: [WebGPU] Give BindGroupLayouts a notion of externa...

Myles C. Maxfield noreply at github.com
Tue May 23 13:10:44 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 936c42734f58a0b09f482a6ba86ba339cfa71164
      https://github.com/WebKit/WebKit/commit/936c42734f58a0b09f482a6ba86ba339cfa71164
  Author: Myles C. Maxfield <mmaxfield at apple.com>
  Date:   2023-05-23 (Tue, 23 May 2023)

  Changed paths:
    M Source/WebCore/Modules/WebGPU/GPUExternalTextureBindingLayout.idl
    M Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUDeviceImpl.cpp
    M Source/WebCore/html/canvas/GPUCanvasContextCocoa.mm
    M Source/WebGPU/WGSL/WGSL.h
    M Source/WebGPU/WebGPU/BindGroup.mm
    M Source/WebGPU/WebGPU/BindGroupLayout.h
    M Source/WebGPU/WebGPU/BindGroupLayout.mm
    M Source/WebGPU/WebGPU/Instance.h
    M Source/WebGPU/WebGPU/Pipeline.h
    M Source/WebGPU/WebGPU/PresentationContext.h
    M Source/WebGPU/WebGPU/RenderPipeline.mm
    M Source/WebGPU/WebGPU/ShaderModule.mm
    M Source/WebGPU/WebGPU/WebGPUExt.h

  Log Message:
  -----------
  [WebGPU] Give BindGroupLayouts a notion of external textures (like BindGroups have)
https://bugs.webkit.org/show_bug.cgi?id=257055
rdar://109585492

Reviewed by Mike Wyrzykowski.

Just like we added WGPUBindGroupExternalTextureEntry to let bind groups be able to hold
external textures, this patch adds the corresponding WGPUExternalTextureBindGroupLayoutEntry
to bind group layouts.

Note that the external texture handling added by this patch doesn't actually hook up all
the necessary pieces to the MTLArgumetnDescriptors. This patch instead just creates the
concept of a BGL's external texture, and the details can be filled in in a subsequent patch.

I've also included a few drive-by style improvements, too.

* Source/WebCore/Modules/WebGPU/GPUExternalTextureBindingLayout.idl:
* Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUDeviceImpl.cpp:
(PAL::WebGPU::DeviceImpl::createBindGroupLayout):
* Source/WebCore/html/canvas/GPUCanvasContextCocoa.mm:
(WebCore::GPUCanvasContextCocoa::configure):
* Source/WebGPU/WGSL/WGSL.h:
* Source/WebGPU/WebGPU/BindGroup.mm:
(WebGPU::Device::createBindGroup):
* Source/WebGPU/WebGPU/BindGroupLayout.h:
(WebGPU::BindGroupLayout::create):
(WebGPU::BindGroupLayout::entries const):
* Source/WebGPU/WebGPU/BindGroupLayout.mm:
(WebGPU::createArgumentDescriptor):
(WebGPU::BindGroupLayout::isPresent):
(WebGPU::Device::createBindGroupLayout):
(WebGPU::BindGroupLayout::BindGroupLayout):
(WebGPU::BindGroupLayout::entries const): Deleted.
* Source/WebGPU/WebGPU/Instance.h:
* Source/WebGPU/WebGPU/Pipeline.h:
* Source/WebGPU/WebGPU/PresentationContext.h:
* Source/WebGPU/WebGPU/RenderPipeline.mm:
(WebGPU::Device::createRenderPipeline):
(WebGPU::RenderPipeline::getBindGroupLayout):
* Source/WebGPU/WebGPU/ShaderModule.mm:
(WebGPU::convertBindingLayout):
(WebGPU::ShaderModule::convertPipelineLayout):
(WebGPU::populateBindingMember): Deleted.
* Source/WebGPU/WebGPU/WebGPUExt.h:

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




More information about the webkit-changes mailing list