Add HlslBytecodeInfoKey and initial setup
このコミットが含まれているのは:
1 親
44849d5d3e
コミット
c3b64a90cd
6ファイル変更
+107
-59
検索条件に一致するファイルはありません
@@ -13,14 +13,15 @@ namespace ComputeSharp.D2D1.SourceGenerators.Models;
|
||||
/// <param name="EffectCategory">The effect category for the shader type, if available.</param>
|
||||
/// <param name="EffectAuthor">The effect author for the shader type, if available.</param>
|
||||
/// <param name="ConstantBufferSizeInBytes">The size of the shader constant buffer.</param>
|
||||
/// <param name="Fields">The description on shader instance fields.</param>
|
||||
/// <param name="InputTypes">The gathered input types for the shader.</param>
|
||||
/// <param name="InputDescriptions">The gathered input descriptions for the shader.</param>
|
||||
/// <param name="ResourceTextureDescriptions">The gathered resource texture descriptions for the shader.</param>
|
||||
/// <param name="HlslShaderSource">The processed HLSL source for the shader.</param>
|
||||
/// <param name="Fields">The description on shader instance fields.</param>
|
||||
/// <param name="BufferPrecision">The buffer precision for the resulting output buffer.</param>
|
||||
/// <param name="ChannelDepth">The channel depth for the resulting output buffer.</param>
|
||||
/// <param name="InputDescriptions">The gathered input descriptions for the shader.</param>
|
||||
/// <param name="PixelOptions">The pixel options used by the shader.</param>
|
||||
/// <param name="HlslInfoKey">The key with processed info on the shader.</param>
|
||||
/// <param name="HlslInfo">The value with processed info on the shader.</param>
|
||||
/// <param name="Diagnostcs">The discovered diagnostics, if any.</param>
|
||||
internal sealed record D2D1ShaderInfo(
|
||||
HierarchyInfo Hierarchy,
|
||||
@@ -30,12 +31,13 @@ internal sealed record D2D1ShaderInfo(
|
||||
string? EffectCategory,
|
||||
string? EffectAuthor,
|
||||
int ConstantBufferSizeInBytes,
|
||||
EquatableArray<FieldInfo> Fields,
|
||||
EquatableArray<uint> InputTypes,
|
||||
EquatableArray<InputDescription> InputDescriptions,
|
||||
EquatableArray<ResourceTextureDescription> ResourceTextureDescriptions,
|
||||
HlslShaderSourceInfo HlslShaderSource,
|
||||
EquatableArray<FieldInfo> Fields,
|
||||
D2D1BufferPrecision BufferPrecision,
|
||||
D2D1ChannelDepth ChannelDepth,
|
||||
EquatableArray<InputDescription> InputDescriptions,
|
||||
D2D1PixelOptions PixelOptions,
|
||||
HlslBytecodeInfoKey HlslInfoKey,
|
||||
HlslBytecodeInfo HlslInfo,
|
||||
EquatableArray<DiagnosticInfo> Diagnostcs);
|
||||
@@ -16,8 +16,9 @@ internal abstract record HlslBytecodeInfo
|
||||
/// <summary>
|
||||
/// An HLSL shader that failed to compile due to a Win32 error.
|
||||
/// </summary>
|
||||
/// <param name="HResult">The HRESULT for the error.</param>
|
||||
/// <param name="Message">The error message from compiling the shader.</param>
|
||||
public sealed record Win32Error(string Message) : HlslBytecodeInfo;
|
||||
public sealed record Win32Error(int HResult, string Message) : HlslBytecodeInfo;
|
||||
|
||||
/// <summary>
|
||||
/// An HLSL shader that failed to compile due to an FXC compiler error.
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
namespace ComputeSharp.D2D1.SourceGenerators.Models;
|
||||
|
||||
/// <summary>
|
||||
/// A model with info to be a unique key for <see cref="HlslBytecodeInfo"/> instances.
|
||||
/// </summary>
|
||||
/// <param name="HlslSource">The input HLSL source code.</param>
|
||||
/// <param name="RequestedShaderProfile">The requested shader profile, if available.</param>
|
||||
/// <param name="RequestedCompileOptions">The requested compile options, if available.</param>
|
||||
/// <param name="EffectiveShaderProfile">The effective shader profile.</param>
|
||||
/// <param name="EffectiveCompileOptions">The effective compile options.</param>
|
||||
/// <param name="HasErrors">Whether any errors were produced when analyzing the shader.</param>
|
||||
internal sealed record HlslBytecodeInfoKey(
|
||||
string HlslSource,
|
||||
D2D1ShaderProfile? RequestedShaderProfile,
|
||||
D2D1CompileOptions? RequestedCompileOptions,
|
||||
D2D1ShaderProfile EffectiveShaderProfile,
|
||||
D2D1CompileOptions EffectiveCompileOptions,
|
||||
bool HasErrors);
|
||||
@@ -1,16 +0,0 @@
|
||||
namespace ComputeSharp.D2D1.SourceGenerators.Models;
|
||||
|
||||
/// <summary>
|
||||
/// A model for extracted info on a processed HLSL shader.
|
||||
/// </summary>
|
||||
/// <param name="HlslSource">The HLSL source.</param>
|
||||
/// <param name="ShaderProfile">The shader profile to use to compile the shader, if requested.</param>
|
||||
/// <param name="CompileOptions">The compile options to use to compile the shader.</param>
|
||||
/// <param name="IsLinkingSupported">Whether the shader supports linking.</param>
|
||||
/// <param name="HasErrors">Whether any errors have been detected, and therefore the shader compilation should be skipped.</param>
|
||||
internal sealed record HlslShaderSourceInfo(
|
||||
string HlslSource,
|
||||
D2D1ShaderProfile? ShaderProfile,
|
||||
D2D1CompileOptions? CompileOptions,
|
||||
bool IsLinkingSupported,
|
||||
bool HasErrors);
|
||||
新しいイシューから参照
ユーザーをブロックする