tint/msl: Avoid cloning a built-in struct
This prevents us from crashing when a module-scope private variable has an inferred type that is a built-in struct. We instead fail to resolve the generated code. Bug: chromium:1430309 Change-Id: I71c6eacf28096380227ed1043821ecc3d33ffb40 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129140 Reviewed-by: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: James Price <jrprice@google.com>
This commit is contained in:
parent
99a0ded622
commit
a41693babb
|
@ -85,6 +85,11 @@ struct ModuleScopeVarToEntryPointParam::State {
|
|||
return;
|
||||
}
|
||||
|
||||
if (!str->Declaration()) {
|
||||
// The struct is a built-in structure that we do not need to declare.
|
||||
return;
|
||||
}
|
||||
|
||||
// Recurse into members.
|
||||
for (auto* member : str->Members()) {
|
||||
CloneStructTypes(member->Type());
|
||||
|
|
Loading…
Reference in New Issue