mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-05 12:46:11 +00:00
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!str->Declaration()) {
|
||||||
|
// The struct is a built-in structure that we do not need to declare.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Recurse into members.
|
// Recurse into members.
|
||||||
for (auto* member : str->Members()) {
|
for (auto* member : str->Members()) {
|
||||||
CloneStructTypes(member->Type());
|
CloneStructTypes(member->Type());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user