Prevent bool fields in custom struct types in shaders
These are not allowed due to alignment reasons
このコミットが含まれているのは:
1 親
f68d56fcec
コミット
1e3611a060
4ファイル変更
+44
-4
検索条件に一致するファイルはありません
@@ -218,6 +218,14 @@ internal static partial class HlslKnownTypes
|
||||
// Local function to recursively gather nested types
|
||||
static void ExploreTypes(INamedTypeSymbol type, HashSet<INamedTypeSymbol> customTypes, HashSet<INamedTypeSymbol> invalidTypes)
|
||||
{
|
||||
// Explicitly prevent bool from being a field in a custom struct
|
||||
if (type.SpecialType == SpecialType.System_Boolean)
|
||||
{
|
||||
invalidTypes.Add(type);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (KnownHlslTypes.ContainsKey(type.GetFullMetadataName())) return;
|
||||
|
||||
// Check if the type is unsupported
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする