Skip to content

Commit

Permalink
fix crash in HLSL frontend
Browse files Browse the repository at this point in the history
fix crash, when converting HLSL return of hull shader into spirv/glsl like arrayed output.

fix #2914
  • Loading branch information
Try authored and arcady-lunarg committed Apr 7, 2023
1 parent bdba39b commit a5f5206
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions glslang/HLSL/hlslParseHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a5f5206

Please sign in to comment.