[webkit-changes] [WebKit/WebKit] e0a4e0: [WGSL] call to 'max' is ambiguous as decimal is no...

mwyrzykowski noreply at github.com
Thu Sep 21 00:17:58 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e0a4e0edfaa5e790d6d5c407e41110053958cc11
      https://github.com/WebKit/WebKit/commit/e0a4e0edfaa5e790d6d5c407e41110053958cc11
  Author: Mike Wyrzykowski <mwyrzykowski at apple.com>
  Date:   2023-09-21 (Thu, 21 Sep 2023)

  Changed paths:
    M Source/WTF/wtf/dtoa.cpp
    M Source/WTF/wtf/dtoa.h
    M Source/WTF/wtf/dtoa/double-conversion.cc
    M Source/WTF/wtf/dtoa/double-conversion.h
    M Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp
    M Tools/TestWebKitAPI/Tests/WGSL/MetalGenerationTests.cpp

  Log Message:
  -----------
  [WGSL] call to 'max' is ambiguous as decimal is not added to floating point number
https://bugs.webkit.org/show_bug.cgi?id=261854
<radar://115813155>

Reviewed by Tadeu Zagallo.

Make sure doubles contain a decimal point. Otherwise we will end up with
compiler errors due to ambiguous function overloads like max(d, 0) where
d is a double.

* Source/WTF/wtf/dtoa.cpp:
(WTF::numberToString):
(WTF::numberToStringWithTrailingPoint):
* Source/WTF/wtf/dtoa.h:
* Source/WTF/wtf/dtoa/double-conversion.cc:
* Source/WTF/wtf/dtoa/double-conversion.h:
* Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp:
(WGSL::Metal::FunctionDefinitionWriter::visit):

* Tools/TestWebKitAPI/Tests/WGSL/MetalGenerationTests.cpp:
(TestWGSLAPI::TEST):
Update test expectation

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




More information about the webkit-changes mailing list