[webkit-changes] [WebKit/WebKit] e6c8fa: [WGSL] Handle parsing of unconstrained vector and ...

Dan Glastonbury noreply at github.com
Wed Feb 15 15:29:10 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e6c8fa17cce481d5b813bfabfef1d723542983b5
      https://github.com/WebKit/WebKit/commit/e6c8fa17cce481d5b813bfabfef1d723542983b5
  Author: Dan Glastonbury <djg at apple.com>
  Date:   2023-02-15 (Wed, 15 Feb 2023)

  Changed paths:
    M Source/WebGPU/WGSL/Parser.cpp
    M Tools/TestWebKitAPI/Tests/WGSL/ParserTests.cpp

  Log Message:
  -----------
  [WGSL] Handle parsing of unconstrained vector and matrix types.
https://bugs.webkit.org/show_bug.cgi?id=252286
rdar://problem/105480155

Reviewed by Tadeu Zagallo.

`vec4(1.0, 1.0, 1.0, 1.0)` is a valid type constructor where element type needs
to be deduced from the type of the arguments. This change conditionally accepts
the element type if the identifier is one of the known prefixes for
ParameterizedTypeName, otherwise NamedTypeName is returned.

* Source/WebGPU/WGSL/Parser.cpp:
(WGSL::Parser<Lexer>::parseTypeNameAfterIdentifier):
* Tools/TestWebKitAPI/Tests/WGSL/ParserTests.cpp:
(TestWGSLAPI::TEST):

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




More information about the webkit-changes mailing list