using System;
using System.Threading;
using ComputeSharp.D2D1.Shaders.Translation;
using ComputeSharp.D2D1.SourceGenerators.Models;
using Windows.Win32;
using Windows.Win32.Graphics.Direct3D;
namespace ComputeSharp.SourceGeneration.SyntaxProcessors;
///
partial class HlslBytecodeSyntaxProcessor
{
///
private static partial string GetRequiresDoublePrecisionSupportAttributeName()
{
return "ComputeSharp.D2D1.D2DRequiresDoublePrecisionSupportAttribute";
}
///
private static partial ComPtr Compile(HlslBytecodeInfoKey key, CancellationToken token)
{
return D3DCompiler.Compile(
key.HlslSource.AsSpan(),
key.ShaderProfile,
key.CompileOptions,
token);
}
///
private static unsafe partial bool IsDoublePrecisionSupportRequired(ID3DBlob* d3DBlob)
{
return D3DCompiler.IsDoublePrecisionSupportRequired(d3DBlob);
}
///
private static partial string FixupErrorMessage(string message)
{
return D3DCompiler.PrettifyFxcErrorMessage(message);
}
}