mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-09 12:00:05 +00:00
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
@ -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…
Reference in New Issue
Block a user