[webkit-changes] [WebKit/WebKit] d7c9c0: [WebGPU] built-in arrayLength assumes all buffers ...

mwyrzykowski noreply at github.com
Thu Oct 5 21:55:31 PDT 2023


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

  Changed paths:
    M Source/WebGPU/WGSL/GlobalVariableRewriter.cpp
    M Source/WebGPU/WGSL/WGSL.h
    M Source/WebGPU/WebGPU/BindGroup.mm
    M Source/WebGPU/WebGPU/BindGroupLayout.mm
    M Source/WebGPU/WebGPU/RenderPipeline.mm
    M Source/WebGPU/WebGPU/WebGPUExt.h

  Log Message:
  -----------
  [WebGPU] built-in arrayLength assumes all buffers require an arrayLength, when it should not
https://bugs.webkit.org/show_bug.cgi?id=262728
<radar://116539036>

Reviewed by Dan Glastonbury.

In 268884 at main, a buffer length for all buffers was generated. This is not
really needed.

Instead, generate a buffer length only when it is needed in the shader.

* Source/WebGPU/WGSL/GlobalVariableRewriter.cpp:
(WGSL::RewriteGlobalVariables::determineUsedGlobals):
* Source/WebGPU/WGSL/WGSL.h:
* Source/WebGPU/WebGPU/BindGroup.mm:
(WebGPU::Device::createBindGroup):
* Source/WebGPU/WebGPU/BindGroupLayout.mm:
(WebGPU::createArgumentDescriptor):
(WebGPU::Device::createBindGroupLayout):
(WebGPU::BindGroupLayout::bufferSizeIndexForEntryIndex const):
* Source/WebGPU/WebGPU/RenderPipeline.mm:
(WebGPU::Device::addPipelineLayouts):
* Source/WebGPU/WebGPU/WebGPUExt.h:

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




More information about the webkit-changes mailing list