[webkit-changes] [WebKit/WebKit] d0ba6e: [WebGPU] Implement RenderPipeline::getBindGroupLayout

mwyrzykowski noreply at github.com
Thu Jan 5 20:16:30 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d0ba6e761c62aeca09022fdbccc2b73f17fa0d08
      https://github.com/WebKit/WebKit/commit/d0ba6e761c62aeca09022fdbccc2b73f17fa0d08
  Author: Mike Wyrzykowski <mwyrzykowski at apple.com>
  Date:   2023-01-05 (Thu, 05 Jan 2023)

  Changed paths:
    M Source/WTF/wtf/PlatformHave.h
    M Source/WebGPU/WebGPU/BindGroupLayout.h
    M Source/WebGPU/WebGPU/BindGroupLayout.mm
    M Source/WebGPU/WebGPU/RenderPipeline.h
    M Source/WebGPU/WebGPU/RenderPipeline.mm
    M Websites/webkit.org/demos/webgpu/scripts/hello-cube-auto-layout.js
    M Websites/webkit.org/demos/webgpu/scripts/instanced-textured-cube.js

  Log Message:
  -----------
  [WebGPU] Implement RenderPipeline::getBindGroupLayout
https://bugs.webkit.org/show_bug.cgi?id=249539
<radar://103482448>

Reviewed by Myles C. Maxfield.

Use reflection to build the bind group layout for a given
bind group from the render pipeline.

* Source/WebGPU/WebGPU/BindGroupLayout.h:
(WebGPU::BindGroupLayout::create):
(WebGPU::BindGroupLayout::createInvalid):
(WebGPU::BindGroupLayout::device const): Deleted.
Device isn't used and not directly accessible from RenderPipeline
member functions so remove it as BindGroupLayout is created
in the RenderPipeline now.

* Source/WebGPU/WebGPU/BindGroupLayout.mm:
(WebGPU::Device::createBindGroupLayout):
(WebGPU::BindGroupLayout::BindGroupLayout):
Be more specific about the value type in the key-value pair.

* Source/WebGPU/WebGPU/RenderPipeline.h:
(WebGPU::RenderPipeline::create):
Pass the reflection info to be used in getBindGroupLayout.

* Source/WebGPU/WebGPU/RenderPipeline.mm:
(WebGPU::Device::createRenderPipeline):
(WebGPU::RenderPipeline::RenderPipeline):
(WebGPU::RenderPipeline::getBindGroupLayout):
Build a bind group layout with required binding index and stage
visibility for the render pipeline.

* Websites/webkit.org/demos/webgpu/scripts/hello-cube-auto-layout.js:
* Websites/webkit.org/demos/webgpu/scripts/instanced-textured-cube.js:
Update two samples illustrating the use of getBindGroupLayout

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




More information about the webkit-changes mailing list