Added diagnostics for shader properties

このコミットが含まれているのは:
Sergio Pedri committed 2021-03-11 15:38:13 +01:00
1 親 e12169c11e
コミット 3147e8fade
4ファイル変更
+34 -32

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

+13
ファイルの表示
@@ -617,5 +617,18 @@ namespace ComputeSharp.SourceGenerators.Diagnostics
isEnabledByDefault: true,
description: "The DispatchSize type can only be used within the main body of a compute shader.",
helpLinkUri: "https://github.com/Sergio0694/ComputeSharp");
/// <summary>
/// Gets a <see cref="DiagnosticDescriptor"/> for a property declaration.
/// </summary>
public static readonly DiagnosticDescriptor PropertyDeclaration = new(
id: "CMPS0045",
title: "Property declaration",
messageFormat: "Property declarations cannot be used in a compute shader",
category: typeof(IComputeShader).FullName,
defaultSeverity: DiagnosticSeverity.Error,
isEnabledByDefault: true,
description: "Property declarations cannot be used in a compute shader.",
helpLinkUri: "https://github.com/Sergio0694/ComputeSharp");
}
}