[webkit-changes] [WebKit/WebKit] b1e573: [WebGPU] WGSL compilation failure opening https://...

Tadeu Zagallo noreply at github.com
Thu Dec 28 05:07:33 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b1e573cb61f6b3a509c7d076af34a46caf78adad
      https://github.com/WebKit/WebKit/commit/b1e573cb61f6b3a509c7d076af34a46caf78adad
  Author: Tadeu Zagallo <tzagallo at apple.com>
  Date:   2023-12-28 (Thu, 28 Dec 2023)

  Changed paths:
    M Source/WebGPU/WGSL/ConstantFunctions.h
    M Source/WebGPU/WGSL/Overload.cpp
    M Source/WebGPU/WGSL/TypeDeclarations.rb
    M Source/WebGPU/WGSL/tests/invalid/constants.wgsl
    M Source/WebGPU/WGSL/tests/valid/constants.wgsl

  Log Message:
  -----------
  [WebGPU] WGSL compilation failure opening https://threejs.org/examples/?q=webgpu#webgpu_backdrop_water
https://bugs.webkit.org/show_bug.cgi?id=266823
rdar://120054632

Reviewed by Mike Wyrzykowski.

The spec was updated to add an overload to u32 that accepts abstract_int as an
argument, and this patch updates our implementation to match the updated spec.
This required specializing the constant u32 constructor to handle the abstract_int
special case, since it differs from the other types in that it needs to check
for that can't fit in a u32. It also required fixing a bug in the overload resolution
where a type variable can be resolved to a type that doesn't satisfy its constraints.

* Source/WebGPU/WGSL/ConstantFunctions.h:
(WGSL::CONSTANT_FUNCTION):
* Source/WebGPU/WGSL/Overload.cpp:
(WGSL::OverloadResolver::calculateRank):
* Source/WebGPU/WGSL/TypeDeclarations.rb:
* Source/WebGPU/WGSL/tests/invalid/constants.wgsl:
* Source/WebGPU/WGSL/tests/valid/constants.wgsl:

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




More information about the webkit-changes mailing list