Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 2459e1442e9d4021cbbacdc9114a51136d7a7d57 https://github.com/WebKit/WebKit/commit/2459e1442e9d4021cbbacdc9114a51136d7a7d57 Author: Tadeu Zagallo <tzaga...@apple.com> Date: 2024-04-18 (Thu, 18 Apr 2024)
Changed paths: M Source/WebGPU/WGSL/GlobalVariableRewriter.cpp M Source/WebGPU/WGSL/MangleNames.cpp M Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp M Source/WebGPU/WGSL/tests/valid/access-expression.wgsl Log Message: ----------- [WGSL] Field access should support pointers https://bugs.webkit.org/show_bug.cgi?id=272838 rdar://126621076 Reviewed by Mike Wyrzykowski. The WGSL spec was updated to support struct field access on pointers (e.g. (&x).y), and while the type checker was updated to support it, there were a couple other changes necessary: - the renamer/mangler did not correctly rename the field when accessing a pointer - the global rewriter asserted that the base should be either a reference or a struct - the code generator was not emitting the correct code (i.e. x->y instead of x.y) * Source/WebGPU/WGSL/GlobalVariableRewriter.cpp: (WGSL::RewriteGlobalVariables::getPacking): * Source/WebGPU/WGSL/MangleNames.cpp: (WGSL::NameManglerVisitor::visit): * Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp: (WGSL::Metal::FunctionDefinitionWriter::visit): * Source/WebGPU/WGSL/tests/valid/access-expression.wgsl: Canonical link: https://commits.webkit.org/277665@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes