[webkit-changes] [WebKit/WebKit] 504a47: [WGSL] Global consts should be serialized as regul...
Tadeu Zagallo
noreply at github.com
Wed May 31 08:29:53 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 504a47e5dc40f3f7f7c30e51e248bf1ff9033b2f
https://github.com/WebKit/WebKit/commit/504a47e5dc40f3f7f7c30e51e248bf1ff9033b2f
Author: Tadeu Zagallo <tzagallo at apple.com>
Date: 2023-05-31 (Wed, 31 May 2023)
Changed paths:
M Source/WebGPU/WGSL/GlobalVariableRewriter.cpp
A Source/WebGPU/WGSL/tests/valid/global-constant-vector.wgsl
Log Message:
-----------
[WGSL] Global consts should be serialized as regular globals
https://bugs.webkit.org/show_bug.cgi?id=257496
rdar://110010424
Reviewed by Myles C. Maxfield.
Global consts, which still have references to it, should be serialized similarly
to global private vars. We reuse the same logic in GlobalVariableRewriter, with
the only modification of transforming `const` into `let`, because after PR#14488
consts will be skipped by the code generator.
* Source/WebGPU/WGSL/GlobalVariableRewriter.cpp:
(WGSL::RewriteGlobalVariables::determineUsedGlobals):
(WGSL::RewriteGlobalVariables::insertLocalDefinitions):
* Source/WebGPU/WGSL/tests/valid/global-constant-vector.wgsl: Added.
Canonical link: https://commits.webkit.org/264734@main
More information about the webkit-changes
mailing list