Capture D2D1CompileOptions in source generator

このコミットが含まれているのは:
Sergio Pedri committed 2022-05-22 01:40:09 +02:00
1 親 77c43a819e
コミット 0bfe836a4e
5ファイル変更
+52 -1

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

+16
ファイルの表示
@@ -618,4 +618,20 @@ internal static class DiagnosticDescriptors
isEnabledByDefault: true,
description: "A D2D1 shader must only have unique indices for all of its [D2DInputDescription] attributes.",
helpLinkUri: "https://github.com/Sergio0694/ComputeSharp");
/// <summary>
/// Gets a <see cref="DiagnosticDescriptor"/> for the PackMatrixColumnMajor option being used.
/// <para>
/// Format: <c>"The D2D1 shader of type {0} is using the PackMatrixColumnMajor option in its [D2DCompileOptions] attribute"</c>.
/// </para>
/// </summary>
public static readonly DiagnosticDescriptor InvalidPackMatrixColumnMajorOption = new DiagnosticDescriptor(
id: "CMPSD2D0044",
title: "Invalid PackMatrixColumnMajor compile option",
messageFormat: "The D2D1 shader of type {0} is using the PackMatrixColumnMajor option in its [D2DCompileOptions] attribute",
category: "ComputeSharp.D2D1.Shaders",
defaultSeverity: DiagnosticSeverity.Error,
isEnabledByDefault: true,
description: "A D2D1 shader generated with ComputeSharp.D2D1 cannot use the PackMatrixColumnMajor option, as that is not compatible with the generated code used to load shader constant buffers.",
helpLinkUri: "https://github.com/Sergio0694/ComputeSharp");
}