[webkit-changes] [WebKit/WebKit] f69491: [WGSL] constantMinus cannot assume both operands h...
Tadeu Zagallo
noreply at github.com
Wed Oct 4 01:14:26 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f69491a2d8dfca4faea2b491a116747ceca72ecd
https://github.com/WebKit/WebKit/commit/f69491a2d8dfca4faea2b491a116747ceca72ecd
Author: Tadeu Zagallo <tzagallo at apple.com>
Date: 2023-10-04 (Wed, 04 Oct 2023)
Changed paths:
M Source/WebGPU/WGSL/ConstantFunctions.h
M Source/WebGPU/WGSL/tests/valid/constants.wgsl
Log Message:
-----------
[WGSL] constantMinus cannot assume both operands have the same type
https://bugs.webkit.org/show_bug.cgi?id=262549
rdar://116403317
Reviewed by Mike Wyrzykowski.
It is valid to have a constant of the form `const x = 1 - 0.5`, where both
sides will be inferred to have type AbstractFloat, but the ConstantValues
will be int and float, so the constant function has to convert both operands
to float if either of them is a float.
* Source/WebGPU/WGSL/ConstantFunctions.h:
(WGSL::constantMinus):
* Source/WebGPU/WGSL/tests/valid/constants.wgsl:
Canonical link: https://commits.webkit.org/268831@main
More information about the webkit-changes
mailing list