Remove leftover code and diagnostics
このコミットが含まれているのは:
1 親
d1fabb6fed
コミット
771f8515c7
4ファイル変更
+27
-89
検索条件に一致するファイルはありません
@@ -43,16 +43,13 @@ CMPS0033 | ComputeSharp.IComputeShader | Error | IShaderGenerator, [Documentatio
|
||||
CMPS0034 | ComputeSharp.IComputeShader | Error | IShaderGenerator, [Documentation](https://github.com/Sergio0694/ComputeSharp)
|
||||
CMPS0035 | ComputeSharp.IComputeShader | Error | IShaderGenerator, [Documentation](https://github.com/Sergio0694/ComputeSharp)
|
||||
CMPS0036 | ComputeSharp.IComputeShader | Error | IShaderGenerator, [Documentation](https://github.com/Sergio0694/ComputeSharp)
|
||||
CMPS0037 | ComputeSharp.SourceGenerators.AutoConstructorGenerator | Warning | AutoConstructorGenerator, [Documentation](https://github.com/Sergio0694/ComputeSharp)
|
||||
CMPS0040 | ComputeSharp.SourceGenerators.IShaderGenerator | Warning | IShaderGenerator, [Documentation](https://github.com/Sergio0694/ComputeSharp)
|
||||
CMPS0041 | ComputeSharp.SourceGenerators.ShaderMethodSourceGenerator | Warning | ShaderMethodSourceGenerator, [Documentation](https://github.com/Sergio0694/ComputeSharp)
|
||||
CMPS0037 | ComputeSharp.IComputeShader | Error | IShaderGenerator, [Documentation](https://github.com/Sergio0694/ComputeSharp)
|
||||
CMPS0038 | ComputeSharp.IComputeShader | Error | IShaderGenerator, [Documentation](https://github.com/Sergio0694/ComputeSharp)
|
||||
CMPS0039 | ComputeSharp.IComputeShader | Error | IShaderGenerator, [Documentation](https://github.com/Sergio0694/ComputeSharp)
|
||||
CMPS0040 | ComputeSharp.IComputeShader | Error | IShaderGenerator, [Documentation](https://github.com/Sergio0694/ComputeSharp)
|
||||
CMPS0041 | ComputeSharp.IComputeShader | Error | IShaderGenerator, [Documentation](https://github.com/Sergio0694/ComputeSharp)
|
||||
CMPS0042 | ComputeSharp.IComputeShader | Error | IShaderGenerator, [Documentation](https://github.com/Sergio0694/ComputeSharp)
|
||||
CMPS0043 | ComputeSharp.IComputeShader | Error | IShaderGenerator, [Documentation](https://github.com/Sergio0694/ComputeSharp)
|
||||
CMPS0044 | ComputeSharp.IComputeShader | Error | IShaderGenerator, [Documentation](https://github.com/Sergio0694/ComputeSharp)
|
||||
CMPS0045 | ComputeSharp.IComputeShader | Error | IShaderGenerator, [Documentation](https://github.com/Sergio0694/ComputeSharp)
|
||||
CMPS0046 | ComputeSharp.IComputeShader | Error | IShaderGenerator, [Documentation](https://github.com/Sergio0694/ComputeSharp)
|
||||
CMPS0047 | ComputeSharp.IComputeShader | Error | IShaderGenerator, [Documentation](https://github.com/Sergio0694/ComputeSharp)
|
||||
CMPS0048 | ComputeSharp.IComputeShader | Error | IShaderGenerator, [Documentation](https://github.com/Sergio0694/ComputeSharp)
|
||||
CMPS0049 | ComputeSharp.IComputeShader | Error | IShaderGenerator, [Documentation](https://github.com/Sergio0694/ComputeSharp)
|
||||
CMPS0050 | ComputeSharp.IComputeShader | Error | IShaderGenerator, [Documentation](https://github.com/Sergio0694/ComputeSharp)
|
||||
CMPS0051 | ComputeSharp.IComputeShader | Error | IShaderGenerator, [Documentation](https://github.com/Sergio0694/ComputeSharp)
|
||||
@@ -496,59 +496,11 @@ internal static class DiagnosticDescriptors
|
||||
description: "String literal expressions cannot be used in a compute shader.",
|
||||
helpLinkUri: "https://github.com/Sergio0694/ComputeSharp");
|
||||
|
||||
/// <summary>
|
||||
/// Gets a <see cref="DiagnosticDescriptor"/> for an internal error in <see cref="AutoConstructorGenerator"/>.
|
||||
/// <para>
|
||||
/// Format: <c>"The generator AutoConstructorGenerator failed to execute on type {0}, and its constructor might not be available"</c>.
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static readonly DiagnosticDescriptor AutoConstructorGeneratorError = new(
|
||||
id: "CMPS0037",
|
||||
title: $"Internal error for {nameof(AutoConstructorGenerator)}",
|
||||
messageFormat: $"The generator {nameof(AutoConstructorGenerator)} failed to execute on type {{0}}, and its constructor might not be available",
|
||||
category: typeof(AutoConstructorGenerator).FullName,
|
||||
defaultSeverity: DiagnosticSeverity.Warning,
|
||||
isEnabledByDefault: true,
|
||||
description: $"The {nameof(AutoConstructorGenerator)} generator encountered an error while processing a type, and its constructor might not be available. Please report this issue at https://github.com/Sergio0694/ComputeSharp/issues.",
|
||||
helpLinkUri: "https://github.com/Sergio0694/ComputeSharp");
|
||||
|
||||
/// <summary>
|
||||
/// Gets a <see cref="DiagnosticDescriptor"/> for an internal error in <see cref="IShaderGenerator"/>.
|
||||
/// <para>
|
||||
/// Format: <c>"The generator IShaderGenerator failed to execute on type {0}, and trying to use that shader might result in a runtime crash"</c>.
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static readonly DiagnosticDescriptor IShaderGeneratorError = new(
|
||||
id: "CMPS0040",
|
||||
title: $"Internal error for {nameof(IShaderGenerator)}",
|
||||
messageFormat: $"The generator {nameof(IShaderGenerator)} failed to execute on type {{0}}, and trying to use that shader might result in a runtime crash",
|
||||
category: typeof(IShaderGenerator).FullName,
|
||||
defaultSeverity: DiagnosticSeverity.Warning,
|
||||
isEnabledByDefault: true,
|
||||
description: $"The {nameof(IShaderGenerator)} generator encountered an error while processing a type, and trying to use that shader might result in a runtime crash. Please report this issue at https://github.com/Sergio0694/ComputeSharp/issues.",
|
||||
helpLinkUri: "https://github.com/Sergio0694/ComputeSharp");
|
||||
|
||||
/// <summary>
|
||||
/// Gets a <see cref="DiagnosticDescriptor"/> for an internal error in <see cref="ShaderMethodSourceGenerator"/>.
|
||||
/// <para>
|
||||
/// Format: <c>"The generator ShaderMethodSourceGenerator failed to execute on method {0}, and using it in a shader might result in a runtime crash"</c>.
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static readonly DiagnosticDescriptor ShaderMethodSourceGeneratorError = new(
|
||||
id: "CMPS0041",
|
||||
title: $"Internal error for {nameof(ShaderMethodSourceGenerator)}",
|
||||
messageFormat: $"The generator {nameof(ShaderMethodSourceGenerator)} failed to execute on method {{0}}, and using it in a shader might result in a runtime crash",
|
||||
category: typeof(ShaderMethodSourceGenerator).FullName,
|
||||
defaultSeverity: DiagnosticSeverity.Warning,
|
||||
isEnabledByDefault: true,
|
||||
description: $"The {nameof(ShaderMethodSourceGenerator)} generator encountered an error while processing a method, and using it in a shader might result in a runtime crash. Please report this issue at https://github.com/Sergio0694/ComputeSharp/issues.",
|
||||
helpLinkUri: "https://github.com/Sergio0694/ComputeSharp");
|
||||
|
||||
/// <summary>
|
||||
/// Gets a <see cref="DiagnosticDescriptor"/> for an incorrect matrix swizzling property argument.
|
||||
/// </summary>
|
||||
public static readonly DiagnosticDescriptor NonConstantMatrixSwizzledIndex = new(
|
||||
id: "CMPS0042",
|
||||
id: "CMPS0037",
|
||||
title: "Non constant matrix swizzled property argument",
|
||||
messageFormat: "The arguments in a swizzled indexer for a matrix type must be compile-time constants",
|
||||
category: typeof(ShaderMethodSourceGenerator).FullName,
|
||||
@@ -564,7 +516,7 @@ internal static class DiagnosticDescriptors
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static readonly DiagnosticDescriptor InvalidShaderStaticFieldType = new(
|
||||
id: "CMPS0043",
|
||||
id: "CMPS0038",
|
||||
title: "Invalid shader static field type",
|
||||
messageFormat: "The compute shader of type {0} contains a static field \"{1}\" of an invalid type {2} (only primitive, vector and matrix types are supported)",
|
||||
category: typeof(IComputeShader).FullName,
|
||||
@@ -577,7 +529,7 @@ internal static class DiagnosticDescriptors
|
||||
/// Gets a <see cref="DiagnosticDescriptor"/> for an invalid <see cref="DispatchSize"/> usage.
|
||||
/// </summary>
|
||||
public static readonly DiagnosticDescriptor InvalidDispatchSizeUsage = new(
|
||||
id: "CMPS0044",
|
||||
id: "CMPS0039",
|
||||
title: "Invalid DispatchSize usage",
|
||||
messageFormat: "The DispatchSize type can only be used within the main body of a compute shader",
|
||||
category: typeof(IComputeShader).FullName,
|
||||
@@ -590,7 +542,7 @@ internal static class DiagnosticDescriptors
|
||||
/// Gets a <see cref="DiagnosticDescriptor"/> for a property declaration.
|
||||
/// </summary>
|
||||
public static readonly DiagnosticDescriptor PropertyDeclaration = new(
|
||||
id: "CMPS0045",
|
||||
id: "CMPS0040",
|
||||
title: "Property declaration",
|
||||
messageFormat: "Property declarations cannot be used in a compute shader",
|
||||
category: typeof(IComputeShader).FullName,
|
||||
@@ -606,7 +558,7 @@ internal static class DiagnosticDescriptors
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static readonly DiagnosticDescriptor ShaderDispatchDataSizeExceeded = new(
|
||||
id: "CMPS0046",
|
||||
id: "CMPS0041",
|
||||
title: "Shader dispatch data size exceeded",
|
||||
messageFormat: "The compute shader of type {0} has exceeded the maximum allowed size for captured values and resources",
|
||||
category: typeof(IComputeShader).FullName,
|
||||
@@ -622,7 +574,7 @@ internal static class DiagnosticDescriptors
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static readonly DiagnosticDescriptor MultipleShaderTypesImplemented = new(
|
||||
id: "CMPS0047",
|
||||
id: "CMPS0042",
|
||||
title: "Multiple shader implementations for type declaration",
|
||||
messageFormat: $"The shader of type {{0}} cannot implement more than one shader interface",
|
||||
category: typeof(IShaderGenerator).FullName,
|
||||
@@ -638,7 +590,7 @@ internal static class DiagnosticDescriptors
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static readonly DiagnosticDescriptor EmbeddedBytecodeWithDynamicShader = new(
|
||||
id: "CMPS0048",
|
||||
id: "CMPS0043",
|
||||
title: "Embedded bytecode for dynamic shader",
|
||||
messageFormat: $"The shader of type {{0}} cannot be precompiled, as it is dynamic (it captures delegate fields)",
|
||||
category: typeof(IShaderGenerator).FullName,
|
||||
@@ -654,7 +606,7 @@ internal static class DiagnosticDescriptors
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static readonly DiagnosticDescriptor InvalidEmbeddedBytecodeThreadIds = new(
|
||||
id: "CMPS0049",
|
||||
id: "CMPS0044",
|
||||
title: "Invalid thread ids for shader with embedded bytecode",
|
||||
messageFormat: $"The shader of type {{0}} is annotated with invalid thread ids values ({{1}}, {{2}}, {{3}})",
|
||||
category: typeof(IShaderGenerator).FullName,
|
||||
@@ -670,7 +622,7 @@ internal static class DiagnosticDescriptors
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static readonly DiagnosticDescriptor EmbeddedBytecodeFailedWithWin32Exception = new(
|
||||
id: "CMPS0050",
|
||||
id: "CMPS0045",
|
||||
title: "Embedded bytecode compilation failed due to Win32 exception",
|
||||
messageFormat: $"The shader of type {{0}} failed to compile due to a Win32 exception (HRESULT: {{1:X8}}, Message: \"{{2}}\")",
|
||||
category: typeof(IShaderGenerator).FullName,
|
||||
@@ -686,7 +638,7 @@ internal static class DiagnosticDescriptors
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static readonly DiagnosticDescriptor EmbeddedBytecodeFailedWithHlslCompilationException = new(
|
||||
id: "CMPS0051",
|
||||
id: "CMPS0046",
|
||||
title: "Embedded bytecode compilation failed due to an HLSL compiler error",
|
||||
messageFormat: $"The shader of type {{0}} failed to compile due to an HLSL compiler error (Message: \"{{1}}\")",
|
||||
category: typeof(IShaderGenerator).FullName,
|
||||
|
||||
@@ -116,17 +116,6 @@ internal static class ISymbolExtensions
|
||||
return symbol.GetFullMetadataName().Replace('`', '-').Replace('+', '.');
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a valid filename for a target symbol and generator type.
|
||||
/// </summary>
|
||||
/// <param name="symbol">The symbol being processed.</param>
|
||||
/// <returns>A filename in the form "<SYMBOL_FULLNAME>"</returns>
|
||||
[Pure]
|
||||
public static string GetGeneratedFileName(this IMethodSymbol symbol)
|
||||
{
|
||||
return symbol.GetFullMetadataName(true).Replace('`', '-').Replace('+', '.');
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tracks an <see cref="ITypeSymbol"/> instance and returns an HLSL compatible <see cref="TypeSyntax"/> object.
|
||||
/// </summary>
|
||||
|
||||
@@ -167,7 +167,7 @@ public class DiagnosticsTests
|
||||
[DataRow(nameof(GroupIds), "CMPS0007")]
|
||||
[DataRow(nameof(GroupSize), "CMPS0008")]
|
||||
[DataRow(nameof(GridIds), "CMPS0009")]
|
||||
[DataRow(nameof(DispatchSize), "CMPS0044")]
|
||||
[DataRow(nameof(DispatchSize), "CMPS0039")]
|
||||
public void InvalidDispatchInfoUsage_LocalFunction(string typeName, string diagnosticsId)
|
||||
{
|
||||
string source = $@"
|
||||
@@ -202,7 +202,7 @@ public class DiagnosticsTests
|
||||
[DataRow(nameof(GroupIds), "CMPS0007")]
|
||||
[DataRow(nameof(GroupSize), "CMPS0008")]
|
||||
[DataRow(nameof(GridIds), "CMPS0009")]
|
||||
[DataRow(nameof(DispatchSize), "CMPS0044")]
|
||||
[DataRow(nameof(DispatchSize), "CMPS0039")]
|
||||
public void InvalidDispatchInfoUsage_StaticMethod(string typeName, string diagnosticsId)
|
||||
{
|
||||
string source = $@"
|
||||
@@ -1194,7 +1194,7 @@ public class DiagnosticsTests
|
||||
}
|
||||
}";
|
||||
|
||||
VerifyGeneratedDiagnostics<IShaderGenerator>(source, "CMPS0042");
|
||||
VerifyGeneratedDiagnostics<IShaderGenerator>(source, "CMPS0037");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
@@ -1222,7 +1222,7 @@ public class DiagnosticsTests
|
||||
}
|
||||
}";
|
||||
|
||||
VerifyGeneratedDiagnostics<IShaderGenerator>(source, "CMPS0043");
|
||||
VerifyGeneratedDiagnostics<IShaderGenerator>(source, "CMPS0038");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
@@ -1250,7 +1250,7 @@ public class DiagnosticsTests
|
||||
}
|
||||
}";
|
||||
|
||||
VerifyGeneratedDiagnostics<IShaderGenerator>(source, "CMPS0045");
|
||||
VerifyGeneratedDiagnostics<IShaderGenerator>(source, "CMPS0040");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
@@ -1281,7 +1281,7 @@ public class DiagnosticsTests
|
||||
}
|
||||
}";
|
||||
|
||||
VerifyGeneratedDiagnostics<IShaderGenerator>(source, "CMPS0045");
|
||||
VerifyGeneratedDiagnostics<IShaderGenerator>(source, "CMPS0040");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
@@ -1309,7 +1309,7 @@ public class DiagnosticsTests
|
||||
}
|
||||
}";
|
||||
|
||||
VerifyGeneratedDiagnostics<IShaderGenerator>(source, "CMPS0045");
|
||||
VerifyGeneratedDiagnostics<IShaderGenerator>(source, "CMPS0040");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
@@ -1337,7 +1337,7 @@ public class DiagnosticsTests
|
||||
}
|
||||
}";
|
||||
|
||||
VerifyGeneratedDiagnostics<IShaderGenerator>(source, "CMPS0045");
|
||||
VerifyGeneratedDiagnostics<IShaderGenerator>(source, "CMPS0040");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
@@ -1371,7 +1371,7 @@ public class DiagnosticsTests
|
||||
}
|
||||
}";
|
||||
|
||||
VerifyGeneratedDiagnostics<IShaderGenerator>(source, "CMPS0046");
|
||||
VerifyGeneratedDiagnostics<IShaderGenerator>(source, "CMPS0041");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
@@ -1396,7 +1396,7 @@ public class DiagnosticsTests
|
||||
}
|
||||
}";
|
||||
|
||||
VerifyGeneratedDiagnostics<IShaderGenerator>(source, "CMPS0047");
|
||||
VerifyGeneratedDiagnostics<IShaderGenerator>(source, "CMPS0042");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
@@ -1430,7 +1430,7 @@ public class DiagnosticsTests
|
||||
}
|
||||
}";
|
||||
|
||||
VerifyGeneratedDiagnostics<IShaderGenerator>(source, "CMPS0048");
|
||||
VerifyGeneratedDiagnostics<IShaderGenerator>(source, "CMPS0043");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
@@ -1469,7 +1469,7 @@ public class DiagnosticsTests
|
||||
}}
|
||||
}}";
|
||||
|
||||
VerifyGeneratedDiagnostics<IShaderGenerator>(source, "CMPS0049");
|
||||
VerifyGeneratedDiagnostics<IShaderGenerator>(source, "CMPS0044");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする