[webkit-changes] [WebKit/WebKit] 81ed9b: [WGSL] Add type checking for attributes
Tadeu Zagallo
noreply at github.com
Wed May 31 01:20:26 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 81ed9b8c42882f4626f9468e19a34ec60c5d7fc5
https://github.com/WebKit/WebKit/commit/81ed9b8c42882f4626f9468e19a34ec60c5d7fc5
Author: Tadeu Zagallo <tzagallo at apple.com>
Date: 2023-05-31 (Wed, 31 May 2023)
Changed paths:
M Source/WebGPU/WGSL/TypeCheck.cpp
A Source/WebGPU/WGSL/tests/invalid/attributes.wgsl
A Source/WebGPU/WGSL/tests/valid/attributes.wgsl
Log Message:
-----------
[WGSL] Add type checking for attributes
https://bugs.webkit.org/show_bug.cgi?id=257472
rdar://109995534
Reviewed by Myles C. Maxfield.
Validate the types of the expressions provided to all attributes. Most require
trivially checking that the values are integers, the only interesting one is
@workgroup_size which requires the three arguments to be of the same type.
* Source/WebGPU/WGSL/TypeCheck.cpp:
(WGSL::TypeChecker::visitStructMembers):
(WGSL::TypeChecker::visitVariable):
(WGSL::TypeChecker::visit):
(WGSL::TypeChecker::visitAttributes):
* Source/WebGPU/WGSL/tests/invalid/attributes.wgsl: Added.
* Source/WebGPU/WGSL/tests/valid/attributes.wgsl: Added.
Canonical link: https://commits.webkit.org/264720@main
More information about the webkit-changes
mailing list