From ade3a1e453135ecd0e7e057a1e3e49c30f7dd41c Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Tue, 21 Nov 2023 19:31:47 +0100 Subject: [PATCH] Update D2D1 diagnostic descriptors for consistency --- ...D2DPixelShaderDescriptorGenerator.HlslBytecode.cs | 4 ++-- .../Diagnostics/DiagnosticDescriptors.cs | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/ComputeSharp.D2D1.SourceGenerators/D2DPixelShaderDescriptorGenerator.HlslBytecode.cs b/src/ComputeSharp.D2D1.SourceGenerators/D2DPixelShaderDescriptorGenerator.HlslBytecode.cs index 24299b93..5f1420fa 100644 --- a/src/ComputeSharp.D2D1.SourceGenerators/D2DPixelShaderDescriptorGenerator.HlslBytecode.cs +++ b/src/ComputeSharp.D2D1.SourceGenerators/D2DPixelShaderDescriptorGenerator.HlslBytecode.cs @@ -250,14 +250,14 @@ partial class D2DPixelShaderDescriptorGenerator if (info is HlslBytecodeInfo.Win32Error win32Error) { diagnostic = DiagnosticInfo.Create( - EmbeddedBytecodeFailedWithWin32Exception, + HlslBytecodeFailedWithWin32Exception, structDeclarationSymbol, [structDeclarationSymbol, win32Error.HResult, win32Error.Message]); } else if (info is HlslBytecodeInfo.CompilerError fxcError) { diagnostic = DiagnosticInfo.Create( - EmbeddedBytecodeFailedWithFxcCompilationException, + HlslBytecodeFailedWithFxcCompilationException, structDeclarationSymbol, [structDeclarationSymbol, fxcError.Message]); } diff --git a/src/ComputeSharp.D2D1.SourceGenerators/Diagnostics/DiagnosticDescriptors.cs b/src/ComputeSharp.D2D1.SourceGenerators/Diagnostics/DiagnosticDescriptors.cs index 11179510..b18c63ae 100644 --- a/src/ComputeSharp.D2D1.SourceGenerators/Diagnostics/DiagnosticDescriptors.cs +++ b/src/ComputeSharp.D2D1.SourceGenerators/Diagnostics/DiagnosticDescriptors.cs @@ -445,14 +445,14 @@ partial class DiagnosticDescriptors helpLinkUri: "https://github.com/Sergio0694/ComputeSharp"); /// - /// Gets a for an embedded bytecode shader failed due to a Win32 exception. + /// Gets a for HLSL bytecode shader failed due to a Win32 exception. /// /// Format: "The shader of type {0} failed to compile due to a Win32 exception (HRESULT: {1:X8}, Message: "{2}")". /// /// - public static readonly DiagnosticDescriptor EmbeddedBytecodeFailedWithWin32Exception = new( + public static readonly DiagnosticDescriptor HlslBytecodeFailedWithWin32Exception = new( id: "CMPSD2D0033", - title: "Embedded bytecode compilation failed due to Win32 exception", + title: "HLSL 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: "ComputeSharp.D2D1.Shaders", defaultSeverity: DiagnosticSeverity.Error, @@ -461,14 +461,14 @@ partial class DiagnosticDescriptors helpLinkUri: "https://github.com/Sergio0694/ComputeSharp"); /// - /// Gets a for an embedded bytecode shader failed due to an HLSL compilation exception. + /// Gets a for HLSL bytecode shader failed due to an HLSL compilation exception. /// /// Format: "The shader of type {0} failed to compile due to an HLSL compiler error (Message: "{1}")". /// /// - public static readonly DiagnosticDescriptor EmbeddedBytecodeFailedWithFxcCompilationException = new( + public static readonly DiagnosticDescriptor HlslBytecodeFailedWithFxcCompilationException = new( id: "CMPSD2D0034", - title: "Embedded bytecode compilation failed due to an HLSL compiler error", + title: "HLSL 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: "ComputeSharp.D2D1.Shaders", defaultSeverity: DiagnosticSeverity.Error,