Fixed HLSL compilation when using nested struct types

このコミットが含まれているのは:
Sergio Pedri committed 2021-03-11 23:12:09 +01:00
1 親 cd8fb59593
コミット 9d41cbf94c
10ファイル変更
+104 -57

検索条件に一致するファイルはありません

+3 -3
ファイルの表示
@@ -230,7 +230,7 @@ namespace ComputeSharp.SourceGenerators.Mappings
// If the current type is a custom type, format it as needed
if (!KnownHlslTypes.TryGetValue(genericArgumentName, out string? mappedElementType))
{
mappedElementType = genericArgumentName.Replace(".", "__");
mappedElementType = genericArgumentName.ToHlslIdentifierName();
}
// Construct the HLSL type name
@@ -262,7 +262,7 @@ namespace ComputeSharp.SourceGenerators.Mappings
}
// The captured field is of a custom struct type
return typeName.Replace(".", "__");
return typeName.ToHlslIdentifierName();
}
/// <summary>
@@ -280,7 +280,7 @@ namespace ComputeSharp.SourceGenerators.Mappings
return mapped;
}
return elementTypeName.Replace(".", "__");
return elementTypeName.ToHlslIdentifierName();
}
/// <summary>