[webkit-changes] [WebKit/WebKit] 382262: [WGSL] Atomics inside structs and arrays are not i...
Tadeu Zagallo
noreply at github.com
Wed Jan 17 11:05:01 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 382262ea04f7459eb316ec48c36aba3995f3b378
https://github.com/WebKit/WebKit/commit/382262ea04f7459eb316ec48c36aba3995f3b378
Author: Tadeu Zagallo <tzagallo at apple.com>
Date: 2024-01-17 (Wed, 17 Jan 2024)
Changed paths:
M Source/WebGPU/WGSL/GlobalVariableRewriter.cpp
Log Message:
-----------
[WGSL] Atomics inside structs and arrays are not initialized
https://bugs.webkit.org/show_bug.cgi?id=267594
rdar://121062530
Reviewed by Mike Wyrzykowski.
In 273065 at main we started explicitly initializing atomic variables in the workgroup
address space, but not when the atomic was nested inside a struct or array. This
patch makes it so that we traverse the types of all variables in the workgroup
space, search for nested atomics and initialize them.
* Source/WebGPU/WGSL/GlobalVariableRewriter.cpp:
(WGSL::RewriteGlobalVariables::insertLocalDefinitions):
(WGSL::RewriteGlobalVariables::initializeAtomics):
(WGSL::RewriteGlobalVariables::atomicStoreInitialValue):
(WGSL::RewriteGlobalVariables::containsAtomic):
Canonical link: https://commits.webkit.org/273133@main
More information about the webkit-changes
mailing list