[webkit-changes] [WebKit/WebKit] 015a6c: [WGSL] Add support for constant indexing of vector...
Tadeu Zagallo
noreply at github.com
Thu Nov 9 01:38:33 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 015a6cdeb6aa6c9b161c15649ddeaa507dcecf03
https://github.com/WebKit/WebKit/commit/015a6cdeb6aa6c9b161c15649ddeaa507dcecf03
Author: Tadeu Zagallo <tzagallo at apple.com>
Date: 2023-11-09 (Thu, 09 Nov 2023)
Changed paths:
M Source/WebGPU/WGSL/ConstantValue.cpp
M Source/WebGPU/WGSL/ConstantValue.h
M Source/WebGPU/WGSL/TypeCheck.cpp
Log Message:
-----------
[WGSL] Add support for constant indexing of vectors, arrays and matrices
https://bugs.webkit.org/show_bug.cgi?id=264430
rdar://118130183
Reviewed by Mike Wyrzykowski.
Perform bounds checking and set the constant result of the access if both the
base and the index are constants.
* Source/WebGPU/WGSL/ConstantValue.cpp:
(WGSL::ConstantArray::operator[]):
(WGSL::ConstantVector::operator[]):
(WGSL::ConstantMatrix::operator[]):
* Source/WebGPU/WGSL/ConstantValue.h:
(WGSL::ConstantArray::upperBound):
(WGSL::ConstantVector::upperBound):
(WGSL::ConstantMatrix::upperBound):
* Source/WebGPU/WGSL/TypeCheck.cpp:
(WGSL::TypeChecker::visit):
Canonical link: https://commits.webkit.org/270436@main
More information about the webkit-changes
mailing list