[webkit-changes] [WebKit/WebKit] 209831: [WGSL] WorkgroupSize should accept 3 expressions
Tadeu Zagallo
noreply at github.com
Tue Apr 18 00:46:08 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 209831d6c57289146269aaf2354108f41288ba62
https://github.com/WebKit/WebKit/commit/209831d6c57289146269aaf2354108f41288ba62
Author: Tadeu Zagallo <tzagallo at apple.com>
Date: 2023-04-18 (Tue, 18 Apr 2023)
Changed paths:
M Source/WebGPU/WGSL/AST/ASTStringDumper.cpp
M Source/WebGPU/WGSL/AST/ASTVisitor.cpp
M Source/WebGPU/WGSL/AST/ASTWorkgroupSizeAttribute.h
M Source/WebGPU/WGSL/Parser.cpp
Log Message:
-----------
[WGSL] WorkgroupSize should accept 3 expressions
https://bugs.webkit.org/show_bug.cgi?id=255523
rdar://108139235
Reviewed by Mike Wyrzykowski.
The implementation assumed a single unsigned literal would be passed into the
`@workgroup_size` annotation, but it takes 3 arguments, a required `x` and
optionals `y` and `z`. They must also be (const) expressions, so we can't assume
literals will be passed in.
* Source/WebGPU/WGSL/AST/ASTStringDumper.cpp:
(WGSL::AST::StringDumper::visit):
* Source/WebGPU/WGSL/AST/ASTVisitor.cpp:
(WGSL::AST::Visitor::visit):
* Source/WebGPU/WGSL/AST/ASTWorkgroupSizeAttribute.h:
* Source/WebGPU/WGSL/Parser.cpp:
(WGSL::Parser<Lexer>::parseAttribute):
Canonical link: https://commits.webkit.org/263063@main
More information about the webkit-changes
mailing list