Fix struct type sharing

Fixes #2812
This commit is contained in:
Greg Fischer 2021-11-12 16:54:22 -07:00
parent c9706bdda0
commit 10be28ac9b
4 changed files with 154 additions and 0 deletions

View file

@ -6935,6 +6935,9 @@ void HlslParseContext::shareStructBufferType(TType& type)
if (lhs.isStruct() != rhs.isStruct())
return false;
if (lhs.getQualifier().builtIn != rhs.getQualifier().builtIn)
return false;
if (lhs.isStruct() && rhs.isStruct()) {
if (lhs.getStruct()->size() != rhs.getStruct()->size())
return false;