Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WGSL] Packed struct should not assume every nested struct is also pa…
…cked https://bugs.webkit.org/show_bug.cgi?id=264429 rdar://118129804 Reviewed by Mike Wyrzykowski. A struct `S` might contain a field `x` whose type is another struct `T`. Currently, if we pack `S`, during code generation we'll emit the type of `x` as `T::Packed`, i.e. we just assume that all the structs referenced by `S` will also be packed. Instead, we need to check before emitting code whether `T` was packed or not. * Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp: (WGSL::Metal::FunctionDefinitionWriter::visit): * Source/WebGPU/WGSL/tests/valid/packing.wgsl: Canonical link: https://commits.webkit.org/270438@main
- Loading branch information