[webkit-changes] [WebKit/WebKit] ecb006: [WGSL] @group, @binding and @location should accep...
Tadeu Zagallo
noreply at github.com
Wed May 31 00:38:34 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ecb00651d616a3749ca1ae52b89e69bceb5c2421
https://github.com/WebKit/WebKit/commit/ecb00651d616a3749ca1ae52b89e69bceb5c2421
Author: Tadeu Zagallo <tzagallo at apple.com>
Date: 2023-05-31 (Wed, 31 May 2023)
Changed paths:
M Source/WebGPU/WGSL/AST/ASTBindingAttribute.h
M Source/WebGPU/WGSL/AST/ASTGroupAttribute.h
M Source/WebGPU/WGSL/AST/ASTLocationAttribute.h
M Source/WebGPU/WGSL/AST/ASTStringDumper.cpp
M Source/WebGPU/WGSL/GlobalVariableRewriter.cpp
M Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp
M Source/WebGPU/WGSL/Parser.cpp
M Tools/TestWebKitAPI/Tests/WGSL/ParserTests.cpp
Log Message:
-----------
[WGSL] @group, @binding and @location should accept expressions
https://bugs.webkit.org/show_bug.cgi?id=257471
rdar://109995472
Reviewed by Myles C. Maxfield.
Currently we are only parsing integer literals as arguments to these attributes,
but according to the grammar they should accept any const expressions.
* Source/WebGPU/WGSL/AST/ASTBindingAttribute.h:
* Source/WebGPU/WGSL/AST/ASTGroupAttribute.h:
* Source/WebGPU/WGSL/AST/ASTLocationAttribute.h:
* Source/WebGPU/WGSL/AST/ASTStringDumper.cpp:
(WGSL::AST::StringDumper::visit):
* Source/WebGPU/WGSL/GlobalVariableRewriter.cpp:
(WGSL::RewriteGlobalVariables::collectGlobals):
(WGSL::RewriteGlobalVariables::insertStructs):
(WGSL::RewriteGlobalVariables::insertParameters):
* Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp:
(WGSL::Metal::FunctionDefinitionWriter::visit):
* Source/WebGPU/WGSL/Parser.cpp:
(WGSL::Parser<Lexer>::parseAttribute):
Canonical link: https://commits.webkit.org/264717@main
More information about the webkit-changes
mailing list