[webkit-changes] [WebKit/WebKit] 63fc05: [WGSL] Don't modify AST directly rewriting global ...
Tadeu Zagallo
noreply at github.com
Tue Mar 21 08:20:26 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 63fc0521ae5f9503442337ec1bbc684d865c447d
https://github.com/WebKit/WebKit/commit/63fc0521ae5f9503442337ec1bbc684d865c447d
Author: Tadeu Zagallo <tzagallo at apple.com>
Date: 2023-03-21 (Tue, 21 Mar 2023)
Changed paths:
M Source/WebGPU/WGSL/GlobalVariableRewriter.cpp
Log Message:
-----------
[WGSL] Don't modify AST directly rewriting global variables
https://bugs.webkit.org/show_bug.cgi?id=254027
<rdar://problem/106810122>
Reviewed by Myles C. Maxfield.
This PR builds onto #11606, which changed the entry point rewriter and introduced
the API for modifying vectors, making this a trivial change. There were 3 places
left were we modified the AST directly:
- Deleting all the global variables, since they were no longer used: this is not
strictly necessary, since the code generator doesn't visit these variables,
so we can simply stop deleting them.
- Inserting the parameters into the entry point and inserting the structs for the
argument buffers: both of these can use the API for appeding to the vector
introduced in #11606.
* Source/WebGPU/WGSL/GlobalVariableRewriter.cpp:
(WGSL::RewriteGlobalVariables::run):
(WGSL::RewriteGlobalVariables::insertStructs):
(WGSL::RewriteGlobalVariables::insertParameters):
Canonical link: https://commits.webkit.org/261920@main
More information about the webkit-changes
mailing list