Adopt HlslBytecodeInfo pattern in D3D12 generator
このコミットが含まれているのは:
1 親
49d0ec2a5b
コミット
fa8d9446cd
7ファイル変更
+104
-56
検索条件に一致するファイルはありません
@@ -1,12 +0,0 @@
|
||||
using ComputeSharp.SourceGeneration.Helpers;
|
||||
|
||||
namespace ComputeSharp.SourceGenerators.Models;
|
||||
|
||||
/// <summary>
|
||||
/// A model representing a compiled shader bytecode, or none.
|
||||
/// </summary>
|
||||
/// <param name="X">The thread ids value for the X axis.</param>
|
||||
/// <param name="Y">The thread ids value for the Y axis.</param>
|
||||
/// <param name="Z">The thread ids value for the Z axis.</param>
|
||||
/// <param name="Bytecode">The compiled shader bytecode, if available.</param>
|
||||
internal sealed record EmbeddedBytecodeInfo(int X, int Y, int Z, EquatableArray<byte> Bytecode);
|
||||
@@ -0,0 +1,39 @@
|
||||
using ComputeSharp.SourceGeneration.Helpers;
|
||||
|
||||
namespace ComputeSharp.SourceGenerators.Models;
|
||||
|
||||
/// <summary>
|
||||
/// A model representing info on compiled HLSL bytecode, if available.
|
||||
/// </summary>
|
||||
internal abstract record HlslBytecodeInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// A successfully compiled HLSL shader.
|
||||
/// </summary>
|
||||
/// <param name="Bytecode">The resulting HLSL bytecode.</param>
|
||||
public sealed record Success(EquatableArray<byte> Bytecode) : 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(int HResult, string Message) : HlslBytecodeInfo;
|
||||
|
||||
/// <summary>
|
||||
/// An HLSL shader that failed to compile due to an DXC compiler error.
|
||||
/// </summary>
|
||||
/// <param name="Message">The error message from compiling the shader.</param>
|
||||
public sealed record DxcError(string Message) : HlslBytecodeInfo;
|
||||
|
||||
/// <summary>
|
||||
/// No HLSL bytecode is available (ie. compilation was not requested or some other error was detected).
|
||||
/// </summary>
|
||||
public sealed record Missing : HlslBytecodeInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the shared <see cref="Missing"/> instance.
|
||||
/// </summary>
|
||||
public static Missing Instance { get; } = new();
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@ namespace ComputeSharp.SourceGenerators.Models;
|
||||
/// <param name="DispatchData">The gathered shader dispatch data.</param>
|
||||
/// <param name="DispatchMetadata">The gathered shader dispatch metadata.</param>
|
||||
/// <param name="HlslShaderSource">The processed HLSL source for the shader.</param>
|
||||
/// <param name="EmbeddedBytecode">The info on the compiled bytecode, if available.</param>
|
||||
/// <param name="HlslInfo">The value with processed info on the shader.</param>
|
||||
/// <param name="ThreadIds">The thread ids for the shader, if compilation is requested.</param>
|
||||
/// <param name="Diagnostcs">The discovered diagnostics, if any.</param>
|
||||
internal sealed record ShaderInfo(
|
||||
@@ -18,6 +18,6 @@ internal sealed record ShaderInfo(
|
||||
DispatchDataInfo DispatchData,
|
||||
DispatchMetadataInfo DispatchMetadata,
|
||||
HlslShaderSourceInfo HlslShaderSource,
|
||||
EmbeddedBytecodeInfo EmbeddedBytecode,
|
||||
HlslBytecodeInfo HlslInfo,
|
||||
ThreadIdsInfo ThreadIds,
|
||||
EquatableArray<DiagnosticInfo> Diagnostcs);
|
||||
新しいイシューから参照
ユーザーをブロックする