Disable dynamic shader compilation support
このコミットが含まれているのは:
1 親
3db275a157
コミット
490226aa4d
68ファイル変更
+169
-64
検索条件に一致するファイルはありません
@@ -81,6 +81,7 @@ internal static partial class BlasHelpers
|
||||
/// Kernel for <see cref="FullyConnectedForwardGpu"/>.
|
||||
/// </summary>
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XYZ)]
|
||||
public readonly partial struct FullyConnectedForwardKernel : IComputeShader
|
||||
{
|
||||
private readonly int n;
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
<ProjectReference Include="..\..\src\ComputeSharp.Core\ComputeSharp.Core.csproj" />
|
||||
<ProjectReference Include="..\..\src\ComputeSharp.Core.SourceGenerators\ComputeSharp.Core.SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" PrivateAssets="contentfiles;build" />
|
||||
<ProjectReference Include="..\..\src\ComputeSharp\ComputeSharp.csproj" />
|
||||
<ProjectReference Include="..\..\src\ComputeSharp.Dynamic\ComputeSharp.Dynamic.csproj" />
|
||||
<ProjectReference Include="..\..\src\ComputeSharp.SourceGenerators\ComputeSharp.SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" PrivateAssets="contentfiles;build" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -109,6 +109,7 @@ public partial class DispatchingBenchmark : IDisposable
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct TestShader : IComputeShader
|
||||
{
|
||||
private readonly ReadWriteBuffer<float> buffer;
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
<ProjectReference Include="..\..\src\ComputeSharp.Core\ComputeSharp.Core.csproj" />
|
||||
<ProjectReference Include="..\..\src\ComputeSharp.Core.SourceGenerators\ComputeSharp.Core.SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" PrivateAssets="contentfiles;build" />
|
||||
<ProjectReference Include="..\..\src\ComputeSharp\ComputeSharp.csproj" />
|
||||
<ProjectReference Include="..\..\src\ComputeSharp.Dynamic\ComputeSharp.Dynamic.csproj" />
|
||||
<ProjectReference Include="..\..\src\ComputeSharp.SourceGenerators\ComputeSharp.SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" PrivateAssets="contentfiles;build" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -314,6 +314,7 @@ public sealed partial class HlslBokehBlurProcessor
|
||||
/// Kernel for the vertical convolution pass.
|
||||
/// </summary>
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
internal readonly partial struct VerticalConvolutionProcessor : IComputeShader
|
||||
{
|
||||
private readonly IReadWriteNormalizedTexture2D<float4> source;
|
||||
@@ -351,6 +352,7 @@ public sealed partial class HlslBokehBlurProcessor
|
||||
/// Kernel for the horizontal convolution pass.
|
||||
/// </summary>
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
internal readonly partial struct HorizontalConvolutionAndAccumulatePartialsProcessor : IComputeShader
|
||||
{
|
||||
private readonly float z;
|
||||
@@ -390,6 +392,7 @@ public sealed partial class HlslBokehBlurProcessor
|
||||
/// Kernel for the gamma highlight pass.
|
||||
/// </summary>
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct GammaHighlightProcessor : IComputeShader
|
||||
{
|
||||
private readonly IReadWriteNormalizedTexture2D<float4> source;
|
||||
@@ -414,6 +417,7 @@ public sealed partial class HlslBokehBlurProcessor
|
||||
/// Kernel for the inverse gamma highlight pass.
|
||||
/// </summary>
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct InverseGammaHighlightProcessor : IComputeShader
|
||||
{
|
||||
private readonly ReadWriteTexture2D<float4> source;
|
||||
|
||||
@@ -118,6 +118,7 @@ public sealed partial class HlslGaussianBlurProcessor
|
||||
/// Kernel for the vertical convolution pass.
|
||||
/// </summary>
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
internal readonly partial struct VerticalConvolutionProcessor : IComputeShader
|
||||
{
|
||||
private readonly IReadWriteNormalizedTexture2D<float4> source;
|
||||
@@ -150,6 +151,7 @@ public sealed partial class HlslGaussianBlurProcessor
|
||||
/// Kernel for the horizontal convolution pass.
|
||||
/// </summary>
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
internal readonly partial struct HorizontalConvolutionProcessor : IComputeShader
|
||||
{
|
||||
private readonly IReadWriteNormalizedTexture2D<float4> source;
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
<ProjectReference Include="..\..\src\ComputeSharp.Core\ComputeSharp.Core.csproj" />
|
||||
<ProjectReference Include="..\..\src\ComputeSharp.Core.SourceGenerators\ComputeSharp.Core.SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" PrivateAssets="contentfiles;build" />
|
||||
<ProjectReference Include="..\..\src\ComputeSharp\ComputeSharp.csproj" />
|
||||
<ProjectReference Include="..\..\src\ComputeSharp.Dynamic\ComputeSharp.Dynamic.csproj" />
|
||||
<ProjectReference Include="..\..\src\ComputeSharp.SourceGenerators\ComputeSharp.SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" PrivateAssets="contentfiles;build" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -4,6 +4,7 @@ namespace ComputeSharp.Sample.FSharp.Shaders;
|
||||
/// A sample shader thaat just multiplies items in a buffer by two.
|
||||
/// </summary>
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
public readonly partial struct MultiplyByTwo : IComputeShader
|
||||
{
|
||||
private readonly ReadWriteBuffer<float> buffer;
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
<ProjectReference Include="..\..\src\ComputeSharp.Core\ComputeSharp.Core.csproj" />
|
||||
<ProjectReference Include="..\..\src\ComputeSharp.Core.SourceGenerators\ComputeSharp.Core.SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" PrivateAssets="contentfiles;build" />
|
||||
<ProjectReference Include="..\..\src\ComputeSharp\ComputeSharp.csproj" />
|
||||
<ProjectReference Include="..\..\src\ComputeSharp.Dynamic\ComputeSharp.Dynamic.csproj" />
|
||||
<ProjectReference Include="..\..\src\ComputeSharp.SourceGenerators\ComputeSharp.SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" PrivateAssets="contentfiles;build" />
|
||||
<ProjectReference Include="..\ComputeSharp.Sample.FSharp.Shaders\ComputeSharp.Sample.FSharp.Shaders.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
<ProjectReference Include="..\..\src\ComputeSharp.Core\ComputeSharp.Core.csproj" />
|
||||
<ProjectReference Include="..\..\src\ComputeSharp.Core.SourceGenerators\ComputeSharp.Core.SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" PrivateAssets="contentfiles;build" />
|
||||
<ProjectReference Include="..\..\src\ComputeSharp\ComputeSharp.csproj" />
|
||||
<ProjectReference Include="..\..\src\ComputeSharp.Dynamic\ComputeSharp.Dynamic.csproj" />
|
||||
<ProjectReference Include="..\..\src\ComputeSharp.SourceGenerators\ComputeSharp.SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" PrivateAssets="contentfiles;build" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -24,6 +24,7 @@ Formatting.PrintMatrix(array, 10, 10, "AFTER");
|
||||
/// The sample kernel that multiples all items by two.
|
||||
/// </summary>
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct MultiplyByTwo : IComputeShader
|
||||
{
|
||||
private readonly ReadWriteBuffer<float> buffer;
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
<OutputType Condition="'$(CI_RUNNER_SAMPLES_INTEGRATION_TESTS)' != 'true'">WinExe</OutputType>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<Platforms>x64;ARM64</Platforms>
|
||||
<DefineConstants>$(DefineConstants);SAMPLE_APP</DefineConstants>
|
||||
<NoWarn>$(NoWarn);CA1416</NoWarn>
|
||||
<AssemblyName>computesharp.cli</AssemblyName>
|
||||
|
||||
|
||||
@@ -7,9 +7,7 @@ namespace ComputeSharp.SwapChain.Shaders;
|
||||
/// <para>License Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.</para>
|
||||
/// </summary>
|
||||
[AutoConstructor]
|
||||
#if SAMPLE_APP
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
#endif
|
||||
internal readonly partial struct ColorfulInfinity : IPixelShader<float4>
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -6,9 +6,7 @@ namespace ComputeSharp.SwapChain.Shaders;
|
||||
/// <para>Created by Shane.</para>
|
||||
/// </summary>
|
||||
[AutoConstructor]
|
||||
#if SAMPLE_APP
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
#endif
|
||||
internal readonly partial struct ContouredLayers : IPixelShader<float4>
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -6,9 +6,7 @@ namespace ComputeSharp.SwapChain.Shaders;
|
||||
/// <para>Created by Shane.</para>
|
||||
/// </summary>
|
||||
[AutoConstructor]
|
||||
#if SAMPLE_APP
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
#endif
|
||||
internal readonly partial struct ExtrudedTruchetPattern : IPixelShader<float4>
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -7,9 +7,7 @@ namespace ComputeSharp.SwapChain.Shaders;
|
||||
/// <para>License Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.</para>
|
||||
/// </summary>
|
||||
[AutoConstructor]
|
||||
#if SAMPLE_APP
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
#endif
|
||||
internal readonly partial struct FourColorGradient : IPixelShader<float4>
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -7,9 +7,7 @@ namespace ComputeSharp.SwapChain.Shaders;
|
||||
/// <para>License Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.</para>
|
||||
/// </summary>
|
||||
[AutoConstructor]
|
||||
#if SAMPLE_APP
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
#endif
|
||||
internal readonly partial struct FractalTiling : IPixelShader<float4>
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -5,9 +5,7 @@ namespace ComputeSharp.SwapChain.Shaders;
|
||||
/// Ported from <see href="https://www.shadertoy.com/new"/>.
|
||||
/// </summary>
|
||||
[AutoConstructor]
|
||||
#if SAMPLE_APP
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
#endif
|
||||
internal readonly partial struct HelloWorld : IPixelShader<float4>
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -6,9 +6,7 @@ namespace ComputeSharp.SwapChain.Shaders;
|
||||
/// <para>Created by Syntopia.</para>
|
||||
/// </summary>
|
||||
[AutoConstructor]
|
||||
#if SAMPLE_APP
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
#endif
|
||||
internal readonly partial struct MengerJourney : IPixelShader<float4>
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -6,9 +6,7 @@ namespace ComputeSharp.SwapChain.Shaders;
|
||||
/// <para>Created by whisky_shusuky.</para>
|
||||
/// </summary>
|
||||
[AutoConstructor]
|
||||
#if SAMPLE_APP
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
#endif
|
||||
internal readonly partial struct Octagrams : IPixelShader<float4>
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -7,9 +7,7 @@ namespace ComputeSharp.SwapChain.Shaders;
|
||||
/// <para>License Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.</para>
|
||||
/// </summary>
|
||||
[AutoConstructor]
|
||||
#if SAMPLE_APP
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
#endif
|
||||
internal readonly partial struct ProteanClouds : IPixelShader<float4>
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -7,9 +7,7 @@ namespace ComputeSharp.SwapChain.Shaders;
|
||||
/// <para>Created by Shane.</para>
|
||||
/// </summary>
|
||||
[AutoConstructor]
|
||||
#if SAMPLE_APP
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
#endif
|
||||
internal readonly partial struct PyramidPattern : IPixelShader<float4>
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -6,9 +6,7 @@ namespace ComputeSharp.SwapChain.Shaders;
|
||||
/// <para>Created by Shane.</para>
|
||||
/// </summary>
|
||||
[AutoConstructor]
|
||||
#if SAMPLE_APP
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
#endif
|
||||
internal readonly partial struct TerracedHills : IPixelShader<float4>
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -6,9 +6,7 @@ namespace ComputeSharp.SwapChain.Shaders;
|
||||
/// <para>Created by Shane.</para>
|
||||
/// </summary>
|
||||
[AutoConstructor]
|
||||
#if SAMPLE_APP
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
#endif
|
||||
internal readonly partial struct TriangleGridContouring : IPixelShader<float4>
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -6,9 +6,7 @@ namespace ComputeSharp.SwapChain.Shaders;
|
||||
/// <para>Created by Shane.</para>
|
||||
/// </summary>
|
||||
[AutoConstructor]
|
||||
#if SAMPLE_APP
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
#endif
|
||||
internal readonly partial struct TwoTiledTruchet : IPixelShader<float4>
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
<PublishProfile>win10-$(Platform).pubxml</PublishProfile>
|
||||
<UseWinUI>true</UseWinUI>
|
||||
<EnableMsixTooling>true</EnableMsixTooling>
|
||||
<DefineConstants>$(DefineConstants);SAMPLE_APP</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Platforms>x64;ARM64</Platforms>
|
||||
<DefineConstants>$(DefineConstants);SAMPLE_APP</DefineConstants>
|
||||
<NoWarn>$(NoWarn);CA1416;IDE0210</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
+1
-3
@@ -28,9 +28,7 @@ partial class IShaderGenerator
|
||||
public static MethodDeclarationSyntax GetSyntax(HlslShaderSourceInfo hlslSourceInfo, bool supportsDynamicShaders, int hierarchyDepth)
|
||||
{
|
||||
// Generate the necessary body statements depending on whether dynamic shaders are supported
|
||||
ImmutableArray<StatementSyntax> bodyStatements = supportsDynamicShaders
|
||||
? GenerateRenderMethodBody(hlslSourceInfo, hierarchyDepth)
|
||||
: GenerateEmptyMethodBody();
|
||||
ImmutableArray<StatementSyntax> bodyStatements = GenerateRenderMethodBody(hlslSourceInfo, hierarchyDepth);
|
||||
|
||||
// This code produces a method declaration as follows:
|
||||
//
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using ComputeSharp.SourceGeneration.Models;
|
||||
using ComputeSharp.SourceGenerators.Models;
|
||||
using Microsoft.CodeAnalysis;
|
||||
@@ -45,16 +44,6 @@ partial class IShaderGenerator
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks whether dynamic shaders are supported in a given compilation.
|
||||
/// </summary>
|
||||
/// <param name="compilation">The <see cref="Compilation"/> instance currently in use.</param>
|
||||
/// <returns>Whether dynamic shaders are supported in the input compilation.</returns>
|
||||
private static bool IsDynamicCompilationSupported(Compilation compilation)
|
||||
{
|
||||
return compilation.ReferencedAssemblyNames.Any(static identity => identity.Name is "ComputeSharp.Dynamic");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a <see cref="CompilationUnitSyntax"/> instance wrapping the given method.
|
||||
/// </summary>
|
||||
|
||||
@@ -25,7 +25,7 @@ public sealed partial class IShaderGenerator : IIncrementalGenerator
|
||||
// Check whether or not dynamic shaders are supported
|
||||
IncrementalValueProvider<bool> supportsDynamicShaders =
|
||||
context.CompilationProvider
|
||||
.Select(static (compilation, _) => IsDynamicCompilationSupported(compilation));
|
||||
.Select(static (compilation, _) => false);
|
||||
|
||||
// Discover all shader types and extract all the necessary info from each of them
|
||||
IncrementalValuesProvider<ShaderInfo> shaderInfoWithErrors =
|
||||
@@ -88,7 +88,7 @@ public sealed partial class IShaderGenerator : IIncrementalGenerator
|
||||
ThreadIdsInfo threadIds = LoadBytecode.GetInfo(
|
||||
diagnostics,
|
||||
typeSymbol,
|
||||
IsDynamicCompilationSupported(context.SemanticModel.Compilation));
|
||||
false);
|
||||
|
||||
token.ThrowIfCancellationRequested();
|
||||
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
#if NET6_0_OR_GREATER
|
||||
using System.Runtime.Versioning;
|
||||
#endif
|
||||
using ComputeSharp;
|
||||
using ComputeSharp.Interop;
|
||||
|
||||
#if NET6_0_OR_GREATER
|
||||
[assembly: SupportedOSPlatform("windows6.2")]
|
||||
#endif
|
||||
|
||||
float[] array = Enumerable.Range(1, 100).Select(static i => (float)i).ToArray();
|
||||
|
||||
@@ -26,10 +23,18 @@ for (int i = 0; i < array.Length; i++)
|
||||
Trace.Assert(result[i] == array[i] * 2);
|
||||
}
|
||||
|
||||
// Also get the shader info (this requires DXC to be present)
|
||||
ShaderInfo shaderInfo = ReflectionServices.GetShaderInfo<MultiplyByTwo>();
|
||||
|
||||
// Validate a couple properties as a sanity check
|
||||
Trace.Assert(shaderInfo.HlslSource is { Length: > 0 });
|
||||
Trace.Assert(shaderInfo.BoundResourceCount == 2);
|
||||
|
||||
/// <summary>
|
||||
/// A sample kernel that requires dynamic compilation, as it's not precompiled.
|
||||
/// </summary>
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct MultiplyByTwo : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteBuffer<float> buffer;
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace ComputeSharp.Tests.Internals;
|
||||
public partial class ShaderDataLoaderTests
|
||||
{
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
public partial struct CapturedResourceShader : IComputeShader
|
||||
{
|
||||
public ReadWriteBuffer<float> _;
|
||||
@@ -39,6 +40,7 @@ public partial class ShaderDataLoaderTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
public partial struct MultipleResourcesAndPrimitivesShader : IComputeShader
|
||||
{
|
||||
public ReadWriteBuffer<float> _0;
|
||||
@@ -76,6 +78,7 @@ public partial class ShaderDataLoaderTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
public partial struct ScalarAndVectorTypesShader : IComputeShader
|
||||
{
|
||||
public ReadWriteBuffer<float> _;
|
||||
@@ -127,6 +130,7 @@ public partial class ShaderDataLoaderTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
public partial struct ScalarVectorAndMatrixTypesShader : IComputeShader
|
||||
{
|
||||
public ReadWriteBuffer<float> _;
|
||||
@@ -213,6 +217,7 @@ public partial class ShaderDataLoaderTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
public partial struct FlatCustomTypeShader : IComputeShader
|
||||
{
|
||||
public ReadWriteBuffer<float> _0;
|
||||
@@ -305,6 +310,7 @@ public partial class ShaderDataLoaderTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
public partial struct NestedCustomTypesShader : IComputeShader
|
||||
{
|
||||
public ReadWriteBuffer<float> _0;
|
||||
@@ -397,6 +403,7 @@ public partial class ShaderDataLoaderTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
public partial struct AmbiguousNamesShader : IComputeShader
|
||||
{
|
||||
public ReadWriteBuffer<float> a;
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ public class DynamicNativeLibrariesResolverTests : NativeLibrariesResolverTestsB
|
||||
}
|
||||
|
||||
string coreProjectPath = Path.Combine(path, "src", "ComputeSharp.Core", "ComputeSharp.Core.csproj");
|
||||
string projectPath = Path.Combine(path, "src", "ComputeSharp.Package", "ComputeSharp.Package.csproj");
|
||||
string projectPath = Path.Combine(path, "src", "ComputeSharp", "ComputeSharp.csproj");
|
||||
string dynamicProjectPath = Path.Combine(path, "src", "ComputeSharp.Dynamic", "ComputeSharp.Dynamic.csproj");
|
||||
|
||||
Process.Start("dotnet", $"pack {coreProjectPath} -c Release").WaitForExit();
|
||||
|
||||
@@ -26,7 +26,7 @@ public class PixNativeLibrariesResolverTests : NativeLibrariesResolverTestsBase
|
||||
}
|
||||
|
||||
string coreProjectPath = Path.Combine(path, "src", "ComputeSharp.Core", "ComputeSharp.Core.csproj");
|
||||
string projectPath = Path.Combine(path, "src", "ComputeSharp.Package", "ComputeSharp.Package.csproj");
|
||||
string projectPath = Path.Combine(path, "src", "ComputeSharp", "ComputeSharp.csproj");
|
||||
string pixProjectPath = Path.Combine(path, "src", "ComputeSharp.Pix", "ComputeSharp.Pix.csproj");
|
||||
|
||||
// Run dotnet pack and on the packaging projects, to ensure the local NuGet packages are available
|
||||
|
||||
@@ -278,6 +278,7 @@ public partial class BufferTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct ConstantBufferKernel : IComputeShader
|
||||
{
|
||||
public readonly ConstantBuffer<int> source;
|
||||
@@ -306,6 +307,7 @@ public partial class BufferTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct ReadOnlyBufferKernel : IComputeShader
|
||||
{
|
||||
public readonly ReadOnlyBuffer<int> source;
|
||||
@@ -334,6 +336,7 @@ public partial class BufferTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct ReadWriteBufferKernel : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteBuffer<int> source;
|
||||
@@ -369,6 +372,7 @@ public partial class BufferTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
public readonly partial struct DoublePrecisionSupportShader : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteBuffer<double> buffer;
|
||||
|
||||
@@ -1294,6 +1294,7 @@ public partial class ComputeContextTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct OffsetComputeShader : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteBuffer<int> buffer;
|
||||
@@ -1307,6 +1308,7 @@ public partial class ComputeContextTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
internal readonly partial struct ClearPixelShader : IPixelShader<float4>
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
@@ -1317,6 +1319,7 @@ public partial class ComputeContextTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
internal readonly partial struct ColorPixelShader : IPixelShader<float4>
|
||||
{
|
||||
public readonly float4 color;
|
||||
@@ -1329,6 +1332,7 @@ public partial class ComputeContextTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
internal readonly partial struct LinearSampling2DPixelShader : IPixelShader<float4>
|
||||
{
|
||||
public readonly IReadOnlyTexture2D<float4> source;
|
||||
@@ -1341,6 +1345,7 @@ public partial class ComputeContextTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XYZ)]
|
||||
internal readonly partial struct LinearSampling3DComputeShader : IComputeShader
|
||||
{
|
||||
public readonly IReadOnlyTexture3D<float4> source;
|
||||
@@ -1359,6 +1364,7 @@ public partial class ComputeContextTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
internal readonly partial struct LinearSamplingFromNormalized2DPixelShader : IPixelShader<float4>
|
||||
{
|
||||
public readonly IReadOnlyNormalizedTexture2D<float4> source;
|
||||
@@ -1371,6 +1377,7 @@ public partial class ComputeContextTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
internal readonly partial struct CopyToOutputPixelShader : IPixelShader<float4>
|
||||
{
|
||||
public readonly IReadOnlyNormalizedTexture2D<float4> source;
|
||||
@@ -1383,6 +1390,7 @@ public partial class ComputeContextTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
internal readonly partial struct InvertPixelShader : IPixelShader<float4>
|
||||
{
|
||||
public readonly IReadWriteNormalizedTexture2D<float4> source;
|
||||
@@ -1395,6 +1403,7 @@ public partial class ComputeContextTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XYZ)]
|
||||
internal readonly partial struct LinearSamplingFromNormalized3DComputeShader : IComputeShader
|
||||
{
|
||||
public readonly IReadOnlyNormalizedTexture3D<float4> source;
|
||||
@@ -1413,6 +1422,7 @@ public partial class ComputeContextTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
internal readonly partial struct Dotted2DPixelShader : IComputeShader
|
||||
{
|
||||
public readonly IReadWriteNormalizedTexture2D<float4> source;
|
||||
@@ -1441,6 +1451,7 @@ public partial class ComputeContextTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XYZ)]
|
||||
internal readonly partial struct Dotted3DPixelShader : IComputeShader
|
||||
{
|
||||
public readonly IReadWriteNormalizedTexture3D<float4> source;
|
||||
@@ -1469,6 +1480,7 @@ public partial class ComputeContextTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
internal readonly partial struct ConvertToNonNormalized2DShader : IComputeShader
|
||||
{
|
||||
public readonly IReadOnlyNormalizedTexture2D<float4> source;
|
||||
|
||||
@@ -57,6 +57,7 @@ public partial class DispatchTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XYZ)]
|
||||
internal readonly partial struct ThreadIdsShader : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteTexture3D<int4> buffer;
|
||||
@@ -111,6 +112,7 @@ public partial class DispatchTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XYZ)]
|
||||
internal readonly partial struct ThreadIdsNormalizedShader : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteTexture3D<float4> buffer;
|
||||
@@ -172,6 +174,7 @@ public partial class DispatchTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XYZ)]
|
||||
internal readonly partial struct GroupIdsShader : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteTexture3D<int4> buffer;
|
||||
@@ -202,6 +205,7 @@ public partial class DispatchTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(4, 15, 7)]
|
||||
internal readonly partial struct GroupSizeShader : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteBuffer<int> buffer;
|
||||
@@ -234,6 +238,7 @@ public partial class DispatchTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(32, 1, 1)]
|
||||
internal readonly partial struct GridIdsShader : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteBuffer<int> buffer;
|
||||
@@ -265,6 +270,7 @@ public partial class DispatchTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XYZ)]
|
||||
internal readonly partial struct DispatchSizeShader : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteBuffer<int> buffer;
|
||||
@@ -304,6 +310,7 @@ public partial class DispatchTests
|
||||
}
|
||||
}
|
||||
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
internal readonly partial struct DispatchPixelShader : IPixelShader<float4>
|
||||
{
|
||||
public float4 Execute()
|
||||
@@ -333,6 +340,7 @@ public partial class DispatchTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct FixedGroupSharedPixelShader : IComputeShader
|
||||
{
|
||||
private readonly ReadWriteBuffer<int> buffer;
|
||||
@@ -376,6 +384,7 @@ public partial class DispatchTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(32, 1, 1)]
|
||||
internal readonly partial struct DynamicGroupSharedPixelShader : IComputeShader
|
||||
{
|
||||
private readonly ReadWriteBuffer<int> buffer;
|
||||
|
||||
@@ -35,6 +35,7 @@ public partial class IPixelShaderTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
internal readonly partial struct EarlyReturnShader : IPixelShader<float4>
|
||||
{
|
||||
public float4 Execute()
|
||||
|
||||
@@ -73,6 +73,7 @@ public partial class InitializationTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct SampleShader : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteBuffer<int> buffer;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using ComputeSharp.Tests.Attributes;
|
||||
using ComputeSharp.Tests.Attributes;
|
||||
using ComputeSharp.Tests.Extensions;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
@@ -29,6 +29,7 @@ public partial class ResourceDimensionsTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct ReadOnlyBuffer_T1_AsReadOnlyBufferShader : IComputeShader
|
||||
{
|
||||
public readonly ReadOnlyBuffer<float> source;
|
||||
@@ -61,6 +62,7 @@ public partial class ResourceDimensionsTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct ReadWriteBuffer_T1_AsReadWriteBufferShader : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteBuffer<float> source;
|
||||
@@ -93,6 +95,7 @@ public partial class ResourceDimensionsTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct ReadOnlyTexture1D_T1_AsReadOnlyTexture1DShader : IComputeShader
|
||||
{
|
||||
public readonly ReadOnlyTexture1D<float> source;
|
||||
@@ -125,6 +128,7 @@ public partial class ResourceDimensionsTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct ReadWriteTexture1D_T1_AsReadWriteTexture1DShader : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteTexture1D<float> source;
|
||||
@@ -161,6 +165,7 @@ public partial class ResourceDimensionsTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct ReadWriteTexture1D_T1_AsIReadOnlyTexture1DShader : IComputeShader
|
||||
{
|
||||
public readonly IReadOnlyTexture1D<float> source;
|
||||
@@ -193,6 +198,7 @@ public partial class ResourceDimensionsTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct ReadOnlyTexture1D_T2_AsReadOnlyTexture1DShader : IComputeShader
|
||||
{
|
||||
public readonly ReadOnlyTexture1D<Rgba32, float4> source;
|
||||
@@ -225,6 +231,7 @@ public partial class ResourceDimensionsTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct ReadOnlyTexture1D_T2_AsIReadOnlyNormalizedTexture1DShader : IComputeShader
|
||||
{
|
||||
public readonly IReadOnlyNormalizedTexture1D<float4> source;
|
||||
@@ -257,6 +264,7 @@ public partial class ResourceDimensionsTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct ReadWriteTexture1D_T2_AsReadWriteTexture1DShader : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteTexture1D<Rgba32, float4> source;
|
||||
@@ -289,6 +297,7 @@ public partial class ResourceDimensionsTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct ReadWriteTexture1D_T2_AsIReadWriteNormalizedTexture1DShader : IComputeShader
|
||||
{
|
||||
public readonly IReadWriteNormalizedTexture1D<float4> source;
|
||||
@@ -321,6 +330,7 @@ public partial class ResourceDimensionsTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct ReadOnlyTexture2D_T1_AsReadOnlyTexture2DShader : IComputeShader
|
||||
{
|
||||
public readonly ReadOnlyTexture2D<float> source;
|
||||
@@ -354,6 +364,7 @@ public partial class ResourceDimensionsTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct ReadWriteTexture2D_T1_AsReadWriteTexture2DShader : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteTexture2D<float> source;
|
||||
@@ -391,6 +402,7 @@ public partial class ResourceDimensionsTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct ReadWriteTexture2D_T1_AsIReadOnlyTexture2DShader : IComputeShader
|
||||
{
|
||||
public readonly IReadOnlyTexture2D<float> source;
|
||||
@@ -424,6 +436,7 @@ public partial class ResourceDimensionsTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct ReadOnlyTexture2D_T2_AsReadOnlyTexture2DShader : IComputeShader
|
||||
{
|
||||
public readonly ReadOnlyTexture2D<Rgba32, float4> source;
|
||||
@@ -457,6 +470,7 @@ public partial class ResourceDimensionsTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct ReadOnlyTexture2D_T2_AsIReadOnlyNormalizedTexture2DShader : IComputeShader
|
||||
{
|
||||
public readonly IReadOnlyNormalizedTexture2D<float4> source;
|
||||
@@ -490,6 +504,7 @@ public partial class ResourceDimensionsTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct ReadWriteTexture2D_T2_AsReadWriteTexture2DShader : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteTexture2D<Rgba32, float4> source;
|
||||
@@ -523,6 +538,7 @@ public partial class ResourceDimensionsTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct ReadWriteTexture2D_T2_AsIReadWriteNormalizedTexture2DShader : IComputeShader
|
||||
{
|
||||
public readonly IReadWriteNormalizedTexture2D<float4> source;
|
||||
@@ -556,6 +572,7 @@ public partial class ResourceDimensionsTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct ReadOnlyTexture3D_T1_AsReadOnlyTexture3DShader : IComputeShader
|
||||
{
|
||||
public readonly ReadOnlyTexture3D<float> source;
|
||||
@@ -590,6 +607,7 @@ public partial class ResourceDimensionsTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct ReadWriteTexture3D_T1_AsReadWriteTexture3DShader : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteTexture3D<float> source;
|
||||
@@ -628,6 +646,7 @@ public partial class ResourceDimensionsTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct ReadWriteTexture3D_T1_AsIReadOnlyTexture3DShader : IComputeShader
|
||||
{
|
||||
public readonly IReadOnlyTexture3D<float> source;
|
||||
@@ -662,6 +681,7 @@ public partial class ResourceDimensionsTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct ReadOnlyTexture3D_T2_AsReadOnlyTexture3DShader : IComputeShader
|
||||
{
|
||||
public readonly ReadOnlyTexture3D<Rgba32, float4> source;
|
||||
@@ -696,6 +716,7 @@ public partial class ResourceDimensionsTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct ReadOnlyTexture3D_T2_AsIReadOnlyNormalizedTexture3DShader : IComputeShader
|
||||
{
|
||||
public readonly IReadOnlyNormalizedTexture3D<float4> source;
|
||||
@@ -730,6 +751,7 @@ public partial class ResourceDimensionsTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct ReadWriteTexture3D_T2_AsReadWriteTexture3DShader : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteTexture3D<Rgba32, float4> source;
|
||||
@@ -764,6 +786,7 @@ public partial class ResourceDimensionsTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct ReadWriteTexture3D_T2_AsIReadWriteNormalizedTexture3DShader : IComputeShader
|
||||
{
|
||||
public readonly IReadWriteNormalizedTexture3D<float4> source;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<#@ template debug="false" hostspecific="false" language="C#" #>
|
||||
<#@ template debug="false" hostspecific="false" language="C#" #>
|
||||
<#@ assembly name="System.Core" #>
|
||||
<#@ import namespace="System.Linq" #>
|
||||
<#@ import namespace="System.Text.RegularExpressions" #>
|
||||
@@ -132,6 +132,7 @@ foreach (var pair in typesMap)
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct <#=testMethodName#>Shader : IComputeShader
|
||||
{
|
||||
public readonly <#=shaderResourceType#> source;
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace ComputeSharp.Tests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
public readonly partial struct ReservedKeywordsShader : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteBuffer<float> row_major;
|
||||
@@ -53,6 +54,7 @@ namespace ComputeSharp.Tests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
public readonly partial struct ReservedKeywordsInCustomTypesShader : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteBuffer<float> row_major;
|
||||
@@ -80,6 +82,7 @@ namespace ComputeSharp.Tests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
public readonly partial struct ReservedKeywordsFromHlslTypesAndBuiltInValuesShader : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteBuffer<float> fragmentKeyword;
|
||||
@@ -158,6 +161,7 @@ namespace ComputeSharp.Tests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
public readonly partial struct SpecialTypeAsReturnTypeShader : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteBuffer<float2> buffer;
|
||||
@@ -179,6 +183,7 @@ namespace ComputeSharp.Tests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
public readonly partial struct LocalFunctionInExternalMethodsShader : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteBuffer<float2> buffer;
|
||||
@@ -210,6 +215,7 @@ namespace ComputeSharp.Tests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
public readonly partial struct CapturedNestedStructTypeShader : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteBuffer<float> buffer;
|
||||
@@ -229,6 +235,7 @@ namespace ComputeSharp.Tests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
public readonly partial struct ExternalStructTypeShader : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteBuffer<float> buffer;
|
||||
@@ -250,6 +257,7 @@ namespace ComputeSharp.Tests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
public readonly partial struct OutOfOrderMethodsShader : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteBuffer<float> buffer;
|
||||
@@ -285,6 +293,7 @@ namespace ComputeSharp.Tests
|
||||
Assert.AreEqual(info.BoundResourceCount, 2u);
|
||||
}
|
||||
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
public readonly partial struct StatelessPixelShader : IPixelShader<float4>
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
@@ -295,6 +304,7 @@ namespace ComputeSharp.Tests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
public readonly partial struct LoopWithVarCounterShader : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteBuffer<float> buffer;
|
||||
@@ -324,6 +334,7 @@ namespace ComputeSharp.Tests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
public readonly partial struct DoublePrecisionSupportShader : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteBuffer<double> buffer;
|
||||
@@ -343,6 +354,7 @@ namespace ComputeSharp.Tests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct FieldAccessWithThisExpressionShader : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteBuffer<float> buffer;
|
||||
@@ -369,6 +381,7 @@ namespace ComputeSharp.Tests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct ComputeShaderWithInheritedShaderInterfaceShader : IMyBaseShader
|
||||
{
|
||||
int IMyBaseShader.A => 42;
|
||||
@@ -402,6 +415,7 @@ namespace ComputeSharp.Tests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct PixelShaderWithInheritedShaderInterfaceShader : IMyBaseShader<float4>
|
||||
{
|
||||
int IMyBaseShader<float4>.A => 42;
|
||||
@@ -450,6 +464,7 @@ namespace ComputeSharp.Tests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct StructInstanceMethodsShader : IComputeShader
|
||||
{
|
||||
public readonly MyStructTypeA a;
|
||||
@@ -483,6 +498,7 @@ namespace ComputeSharp.Tests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct PixelShaderWithScopedParameterInMethodsShader : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteBuffer<float> buffer;
|
||||
@@ -520,6 +536,7 @@ namespace ExternalNamespace
|
||||
public partial class ShaderCompilerTestsInExternalNamespace
|
||||
{
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
public readonly partial struct UserDefinedTypeShader : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteBuffer<float> buffer;
|
||||
|
||||
@@ -31,6 +31,7 @@ public partial class ShaderMembersTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct StaticConstantsShader : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteBuffer<float> buffer;
|
||||
@@ -70,6 +71,7 @@ public partial class ShaderMembersTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct GlobalVariableShader : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteBuffer<int> buffer;
|
||||
@@ -104,6 +106,7 @@ public partial class ShaderMembersTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct BoolInstanceFieldsShader : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteBuffer<int> buffer;
|
||||
@@ -167,6 +170,7 @@ public partial class ShaderMembersTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct BoolInstanceFieldInCustomStructShader : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteBuffer<Int2AndBoolField> buffer;
|
||||
|
||||
@@ -52,6 +52,7 @@ public partial class ShaderRewriterTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct NanAndInfiniteShader : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteBuffer<float> buffer1;
|
||||
@@ -112,6 +113,7 @@ public partial class ShaderRewriterTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct ModAndComparisonOperatorsShader : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteBuffer<float> buffer;
|
||||
@@ -173,6 +175,7 @@ public partial class ShaderRewriterTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct BitwiseOperatorsShader : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteBuffer<int> buffer;
|
||||
@@ -225,6 +228,7 @@ public partial class ShaderRewriterTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct BooleanOperatorsShader : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteBuffer<int> buffer;
|
||||
@@ -274,6 +278,7 @@ public partial class ShaderRewriterTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct ToBooleanConversionIntrinsicsShader : IComputeShader
|
||||
{
|
||||
public readonly ReadOnlyBuffer<float> buffer1;
|
||||
@@ -357,6 +362,7 @@ public partial class ShaderRewriterTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct FromBooleanConversionIntrinsicsShader : IComputeShader
|
||||
{
|
||||
public readonly ReadOnlyBuffer<int> source;
|
||||
@@ -439,6 +445,7 @@ public partial class ShaderRewriterTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct ConstantsInShaderConstantFieldsShader : IComputeShader
|
||||
{
|
||||
public const float rot_angle = (float)(137.2 / 180.0 * Math.PI);
|
||||
@@ -516,6 +523,7 @@ public partial class ShaderRewriterTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct DoubleConstantsInShaderConstantFieldsShader : IComputeShader
|
||||
{
|
||||
public const float DoubleToFloatConstant = (float)(1 / 255.0);
|
||||
@@ -622,6 +630,7 @@ public partial class ShaderRewriterTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct GlslStyleMulOperatorsShader : IComputeShader
|
||||
{
|
||||
public readonly ReadOnlyBuffer<float> source1;
|
||||
@@ -762,6 +771,7 @@ public partial class ShaderRewriterTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct CustomStructTypeShader : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteBuffer<CustomStructType> source;
|
||||
@@ -799,6 +809,7 @@ public partial class ShaderRewriterTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct MiscHlslIntrinsicsShader : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteBuffer<float> buffer1;
|
||||
@@ -841,6 +852,7 @@ public partial class ShaderRewriterTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct ReadonlyModifierInMethodsShader : IComputeShader
|
||||
{
|
||||
private readonly ReadWriteBuffer<int> buffer;
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace ComputeSharp.SwapChain.Shaders.Compute;
|
||||
/// <para>License Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.</para>
|
||||
/// </summary>
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
internal readonly partial struct ColorfulInfinity : IComputeShader
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -8,6 +8,7 @@ namespace ComputeSharp.SwapChain.Shaders.Compute;
|
||||
/// <para>Created by Shane.</para>
|
||||
/// </summary>
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
internal readonly partial struct ContouredLayers : IComputeShader
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -8,6 +8,7 @@ namespace ComputeSharp.SwapChain.Shaders.Compute;
|
||||
/// <para>Created by Shane.</para>
|
||||
/// </summary>
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
internal readonly partial struct ExtrudedTruchetPattern : IComputeShader
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace ComputeSharp.SwapChain.Shaders.Compute;
|
||||
/// <para>License Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.</para>
|
||||
/// </summary>
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
internal readonly partial struct FourColorGradient : IComputeShader
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace ComputeSharp.SwapChain.Shaders.Compute;
|
||||
/// <para>License Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.</para>
|
||||
/// </summary>
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
internal readonly partial struct FractalTiling : IComputeShader
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -7,6 +7,7 @@ namespace ComputeSharp.SwapChain.Shaders.Compute;
|
||||
/// Ported from <see href="https://www.shadertoy.com/new"/>.
|
||||
/// </summary>
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
internal readonly partial struct HelloWorld : IPixelShader<float4>
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -8,6 +8,7 @@ namespace ComputeSharp.SwapChain.Shaders.Compute;
|
||||
/// <para>Created by Syntopia.</para>
|
||||
/// </summary>
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
internal readonly partial struct MengerJourney : IComputeShader
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -8,6 +8,7 @@ namespace ComputeSharp.SwapChain.Shaders.Compute;
|
||||
/// <para>Created by whisky_shusuky.</para>
|
||||
/// </summary>
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
internal readonly partial struct Octagrams : IComputeShader
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace ComputeSharp.SwapChain.Shaders.Compute;
|
||||
/// <para>License Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.</para>
|
||||
/// </summary>
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
internal readonly partial struct ProteanClouds : IComputeShader
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace ComputeSharp.SwapChain.Shaders.Compute;
|
||||
/// <para>Created by Shane.</para>
|
||||
/// </summary>
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
internal readonly partial struct PyramidPattern : IComputeShader
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -6,6 +6,7 @@ namespace ComputeSharp.SwapChain.Shaders.Compute;
|
||||
/// <para>Created by Shane.</para>
|
||||
/// </summary>
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
internal readonly partial struct TerracedHills : IComputeShader
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -8,6 +8,7 @@ namespace ComputeSharp.SwapChain.Shaders.Compute;
|
||||
/// <para>Created by Shane.</para>
|
||||
/// </summary>
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
internal readonly partial struct TriangleGridContouring : IComputeShader
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -8,6 +8,7 @@ namespace ComputeSharp.SwapChain.Shaders.Compute;
|
||||
/// <para>Created by Shane.</para>
|
||||
/// </summary>
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
internal readonly partial struct TwoTiledTruchet : IComputeShader
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -89,6 +89,7 @@ partial class Texture1DTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
public readonly partial struct SamplingComputeShader : IComputeShader
|
||||
{
|
||||
public readonly IReadOnlyNormalizedTexture1D<float4> source;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using ComputeSharp.Tests.Attributes;
|
||||
using ComputeSharp.Tests.Extensions;
|
||||
|
||||
@@ -69,6 +69,7 @@ partial class Texture1DTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct Shader_Unorm_Bgra32_Float4 : IComputeShader
|
||||
{
|
||||
public readonly ReadOnlyTexture1D<Bgra32, Float4> source;
|
||||
@@ -81,6 +82,7 @@ partial class Texture1DTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct Shader_Unorm_R16_float : IComputeShader
|
||||
{
|
||||
public readonly ReadOnlyTexture1D<R16, float> source;
|
||||
@@ -93,6 +95,7 @@ partial class Texture1DTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct Shader_Unorm_R8_float : IComputeShader
|
||||
{
|
||||
public readonly ReadOnlyTexture1D<R8, float> source;
|
||||
@@ -105,6 +108,7 @@ partial class Texture1DTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct Shader_Unorm_Rg16_Float2 : IComputeShader
|
||||
{
|
||||
public readonly ReadOnlyTexture1D<Rg16, Float2> source;
|
||||
@@ -117,6 +121,7 @@ partial class Texture1DTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct Shader_Unorm_Rg32_Float2 : IComputeShader
|
||||
{
|
||||
public readonly ReadOnlyTexture1D<Rg32, Float2> source;
|
||||
@@ -129,6 +134,7 @@ partial class Texture1DTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct Shader_Unorm_Rgba32_Float4 : IComputeShader
|
||||
{
|
||||
public readonly ReadOnlyTexture1D<Rgba32, Float4> source;
|
||||
@@ -141,6 +147,7 @@ partial class Texture1DTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct Shader_Unorm_Rgba64_Float4 : IComputeShader
|
||||
{
|
||||
public readonly ReadOnlyTexture1D<Rgba64, Float4> source;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<#@ template debug="false" hostspecific="false" language="C#" #>
|
||||
<#@ template debug="false" hostspecific="false" language="C#" #>
|
||||
<#@ assembly name="System.Core" #>
|
||||
<#@ import namespace="System.Linq" #>
|
||||
<#@ import namespace="System.Text" #>
|
||||
@@ -65,6 +65,7 @@ foreach (var (t, tPixel) in EnumerateTypes())
|
||||
#>
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct Shader_Unorm_<#=t#>_<#=tPixel#> : IComputeShader
|
||||
{
|
||||
public readonly ReadOnlyTexture1D<<#=t#>, <#=tPixel#>> source;
|
||||
|
||||
@@ -363,6 +363,7 @@ public partial class Texture1DTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct ReadOnlyTexture1DKernel : IComputeShader
|
||||
{
|
||||
public readonly ReadOnlyTexture1D<int> source;
|
||||
@@ -393,6 +394,7 @@ public partial class Texture1DTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.X)]
|
||||
internal readonly partial struct ReadWriteTexture1DKernel : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteTexture1D<int> source;
|
||||
|
||||
@@ -72,6 +72,7 @@ partial class Texture2DTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
public readonly partial struct SamplingComputeShader : IComputeShader
|
||||
{
|
||||
public readonly IReadOnlyNormalizedTexture2D<float4> source;
|
||||
@@ -105,6 +106,7 @@ partial class Texture2DTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
public readonly partial struct SamplingPixelShader : IPixelShader<float4>
|
||||
{
|
||||
public readonly IReadOnlyNormalizedTexture2D<float4> texture;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using ComputeSharp.Tests.Attributes;
|
||||
using ComputeSharp.Tests.Extensions;
|
||||
|
||||
@@ -69,6 +69,7 @@ partial class Texture2DTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
internal readonly partial struct Shader_Unorm_Bgra32_Float4 : IComputeShader
|
||||
{
|
||||
public readonly ReadOnlyTexture2D<Bgra32, Float4> source;
|
||||
@@ -81,6 +82,7 @@ partial class Texture2DTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
internal readonly partial struct Shader_Unorm_R16_float : IComputeShader
|
||||
{
|
||||
public readonly ReadOnlyTexture2D<R16, float> source;
|
||||
@@ -93,6 +95,7 @@ partial class Texture2DTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
internal readonly partial struct Shader_Unorm_R8_float : IComputeShader
|
||||
{
|
||||
public readonly ReadOnlyTexture2D<R8, float> source;
|
||||
@@ -105,6 +108,7 @@ partial class Texture2DTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
internal readonly partial struct Shader_Unorm_Rg16_Float2 : IComputeShader
|
||||
{
|
||||
public readonly ReadOnlyTexture2D<Rg16, Float2> source;
|
||||
@@ -117,6 +121,7 @@ partial class Texture2DTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
internal readonly partial struct Shader_Unorm_Rg32_Float2 : IComputeShader
|
||||
{
|
||||
public readonly ReadOnlyTexture2D<Rg32, Float2> source;
|
||||
@@ -129,6 +134,7 @@ partial class Texture2DTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
internal readonly partial struct Shader_Unorm_Rgba32_Float4 : IComputeShader
|
||||
{
|
||||
public readonly ReadOnlyTexture2D<Rgba32, Float4> source;
|
||||
@@ -141,6 +147,7 @@ partial class Texture2DTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
internal readonly partial struct Shader_Unorm_Rgba64_Float4 : IComputeShader
|
||||
{
|
||||
public readonly ReadOnlyTexture2D<Rgba64, Float4> source;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<#@ template debug="false" hostspecific="false" language="C#" #>
|
||||
<#@ template debug="false" hostspecific="false" language="C#" #>
|
||||
<#@ assembly name="System.Core" #>
|
||||
<#@ import namespace="System.Linq" #>
|
||||
<#@ import namespace="System.Text" #>
|
||||
@@ -65,6 +65,7 @@ foreach (var (t, tPixel) in EnumerateTypes())
|
||||
#>
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
internal readonly partial struct Shader_Unorm_<#=t#>_<#=tPixel#> : IComputeShader
|
||||
{
|
||||
public readonly ReadOnlyTexture2D<<#=t#>, <#=tPixel#>> source;
|
||||
|
||||
@@ -428,6 +428,7 @@ public partial class Texture2DTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
internal readonly partial struct ReadOnlyTexture2DKernel : IComputeShader
|
||||
{
|
||||
public readonly ReadOnlyTexture2D<int> source;
|
||||
@@ -458,6 +459,7 @@ public partial class Texture2DTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XY)]
|
||||
internal readonly partial struct ReadWriteTexture2DKernel : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteTexture2D<int> source;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using ComputeSharp.Tests.Attributes;
|
||||
using ComputeSharp.Tests.Extensions;
|
||||
|
||||
@@ -69,6 +69,7 @@ partial class Texture3DTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XYZ)]
|
||||
internal readonly partial struct Shader_Unorm_Bgra32_Float4 : IComputeShader
|
||||
{
|
||||
public readonly ReadOnlyTexture3D<Bgra32, Float4> source;
|
||||
@@ -81,6 +82,7 @@ partial class Texture3DTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XYZ)]
|
||||
internal readonly partial struct Shader_Unorm_R16_float : IComputeShader
|
||||
{
|
||||
public readonly ReadOnlyTexture3D<R16, float> source;
|
||||
@@ -93,6 +95,7 @@ partial class Texture3DTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XYZ)]
|
||||
internal readonly partial struct Shader_Unorm_R8_float : IComputeShader
|
||||
{
|
||||
public readonly ReadOnlyTexture3D<R8, float> source;
|
||||
@@ -105,6 +108,7 @@ partial class Texture3DTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XYZ)]
|
||||
internal readonly partial struct Shader_Unorm_Rg16_Float2 : IComputeShader
|
||||
{
|
||||
public readonly ReadOnlyTexture3D<Rg16, Float2> source;
|
||||
@@ -117,6 +121,7 @@ partial class Texture3DTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XYZ)]
|
||||
internal readonly partial struct Shader_Unorm_Rg32_Float2 : IComputeShader
|
||||
{
|
||||
public readonly ReadOnlyTexture3D<Rg32, Float2> source;
|
||||
@@ -129,6 +134,7 @@ partial class Texture3DTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XYZ)]
|
||||
internal readonly partial struct Shader_Unorm_Rgba32_Float4 : IComputeShader
|
||||
{
|
||||
public readonly ReadOnlyTexture3D<Rgba32, Float4> source;
|
||||
@@ -141,6 +147,7 @@ partial class Texture3DTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XYZ)]
|
||||
internal readonly partial struct Shader_Unorm_Rgba64_Float4 : IComputeShader
|
||||
{
|
||||
public readonly ReadOnlyTexture3D<Rgba64, Float4> source;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<#@ template debug="false" hostspecific="false" language="C#" #>
|
||||
<#@ template debug="false" hostspecific="false" language="C#" #>
|
||||
<#@ assembly name="System.Core" #>
|
||||
<#@ import namespace="System.Linq" #>
|
||||
<#@ import namespace="System.Text" #>
|
||||
@@ -65,6 +65,7 @@ foreach (var (t, tPixel) in EnumerateTypes())
|
||||
#>
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XYZ)]
|
||||
internal readonly partial struct Shader_Unorm_<#=t#>_<#=tPixel#> : IComputeShader
|
||||
{
|
||||
public readonly ReadOnlyTexture3D<<#=t#>, <#=tPixel#>> source;
|
||||
|
||||
@@ -533,6 +533,7 @@ public partial class Texture3DTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XYZ)]
|
||||
internal readonly partial struct ReadOnlyTexture3DKernel : IComputeShader
|
||||
{
|
||||
public readonly ReadOnlyTexture3D<int> source;
|
||||
@@ -563,6 +564,7 @@ public partial class Texture3DTests
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[EmbeddedBytecode(DispatchAxis.XYZ)]
|
||||
internal readonly partial struct ReadWriteTexture3DKernel : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteTexture3D<int> source;
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする