[webkit-changes] [WebKit/WebKit] 666a7c: [WGSL] Struct arguments to entry points are clashing
Tadeu Zagallo
noreply at github.com
Fri May 24 05:08:17 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 666a7c0243c3384322183eee16c53ef44d7aa0a3
https://github.com/WebKit/WebKit/commit/666a7c0243c3384322183eee16c53ef44d7aa0a3
Author: Tadeu Zagallo <tzagallo at apple.com>
Date: 2024-05-24 (Fri, 24 May 2024)
Changed paths:
M Source/WebGPU/WGSL/MangleNames.cpp
M Source/WebGPU/WGSL/tests/valid/packing.wgsl
M Source/WebGPU/WGSL/tests/valid/struct.wgsl
Log Message:
-----------
[WGSL] Struct arguments to entry points are clashing
https://bugs.webkit.org/show_bug.cgi?id=274603
rdar://128625590
Reviewed by Mike Wyrzykowski.
Struct parameters of entry point functions get merged into a single struct or
hoisted into a top-level parameter if it's a builtin. However, when we rename
all variables we also rename all struct fields as `field0...fieldN` for every
struct, so when the fields got merged into a single struct (or hoisted) they
collided. In order to fix this we just make every field unique by never resetting
the field counter.
* Source/WebGPU/WGSL/MangleNames.cpp:
(WGSL::NameManglerVisitor::visit):
* Source/WebGPU/WGSL/tests/valid/packing.wgsl:
* Source/WebGPU/WGSL/tests/valid/struct.wgsl:
Canonical link: https://commits.webkit.org/279261@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list