Skip to content

Commit a6301d6

Browse files
committed
assert if hitgroup matters only
1 parent 4aa9ac6 commit a6301d6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tools/clang/lib/AST/HlslTypes.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,8 @@ bool GetHLSLSubobjectKind(clang::QualType type,
694694
HLSLSubObjectAttr *Attr = RD->getAttr<HLSLSubObjectAttr>();
695695
subobjectKind = (DXIL::SubobjectKind)Attr->getSubObjKindUint();
696696
hgType = (DXIL::HitGroupType)Attr->getHitGroupType();
697-
DXASSERT(DXIL::IsValidHitGroupType(hgType), "invalid hit group type");
697+
if (subobjectKind == DXIL::SubobjectKind::HitGroup)
698+
DXASSERT(DXIL::IsValidHitGroupType(hgType), "invalid hit group type");
698699

699700
return true;
700701
}

0 commit comments

Comments
 (0)