[webkit-changes] [WebKit/WebKit] 8ca433: [WGSL] TypeChecker also ASSERTs on constants
Tadeu Zagallo
noreply at github.com
Tue Oct 31 11:51:21 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8ca433aff29fe3d61a4ed6a6dd3423dbccb237a7
https://github.com/WebKit/WebKit/commit/8ca433aff29fe3d61a4ed6a6dd3423dbccb237a7
Author: Tadeu Zagallo <tzagallo at apple.com>
Date: 2023-10-31 (Tue, 31 Oct 2023)
Changed paths:
M Source/WebGPU/WGSL/TypeCheck.cpp
Log Message:
-----------
[WGSL] TypeChecker also ASSERTs on constants
https://bugs.webkit.org/show_bug.cgi?id=263981
rdar://117748362
Reviewed by Mike Wyrzykowski.
This PR does 2 things:
- Fix an incorrect assert: the intention of the assertion, as the message suggests,
is to report a constant for which we failed to compute a value. However, due to
an oversight, the code always asserts, without actually checking if there is a value
or not.
- We also change the ASSERTION into a type error, this allows running the CTS tests
and getting failures instead of crashes. I do believe that an assertion is more
correct here, but the error makes development a lot easier while we still have gaps
in the constant evaluator.
* Source/WebGPU/WGSL/TypeCheck.cpp:
(WGSL::TypeChecker::visitVariable):
Canonical link: https://commits.webkit.org/270017@main
More information about the webkit-changes
mailing list