[webkit-changes] [WebKit/WebKit] a9257d: [WGSL] Index access should concretize result if in...
Tadeu Zagallo
noreply at github.com
Tue Oct 17 11:19:41 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a9257d7eac9f6f491b5bdb2cd07ce2962f92e18c
https://github.com/WebKit/WebKit/commit/a9257d7eac9f6f491b5bdb2cd07ce2962f92e18c
Author: Tadeu Zagallo <tzagallo at apple.com>
Date: 2023-10-17 (Tue, 17 Oct 2023)
Changed paths:
M Source/WebGPU/WGSL/TypeCheck.cpp
A Source/WebGPU/WGSL/tests/invalid/access-expression.wgsl
R Source/WebGPU/WGSL/tests/invalid/vector.wgsl
Log Message:
-----------
[WGSL] Index access should concretize result if index is not constant
https://bugs.webkit.org/show_bug.cgi?id=263234
rdar://117048715
Reviewed by Dan Glastonbury.
According to the spec[1], when indexing an array, vector or matrix, if the index
is not constant the result must be a concrete type.
[1]: See the NOTE under https://www.w3.org/TR/WGSL/#vector-single-component
* Source/WebGPU/WGSL/TypeCheck.cpp:
(WGSL::TypeChecker::visit):
* Source/WebGPU/WGSL/tests/invalid/access-expression.wgsl: Added.
* Source/WebGPU/WGSL/tests/invalid/vector.wgsl: Removed.
Canonical link: https://commits.webkit.org/269416@main
More information about the webkit-changes
mailing list