[webkit-changes] [WebKit/WebKit] 49c007: [WebGPU] support constant overrides via integer id...

Tadeu Zagallo noreply at github.com
Thu Apr 20 03:02:08 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 49c0074aa026a49b00f125f60ee5a1dc0b1453f3
      https://github.com/WebKit/WebKit/commit/49c0074aa026a49b00f125f60ee5a1dc0b1453f3
  Author: Tadeu Zagallo <tzagallo at apple.com>
  Date:   2023-04-20 (Thu, 20 Apr 2023)

  Changed paths:
    M Source/WebGPU/WGSL/GlobalVariableRewriter.cpp
    M Source/WebGPU/WGSL/MangleNames.cpp
    M Source/WebGPU/WGSL/WGSL.h
    M Source/WebGPU/WebGPU/Pipeline.mm

  Log Message:
  -----------
  [WebGPU] support constant overrides via integer identifiers and not only names
https://bugs.webkit.org/show_bug.cgi?id=250441
rdar://problem/104110543

Reviewed by Mike Wyrzykowski.

The compiler needs to export a list of overrides used in the shader, including
their key (which might be either the variable name or their `@id` if the attribute
is present), their mangled name and type.

* Source/WebGPU/WGSL/GlobalVariableRewriter.cpp:
(WGSL::RewriteGlobalVariables::run):
(WGSL::RewriteGlobalVariables::determineUsedGlobals):
(WGSL::RewriteGlobalVariables::usesOverride):
* Source/WebGPU/WGSL/MangleNames.cpp:
(WGSL::NameManglerVisitor::visit):
* Source/WebGPU/WGSL/WGSL.h:
* Source/WebGPU/WebGPU/Pipeline.mm:
(WebGPU::createConstantValues):

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




More information about the webkit-changes mailing list