Add diagnostic for missing [D2DRequiresScenePosition]

このコミットが含まれているのは:
Sergio Pedri committed 2022-08-07 17:59:33 +02:00
1 親 832c8cd355
コミット 5777e17e03
7ファイル変更
+92 -9

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

+11
ファイルの表示
@@ -10,6 +10,17 @@ namespace ComputeSharp.SourceGeneration.Mappings;
/// <inheritdoc/>
partial class HlslKnownMethods
{
/// <summary>
/// Checks whether or not a method name (previous matched with <see cref="TryGetMappedName(string, out string?)"/>
/// needs the <c>[D2DRequiresPosition]</c> annotation on its containing shader in order to be used.
/// </summary>
/// <param name="name">The fully qualified metadata name.</param>
/// <returns>Whether the method needs the <c>[D2DRequiresPosition]</c> annotation.</returns>
public static bool NeedsD2DRequiresPositionAttribute(string name)
{
return name == "ComputeSharp.D2D1.D2D.GetScenePosition";
}
/// <inheritdoc/>
static partial void AddKnownMethods(IDictionary<string, string> knownMethods)