[webkit-changes] [WebKit/WebKit] 981e9e: [WGSL] Functions should not be used as values

Tadeu Zagallo noreply at github.com
Thu Feb 1 08:54:20 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 981e9e4ec22114d6202cb208f34462ddaf965f05
      https://github.com/WebKit/WebKit/commit/981e9e4ec22114d6202cb208f34462ddaf965f05
  Author: Tadeu Zagallo <tzagallo at apple.com>
  Date:   2024-02-01 (Thu, 01 Feb 2024)

  Changed paths:
    M Source/WebGPU/WGSL/TypeCheck.cpp
    M Source/WebGPU/WGSL/tests/invalid/bitcast.wgsl

  Log Message:
  -----------
  [WGSL] Functions should not be used as values
https://bugs.webkit.org/show_bug.cgi?id=268456
rdar://121527098

Reviewed by Mike Wyrzykowski.

Add a separate binding type for functions, since they can only ever be used in
function calls, so we don't have to handle it everywhere.

* Source/WebGPU/WGSL/TypeCheck.cpp:
(WGSL::bindingKindToString):
(WGSL::TypeChecker::visit):
(WGSL::TypeChecker::bitcast):
(WGSL::TypeChecker::lookupType):
(WGSL::TypeChecker::introduceFunction):
* Source/WebGPU/WGSL/tests/invalid/bitcast.wgsl:

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




More information about the webkit-changes mailing list