[webkit-changes] [WebKit/WebKit] 67be1e: [WebGPU] MSL compilation error opening https://kis...
Tadeu Zagallo
noreply at github.com
Thu Nov 2 01:44:53 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 67be1e0883407c894c71a4c903e5030059a7b5e9
https://github.com/WebKit/WebKit/commit/67be1e0883407c894c71a4c903e5030059a7b5e9
Author: Tadeu Zagallo <tzagallo at apple.com>
Date: 2023-11-02 (Thu, 02 Nov 2023)
Changed paths:
M Source/WebGPU/WGSL/TypeCheck.cpp
A Source/WebGPU/WGSL/tests/invalid/return.wgsl
A Source/WebGPU/WGSL/tests/valid/return.wgsl
Log Message:
-----------
[WebGPU] MSL compilation error opening https://kishimisu.github.io/WebGPU-Fluid-Simulation/
https://bugs.webkit.org/show_bug.cgi?id=264009
rdar://117768138
Reviewed by Mike Wyrzykowski.
The cause of the crash was that we weren't type checking return statements. The
expression being returned needs to be unified with the function's return type,
which causes the type to be promoted and fixes the sample.
* Source/WebGPU/WGSL/TypeCheck.cpp:
(WGSL::TypeChecker::visit):
* Source/WebGPU/WGSL/tests/invalid/return.wgsl: Added.
* Source/WebGPU/WGSL/tests/valid/return.wgsl: Added.
Canonical link: https://commits.webkit.org/270104@main
More information about the webkit-changes
mailing list