Add [StringSyntax] to [D2DPixelShaderSource] parameter

このコミットが含まれているのは:
Sergio Pedri committed 2022-08-18 14:26:09 +02:00
1 親 2aa214876c
コミット 51f2642e80
2ファイル変更
+3 -1

検索条件に一致するファイルはありません

+1
ファイルの表示
@@ -64,6 +64,7 @@
<Compile Include="..\ComputeSharp\Shaders\Dispatching\__Internals\ArrayPoolStringBuilder.cs" Link="ComputeSharp\Shaders\Dispatching\__Internals\ArrayPoolStringBuilder.cs" />
<!-- ComputeSharp.D2D1 APIs -->
<Compile Include="..\ComputeSharp.D2D1\Properties\Polyfills\StringSyntaxAttribute.cs" Link="ComputeSharp.D2D1\Properties\Polyfills\StringSyntaxAttribute.cs" />
<Compile Include="..\ComputeSharp.D2D1\Attributes\Enums\D2D1ShaderProfile.cs" Link="ComputeSharp.D2D1\Attributes\Enums\D2D1ShaderProfile.cs" />
<Compile Include="..\ComputeSharp.D2D1\Attributes\Enums\D2D1BufferPrecision.cs" Link="ComputeSharp.D2D1\Attributes\Enums\D2D1BufferPrecision.cs" />
<Compile Include="..\ComputeSharp.D2D1\Attributes\Enums\D2D1ChannelDepth.cs" Link="ComputeSharp.D2D1\Attributes\Enums\D2D1ChannelDepth.cs" />
+2 -1
ファイルの表示
@@ -1,4 +1,5 @@
using System;
using System.Diagnostics.CodeAnalysis;
namespace ComputeSharp.D2D1;
@@ -38,7 +39,7 @@ public sealed class D2DPixelShaderSourceAttribute : Attribute
/// Creates a new instance of the <see cref="D2DPixelShaderSourceAttribute"/> type with the specified arguments.
/// </summary>
/// <param name="hlslSource">The number of texture inputs for the shader.</param>
public D2DPixelShaderSourceAttribute(string hlslSource)
public D2DPixelShaderSourceAttribute([StringSyntax("Hlsl")] string hlslSource)
{
HlslSource = hlslSource;
}