fix crash in HLSL frontend
fix crash, when converting HLSL return of hull shader into spirv/glsl like arrayed output. fix #2914
This commit is contained in:
parent
f766ee96f5
commit
4142fead74
1 changed files with 3 additions and 0 deletions
|
|
@ -1177,10 +1177,13 @@ void HlslParseContext::flatten(const TVariable& variable, bool linkage, bool arr
|
|||
if (type.isBuiltIn() && !type.isStruct())
|
||||
return;
|
||||
|
||||
|
||||
auto entry = flattenMap.insert(std::make_pair(variable.getUniqueId(),
|
||||
TFlattenData(type.getQualifier().layoutBinding,
|
||||
type.getQualifier().layoutLocation)));
|
||||
|
||||
if (type.isStruct() && type.getStruct()->size()==0)
|
||||
return;
|
||||
// if flattening arrayed io struct, array each member of dereferenced type
|
||||
if (arrayed) {
|
||||
const TType dereferencedType(type, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue