Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2aecc622b112da012c40131d967b8098ec222944
      
https://github.com/WebKit/WebKit/commit/2aecc622b112da012c40131d967b8098ec222944
  Author: Tadeu Zagallo <[email protected]>
  Date:   2025-01-22 (Wed, 22 Jan 2025)

  Changed paths:
    M LayoutTests/fast/webgpu/ftoi-expected.txt
    M LayoutTests/fast/webgpu/ftoi.html
    M Source/WebGPU/WGSL/AST/ASTCallExpression.h
    M Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp
    M Source/WebGPU/WGSL/TypeCheck.cpp

  Log Message:
  -----------
  [WGSL] ftoi should support vectors
https://bugs.webkit.org/show_bug.cgi?id=286026
rdar://142997999

Reviewed by Mike Wyrzykowski.

In 288599@main I introduce the __wgslFtoi helper function to avoid undefined 
behavior
when converting floating point values to integer values. That implementation 
had two
issues: it didn't support vectors and it could still result in UB since INT_MAX 
cannot
accurately represented as a float.

* LayoutTests/fast/webgpu/ftoi-expected.txt:
* LayoutTests/fast/webgpu/ftoi.html:
* Source/WebGPU/WGSL/AST/ASTCallExpression.h:
* Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp:
(WGSL::Metal::FunctionDefinitionWriter::emitNecessaryHelpers):
(WGSL::Metal::FunctionDefinitionWriter::visit):
* Source/WebGPU/WGSL/TypeCheck.cpp:
(WGSL::TypeChecker::chooseOverload):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to