├── .editorconfig ├── .gitattributes ├── .github ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── feature_request.md │ ├── question.md │ └── regression.md ├── PULL_REQUEST_TEMPLATE.md └── workflows │ └── dotnet.yml ├── .gitignore ├── .globalconfig ├── ComputeSharp.sln ├── LICENSE ├── README.md ├── ThirdPartyNotices.txt ├── assets ├── icon.ico ├── icon.png └── icon_highres.png ├── build ├── Directory.Build.props ├── Directory.Build.targets └── computesharp.snk ├── docs └── ComputeSharp.pdf ├── global.json ├── libs ├── arm64 │ ├── WinPixEventRuntime.dll │ ├── WinPixEventRuntime_UAP.dll │ ├── dxcompiler.dll │ └── dxil.dll └── x64 │ ├── WinPixEventRuntime.dll │ ├── WinPixEventRuntime_UAP.dll │ ├── dxcompiler.dll │ └── dxil.dll ├── nuget.config ├── samples ├── ComputeSharp.Benchmark │ ├── Blas │ │ ├── BlasBenchmark.cs │ │ └── BlasHelpers.cs │ ├── ComputeSharp.Benchmark.csproj │ ├── Dispatching │ │ └── DispatchingBenchmark.cs │ ├── Imaging │ │ └── ImagingBenchmark.cs │ └── Program.cs ├── ComputeSharp.ImageProcessing │ ├── ComputeSharp.ImageProcessing.csproj │ ├── Primitives │ │ ├── Complex64.cs │ │ └── ComplexVector4.cs │ ├── Processors │ │ ├── HlslBokehBlurProcessor.Implementation.cs │ │ ├── HlslBokehBlurProcessor.cs │ │ ├── HlslGaussianBlurProcessor.Implementation.cs │ │ └── HlslGaussianBlurProcessor.cs │ ├── Program.cs │ └── city.jpg ├── ComputeSharp.NativeLibrary.WinRT │ ├── ComputeSharp.NativeLibrary.WinRT.csproj │ └── HelloWorldEffect.cs ├── ComputeSharp.NativeLibrary │ ├── ComputeSharp.NativeLibrary.csproj │ └── NativeLibrary.cs ├── ComputeSharp.Sample.FSharp.Shaders │ ├── ComputeSharp.Sample.FSharp.Shaders.csproj │ └── MultiplyByTwo.cs ├── ComputeSharp.Sample.FSharp │ ├── ComputeSharp.Sample.FSharp.fsproj │ └── Program.fs ├── ComputeSharp.Sample │ ├── ComputeSharp.Sample.csproj │ ├── Helpers │ │ └── Formatting.cs │ └── Program.cs ├── ComputeSharp.SwapChain.Cli │ ├── ComputeSharp.SwapChain.Cli.csproj │ └── Program.cs ├── ComputeSharp.SwapChain.D2D1.Cli │ ├── Backend │ │ ├── PixelShaderEffect.cs │ │ ├── Win32Application.cs │ │ └── Win32ApplicationRunner.cs │ ├── ComputeSharp.SwapChain.D2D1.Cli.csproj │ ├── Program.cs │ └── app.manifest ├── ComputeSharp.SwapChain.D2D1.Uwp │ ├── App.cs │ ├── Assets │ │ ├── LockScreenLogo.scale-200.png │ │ ├── SplashScreen.scale-200.png │ │ ├── Square150x150Logo.scale-200.png │ │ ├── Square44x44Logo.scale-200.png │ │ ├── Square44x44Logo.targetsize-24_altform-unplated.png │ │ ├── StoreLogo.scale-200.png │ │ └── Wide310x150Logo.scale-200.png │ ├── Backend │ │ ├── CoreWindowApplication.cs │ │ ├── CoreWindowApplicationRunner.cs │ │ └── PixelShaderEffect.cs │ ├── ComputeSharp.SwapChain.D2D1.Uwp.csproj │ ├── Extensions │ │ └── ApplicationViewTitleBarExtensions.cs │ ├── Package.appxmanifest │ └── Properties │ │ ├── PublishProfiles │ │ ├── win-arm64.pubxml │ │ └── win-x64.pubxml │ │ └── launchSettings.json ├── ComputeSharp.SwapChain.Shaders.D2D1 │ ├── ColorfulInfinity.cs │ ├── ComputeSharp.SwapChain.Shaders.D2D1.projitems │ ├── ComputeSharp.SwapChain.Shaders.D2D1.shproj │ ├── ContouredLayers.cs │ ├── FractalTiling.cs │ ├── HelloWorld.cs │ ├── MengerJourney.cs │ ├── Octagrams.cs │ ├── ProteanClouds.cs │ ├── PyramidPattern.cs │ ├── TerracedHills.cs │ ├── TriangleGridContouring.cs │ └── TwoTiledTruchet.cs ├── ComputeSharp.SwapChain.Shaders │ ├── ColorfulInfinity.cs │ ├── ComputeSharp.SwapChain.Shaders.projitems │ ├── ComputeSharp.SwapChain.Shaders.shproj │ ├── ContouredLayers.cs │ ├── ExtrudedTruchetPattern.cs │ ├── FourColorGradient.cs │ ├── FractalTiling.cs │ ├── HelloWorld.cs │ ├── MengerJourney.cs │ ├── Octagrams.cs │ ├── ProteanClouds.cs │ ├── PyramidPattern.cs │ ├── TerracedHills.cs │ ├── TriangleGridContouring.cs │ └── TwoTiledTruchet.cs ├── ComputeSharp.SwapChain.UI │ ├── Assets │ │ ├── LargeTile.scale-100.png │ │ ├── LargeTile.scale-125.png │ │ ├── LargeTile.scale-150.png │ │ ├── LargeTile.scale-200.png │ │ ├── LargeTile.scale-400.png │ │ ├── LockScreenLogo.scale-200.png │ │ ├── Misc │ │ │ └── noise_low.png │ │ ├── SmallTile.scale-100.png │ │ ├── SmallTile.scale-125.png │ │ ├── SmallTile.scale-150.png │ │ ├── SmallTile.scale-200.png │ │ ├── SmallTile.scale-400.png │ │ ├── SplashScreen.scale-100.png │ │ ├── SplashScreen.scale-125.png │ │ ├── SplashScreen.scale-150.png │ │ ├── SplashScreen.scale-200.png │ │ ├── SplashScreen.scale-400.png │ │ ├── Square150x150Logo.scale-100.png │ │ ├── Square150x150Logo.scale-125.png │ │ ├── Square150x150Logo.scale-150.png │ │ ├── Square150x150Logo.scale-200.png │ │ ├── Square150x150Logo.scale-400.png │ │ ├── Square44x44Logo.altform-lightunplated_targetsize-16.png │ │ ├── Square44x44Logo.altform-lightunplated_targetsize-24.png │ │ ├── Square44x44Logo.altform-lightunplated_targetsize-256.png │ │ ├── Square44x44Logo.altform-lightunplated_targetsize-32.png │ │ ├── Square44x44Logo.altform-lightunplated_targetsize-48.png │ │ ├── Square44x44Logo.altform-unplated_targetsize-16.png │ │ ├── Square44x44Logo.altform-unplated_targetsize-256.png │ │ ├── Square44x44Logo.altform-unplated_targetsize-32.png │ │ ├── Square44x44Logo.altform-unplated_targetsize-48.png │ │ ├── Square44x44Logo.scale-100.png │ │ ├── Square44x44Logo.scale-125.png │ │ ├── Square44x44Logo.scale-150.png │ │ ├── Square44x44Logo.scale-200.png │ │ ├── Square44x44Logo.scale-400.png │ │ ├── Square44x44Logo.targetsize-16.png │ │ ├── Square44x44Logo.targetsize-24.png │ │ ├── Square44x44Logo.targetsize-24_altform-unplated.png │ │ ├── Square44x44Logo.targetsize-256.png │ │ ├── Square44x44Logo.targetsize-32.png │ │ ├── Square44x44Logo.targetsize-48.png │ │ ├── StoreLogo.backup.png │ │ ├── StoreLogo.scale-100.png │ │ ├── StoreLogo.scale-125.png │ │ ├── StoreLogo.scale-150.png │ │ ├── StoreLogo.scale-200.png │ │ ├── StoreLogo.scale-400.png │ │ ├── Wide310x150Logo.scale-100.png │ │ ├── Wide310x150Logo.scale-125.png │ │ ├── Wide310x150Logo.scale-150.png │ │ ├── Wide310x150Logo.scale-200.png │ │ └── Wide310x150Logo.scale-400.png │ ├── ComputeSharp.SwapChain.UI.projitems │ ├── ComputeSharp.SwapChain.UI.shproj │ ├── Controls │ │ └── D2D1AnimatedPixelShaderPanel.cs │ ├── Converters │ │ ├── RenderingPauseConverter.cs │ │ └── ResolutionScaleConverter.cs │ ├── Enums │ │ └── RenderingMode.cs │ ├── Shaders │ │ ├── PixelShaderEffect.cs │ │ └── Runners │ │ │ ├── ContouredLayersRunner.cs │ │ │ └── D2D1ContouredLayersRunner.cs │ └── ViewModels │ │ ├── MainViewModel.cs │ │ └── ShaderRunnerViewModel.cs ├── ComputeSharp.SwapChain.Uwp │ ├── App.xaml │ ├── App.xaml.cs │ ├── ComputeSharp.SwapChain.Uwp.csproj │ ├── Controls │ │ └── D2D1AnimatedPixelShaderPanel.xaml │ ├── Package.appxmanifest │ ├── Properties │ │ ├── PublishProfiles │ │ │ ├── win-arm64.pubxml │ │ │ └── win-x64.pubxml │ │ └── launchSettings.json │ └── Views │ │ ├── MainView.xaml │ │ └── MainView.xaml.cs ├── ComputeSharp.SwapChain.WinUI │ ├── App.xaml │ ├── App.xaml.cs │ ├── ComputeSharp.SwapChain.WinUI.csproj │ ├── Controls │ │ └── D2D1AnimatedPixelShaderPanel.xaml │ ├── Package.appxmanifest │ ├── Properties │ │ ├── PublishProfiles │ │ │ ├── win-arm64.pubxml │ │ │ └── win-x64.pubxml │ │ └── launchSettings.json │ ├── Views │ │ ├── MainWindow.xaml │ │ └── MainWindow.xaml.cs │ └── app.manifest ├── ComputeSharp.SwapChain │ ├── Backend │ │ ├── Win32Application.cs │ │ ├── Win32ApplicationFactory{T}.cs │ │ └── Win32ApplicationRunner.cs │ ├── ComputeSharp.SwapChain.csproj │ ├── Program.cs │ └── Textures │ │ └── RustyMetal.png ├── Directory.Build.props └── Directory.Build.targets ├── src ├── ComputeSharp.CodeFixers │ ├── ComputeSharp.CodeFixers.csproj │ └── MissingComputeShaderDescriptorOnComputeShaderCodeFixer.cs ├── ComputeSharp.CodeFixing │ ├── ComputeSharp.CodeFixing.projitems │ ├── ComputeSharp.CodeFixing.shproj │ └── MissingAttributeCodeFixer.cs ├── ComputeSharp.Core.SourceGenerators │ ├── AnalyzerReleases.Shipped.md │ ├── AnalyzerReleases.Unshipped.md │ ├── ComputeSharp.Core.SourceGenerators.csproj │ └── GlobalUsingDirectivesGenerator.cs ├── ComputeSharp.Core │ ├── ComputeSharp.Core.csproj │ ├── ComputeSharp.Core.targets │ ├── Exceptions │ │ └── InvalidExecutionContextException.cs │ ├── Extensions │ │ ├── FloatExtensions.cs │ │ └── VectorExtensions.cs │ ├── Intrinsics │ │ ├── Attributes │ │ │ └── HlslIntrinsicNameAttribute.cs │ │ ├── Hlsl.Casts.g.cs │ │ ├── Hlsl.Casts.tt │ │ ├── Hlsl.MulOverloads.ttinclude │ │ ├── Hlsl.Void.g.cs │ │ ├── Hlsl.Void.tt │ │ ├── Hlsl.Void.ttinclude │ │ ├── Hlsl.cs │ │ ├── Hlsl.g.cs │ │ ├── Hlsl.tt │ │ └── Hlsl.ttinclude │ ├── Polyfills │ │ ├── ArgumentExceptionExtensions.cs │ │ ├── ArgumentNullExceptionExtensions.cs │ │ ├── ArgumentOutOfRangeExceptionExtensions.cs │ │ ├── InvalidOperationExceptionExtensions.cs │ │ ├── NotSupportedExceptionExtensions.cs │ │ ├── ObjectDisposedExceptionExtensions.cs │ │ └── Win32ExceptionExtensions.cs │ ├── Primitives │ │ ├── Bool │ │ │ ├── Bool.cs │ │ │ ├── Bool2.g.cs │ │ │ ├── Bool2.tt │ │ │ ├── Bool3.g.cs │ │ │ ├── Bool3.tt │ │ │ ├── Bool4.g.cs │ │ │ ├── Bool4.tt │ │ │ ├── BoolMxN.g.cs │ │ │ └── BoolMxN.tt │ │ ├── Double │ │ │ ├── Double2.g.cs │ │ │ ├── Double2.tt │ │ │ ├── Double3.g.cs │ │ │ ├── Double3.tt │ │ │ ├── Double4.g.cs │ │ │ ├── Double4.tt │ │ │ ├── DoubleMxN.g.cs │ │ │ └── DoubleMxN.tt │ │ ├── Float │ │ │ ├── Float2.cs │ │ │ ├── Float2.g.cs │ │ │ ├── Float2.tt │ │ │ ├── Float3.cs │ │ │ ├── Float3.g.cs │ │ │ ├── Float3.tt │ │ │ ├── Float4.cs │ │ │ ├── Float4.g.cs │ │ │ ├── Float4.tt │ │ │ ├── FloatMxN.cs.cs │ │ │ ├── FloatMxN.g.cs │ │ │ └── FloatMxN.tt │ │ ├── Int │ │ │ ├── Int2.g.cs │ │ │ ├── Int2.tt │ │ │ ├── Int3.g.cs │ │ │ ├── Int3.tt │ │ │ ├── Int4.g.cs │ │ │ ├── Int4.tt │ │ │ ├── IntMxN.g.cs │ │ │ └── IntMxN.tt │ │ ├── Internals │ │ │ └── UndefinedData.cs │ │ ├── MatrixIndex.cs │ │ ├── MatrixType.ttinclude │ │ ├── UInt │ │ │ ├── UInt2.g.cs │ │ │ ├── UInt2.tt │ │ │ ├── UInt3.g.cs │ │ │ ├── UInt3.tt │ │ │ ├── UInt4.g.cs │ │ │ ├── UInt4.tt │ │ │ ├── UIntMxN.g.cs │ │ │ └── UIntMxN.tt │ │ ├── VectorType.Ctors.ttinclude │ │ └── VectorType.ttinclude │ └── README.md ├── ComputeSharp.D2D1.CodeFixers │ ├── ComputeSharp.D2D1.CodeFixers.csproj │ └── MissingPixelShaderDescriptorOnPixelShaderCodeFixer.cs ├── ComputeSharp.D2D1.SourceGenerators │ ├── AnalyzerReleases.Shipped.md │ ├── AnalyzerReleases.Unshipped.md │ ├── ComputeSharp.D2D1.SourceGenerators.csproj │ ├── D2DPixelShaderDescriptorGenerator.ConstantBuffer.cs │ ├── D2DPixelShaderDescriptorGenerator.EffectFactory.Syntax.cs │ ├── D2DPixelShaderDescriptorGenerator.EffectId.Syntax.cs │ ├── D2DPixelShaderDescriptorGenerator.EffectId.cs │ ├── D2DPixelShaderDescriptorGenerator.EffectMetadata.Syntax.cs │ ├── D2DPixelShaderDescriptorGenerator.EffectMetadata.cs │ ├── D2DPixelShaderDescriptorGenerator.HlslBytecode.Syntax.cs │ ├── D2DPixelShaderDescriptorGenerator.HlslBytecode.cs │ ├── D2DPixelShaderDescriptorGenerator.HlslSource.Syntax.cs │ ├── D2DPixelShaderDescriptorGenerator.HlslSource.cs │ ├── D2DPixelShaderDescriptorGenerator.InputDescriptions.Syntax.cs │ ├── D2DPixelShaderDescriptorGenerator.InputDescriptions.cs │ ├── D2DPixelShaderDescriptorGenerator.InputTypes.Syntax.cs │ ├── D2DPixelShaderDescriptorGenerator.InputTypes.cs │ ├── D2DPixelShaderDescriptorGenerator.NumericProperties.Syntax.cs │ ├── D2DPixelShaderDescriptorGenerator.OutputBuffer.Syntax.cs │ ├── D2DPixelShaderDescriptorGenerator.OutputBuffer.cs │ ├── D2DPixelShaderDescriptorGenerator.PixelOptions.cs │ ├── D2DPixelShaderDescriptorGenerator.ResourceTextureDescriptions.Syntax.cs │ ├── D2DPixelShaderDescriptorGenerator.ResourceTextureDescriptions.cs │ ├── D2DPixelShaderDescriptorGenerator.cs │ ├── D2DPixelShaderSourceGenerator.Execute.cs │ ├── D2DPixelShaderSourceGenerator.cs │ ├── Diagnostics │ │ ├── Analyzers │ │ │ ├── D2DEnableRuntimeCompilationOnAssemblyAnalyzer.cs │ │ │ ├── D2DEnableRuntimeCompilationOnTypeAnalyzer.cs │ │ │ ├── ExcedeedPixelShaderDispatchDataSizeAnalyzer.cs │ │ │ ├── InvalidAssemblyLevelCompileOptionsAnalyzer.cs │ │ │ ├── InvalidD2D1PixelOptionsTrivialSamplingOnShaderTypeAnalyzer.cs │ │ │ ├── InvalidD2DGeneratedPixelShaderDescriptorAttributeTargetAnalyzer.cs │ │ │ ├── InvalidD2DInputArgumentAnalyzer.cs │ │ │ ├── InvalidD2DInputDescriptionAttributeUseAnalyzer.cs │ │ │ ├── InvalidD2DPixelShaderSourceAttributeUseAnalyzer.cs │ │ │ ├── InvalidD2DPixelShaderSourceMethodReturnTypeAnalyzer.cs │ │ │ ├── InvalidD2DRequiresDoublePrecisionSupportAnalyzer.cs │ │ │ ├── InvalidD2DResourceTextureIndexAttributeLocationAnalyzer.cs │ │ │ ├── InvalidD2DResourceTextureIndexAttributeUseAnalyzer.cs │ │ │ ├── InvalidEffectIdValueAnalyzer.cs │ │ │ ├── InvalidEffectMetadataValueAnalyzer.cs │ │ │ ├── InvalidShaderTypeCompileOptionsAnalyzer.cs │ │ │ ├── InvalidShaderTypeInputsAnalyzer.cs │ │ │ ├── MissingAllowUnsafeBlocksCompilationOptionAnalyzer.cs │ │ │ ├── MissingD2DCompileOptionsOnD2DPixelShaderSourceMethodAnalyzer.cs │ │ │ ├── MissingD2DShaderProfileOnD2DPixelShaderSourceMethodAnalyzer.cs │ │ │ ├── MissingPixelShaderDescriptorOnPixelShaderAnalyzer.cs │ │ │ ├── NonConstantD2DInputArgumentAnalyzer.cs │ │ │ ├── NotAccessibleD2DGeneratedPixelShaderDescriptorAttributeTargetAnalyzer.cs │ │ │ ├── NotAccessibleFieldTypeInD2DGeneratedShaderDescriptorAttributeTargetAnalyzer.cs │ │ │ └── NotReadOnlyPixelShaderTypeWithFieldsAnalyzer.cs │ │ ├── DiagnosticDescriptors.cs │ │ ├── SuppressionDescriptors.cs │ │ └── Suppressors │ │ │ └── D2D1ResourceTextureUninitializedFieldDiagnosticSuppressor.cs │ ├── Fxc │ │ └── D3DCompiler.cs │ ├── Helpers │ │ └── D2D1EffectMetadataParser.cs │ ├── Mappings │ │ ├── HlslKnownKeywords.cs │ │ ├── HlslKnownMethods.cs │ │ ├── HlslKnownProperties.cs │ │ └── HlslKnownTypes.cs │ ├── Models │ │ ├── D2D1PixelShaderSourceInfo.cs │ │ ├── D2D1ShaderInfo.cs │ │ ├── HlslBytecodeInfoKey.cs │ │ ├── InputDescription.cs │ │ └── ResourceTextureDescription.cs │ ├── NativeMethods.txt │ ├── Polyfills │ │ └── EncodingExtensions.cs │ ├── SyntaxProcessors │ │ ├── ConstantBufferSyntaxProcessor.ArtificialFields.cs │ │ └── HlslBytecodeSyntaxProcessor.D2D1.cs │ └── SyntaxRewriters │ │ ├── ShaderSourceRewriter.cs │ │ └── StaticFieldRewriter.cs ├── ComputeSharp.D2D1.UI.CodeFixers │ ├── ComputeSharp.D2D1.UI.CodeFixers.projitems │ ├── ComputeSharp.D2D1.UI.CodeFixers.shproj │ └── UseGeneratedCanvasEffectPropertyOnSemiAutoPropertyCodeFixer.cs ├── ComputeSharp.D2D1.UI.SourceGenerators │ ├── CanvasEffectPropertyGenerator.Execute.cs │ ├── CanvasEffectPropertyGenerator.cs │ ├── ComputeSharp.D2D1.UI.SourceGenerators.projitems │ ├── ComputeSharp.D2D1.UI.SourceGenerators.shproj │ ├── Constants │ │ └── WellKnownTypeNames.cs │ ├── Diagnostics │ │ ├── Analyzers │ │ │ ├── InvalidGeneratedCanvasEffectPropertyAccessorsAnalyzer.cs │ │ │ ├── InvalidGeneratedCanvasEffectPropertyContainingTypeAnalyzer.cs │ │ │ ├── InvalidGeneratedCanvasEffectPropertyDeclarationAnalyzer.cs │ │ │ ├── RequireCSharpLanguageVersionPreviewAnalyzer.cs │ │ │ └── UseGeneratedCanvasEffectPropertyOnSemiAutoPropertyAnalyzer.cs │ │ └── DiagnosticDescriptors.cs │ └── Models │ │ └── CanvasEffectPropertyInfo.cs ├── ComputeSharp.D2D1.UI │ ├── ABI.Microsoft.Graphics.Canvas │ │ ├── ICanvasDevice.cs │ │ ├── ICanvasEffect.cs │ │ ├── ICanvasEffectFactoryNative.cs │ │ ├── ICanvasFactoryNative.cs │ │ ├── ICanvasImageInterop.cs │ │ ├── ICanvasResourceCreator.cs │ │ ├── ICanvasResourceCreatorWithDpi.cs │ │ ├── ICanvasResourceWrapperNative.cs │ │ ├── ID2D1DeviceContextLease.cs │ │ ├── ID2D1DeviceContextPool.cs │ │ ├── Inspectable │ │ │ └── IInspectable.cs │ │ ├── WIN2D_GET_D2D_IMAGE_FLAGS.cs │ │ ├── WIN2D_GET_DEVICE_ASSOCIATION_TYPE.cs │ │ └── Win2D.cs │ ├── Attributes │ │ └── GeneratedCanvasEffectPropertyAttribute.cs │ ├── Buffers │ │ ├── GraphicsEffectSourceBuffer.cs │ │ ├── ResourceTextureManagerBuffer.cs │ │ └── SourceReference.cs │ ├── CanvasEffect.Interop.cs │ ├── CanvasEffect.cs │ ├── CanvasEffectGraph.cs │ ├── CanvasEffectInvalidationType.cs │ ├── CanvasEffectNode{T}.cs │ ├── Collections │ │ ├── FixedCountList{T}.cs │ │ └── IFixedCountList{T}.cs │ ├── ComputeSharp.D2D1.UI.projitems │ ├── ComputeSharp.D2D1.UI.shproj │ ├── Extensions │ │ ├── ICanvasDeviceExtensions.cs │ │ ├── ID2D1DeviceContextExtensions.cs │ │ ├── ID2D1EffectExtensions.cs │ │ └── IUnknownExtensions.cs │ ├── Helpers │ │ ├── RcwMarshaller.cs │ │ └── ResourceManager.cs │ ├── ICanvasEffectNode.cs │ ├── ICanvasEffectNode{T}.cs │ ├── PixelShaderEffect{T}.ICanvasEffect.cs │ ├── PixelShaderEffect{T}.ICanvasEffectFactoryNative.cs │ ├── PixelShaderEffect{T}.ICanvasImage.cs │ ├── PixelShaderEffect{T}.ICanvasImageInterop.cs │ ├── PixelShaderEffect{T}.Properties.Interop.Sources.cs │ ├── PixelShaderEffect{T}.Properties.Interop.cs │ ├── PixelShaderEffect{T}.Properties.ResourceTextureManagerCollection.cs │ ├── PixelShaderEffect{T}.Properties.SourceCollection.cs │ ├── PixelShaderEffect{T}.Properties.cs │ ├── PixelShaderEffect{T}.ReferenceTracking.cs │ └── PixelShaderEffect{T}.cs ├── ComputeSharp.D2D1.Uwp.CodeFixers │ └── ComputeSharp.D2D1.Uwp.CodeFixers.csproj ├── ComputeSharp.D2D1.Uwp.SourceGenerators │ ├── AnalyzerReleases.Shipped.md │ ├── AnalyzerReleases.Unshipped.md │ └── ComputeSharp.D2D1.Uwp.SourceGenerators.csproj ├── ComputeSharp.D2D1.Uwp │ ├── ComputeSharp.D2D1.Uwp.csproj │ ├── ComputeSharp.D2D1.Uwp.targets │ └── README.md ├── ComputeSharp.D2D1.WinUI.CodeFixers │ └── ComputeSharp.D2D1.WinUI.CodeFixers.csproj ├── ComputeSharp.D2D1.WinUI.SourceGenerators │ ├── AnalyzerReleases.Shipped.md │ ├── AnalyzerReleases.Unshipped.md │ └── ComputeSharp.D2D1.WinUI.SourceGenerators.csproj ├── ComputeSharp.D2D1.WinUI │ ├── ComputeSharp.D2D1.WinUI.csproj │ ├── ComputeSharp.D2D1.WinUI.targets │ └── README.md ├── ComputeSharp.D2D1 │ ├── Attributes │ │ ├── D2DCompileOptionsAttribute.cs │ │ ├── D2DEffectAuthorAttribute.cs │ │ ├── D2DEffectCategoryAttribute.cs │ │ ├── D2DEffectDescriptionAttribute.cs │ │ ├── D2DEffectDisplayNameAttribute.cs │ │ ├── D2DEffectIdAttribute.cs │ │ ├── D2DEnableRuntimeCompilation.cs │ │ ├── D2DGeneratedPixelShaderDescriptorAttribute.cs │ │ ├── D2DInputComplexAttribute.cs │ │ ├── D2DInputCountAttribute.cs │ │ ├── D2DInputDescriptionAttribute.cs │ │ ├── D2DInputSimpleAttribute.cs │ │ ├── D2DOutputBufferAttribute.cs │ │ ├── D2DPixelOptionsAttribute.cs │ │ ├── D2DPixelShaderSourceAttribute.cs │ │ ├── D2DRequiresDoublePrecisionSupportAttribute.cs │ │ ├── D2DRequiresScenePositionAttribute.cs │ │ ├── D2DResourceTextureIndexAttribute.cs │ │ ├── D2DShaderProfileAttribute.cs │ │ └── Enums │ │ │ ├── D2D1BufferPrecision.cs │ │ │ ├── D2D1ChannelDepth.cs │ │ │ ├── D2D1CompileOptions.cs │ │ │ ├── D2D1Filter.cs │ │ │ ├── D2D1PixelOptions.cs │ │ │ └── D2D1ShaderProfile.cs │ ├── ComputeSharp.D2D1.csproj │ ├── ComputeSharp.D2D1.targets │ ├── Extensions │ │ ├── ComPtrExtensions.cs │ │ ├── HRESULTExtensions.cs │ │ ├── RECTExtensions.cs │ │ └── RectangleExtensions.cs │ ├── Interfaces │ │ ├── Descriptors │ │ │ ├── ID2D1ConstantBufferLoader.cs │ │ │ └── ID2D1PixelShaderDescriptor{T}.cs │ │ └── ID2D1PixelShader.cs │ ├── Intrinsics │ │ ├── Attributes │ │ │ └── HlslD2DIntrinsicInputTypeAttribute.cs │ │ └── D2D.cs │ ├── README.md │ ├── Resources │ │ ├── D2D1ResourceTexture1D{T}.cs │ │ ├── D2D1ResourceTexture2D{T}.cs │ │ └── D2D1ResourceTexture3D{T}.cs │ └── Shaders │ │ ├── Exceptions │ │ └── FxcCompilationException.cs │ │ ├── Interop │ │ ├── Buffers │ │ │ └── ArrayPoolBinaryWriter.cs │ │ ├── D2D1DrawInfoUpdateContext{T}.cs │ │ ├── D2D1DrawTransformMapper{T}.Factories.cs │ │ ├── D2D1DrawTransformMapper{T}.cs │ │ ├── D2D1EffectRegistrationData.cs │ │ ├── D2D1ExtendMode.cs │ │ ├── D2D1InputDescription.cs │ │ ├── D2D1PixelShader.cs │ │ ├── D2D1PixelShaderEffect.cs │ │ ├── D2D1PixelShaderEffectProperty.cs │ │ ├── D2D1PixelShaderInputType.cs │ │ ├── D2D1PropertyBinding.cs │ │ ├── D2D1ReflectionServices.cs │ │ ├── D2D1ResourceTextureDescription.cs │ │ ├── D2D1ResourceTextureManager.cs │ │ ├── D2D1ShaderCompiler.cs │ │ ├── D2D1ShaderInfo.cs │ │ ├── D3DFeatureLevel.cs │ │ ├── Effects │ │ │ ├── PixelShaderEffect.Globals{T}.cs │ │ │ ├── PixelShaderEffect.ID2D1DrawTransformMethods.cs │ │ │ ├── PixelShaderEffect.ID2D1EffectImplMethods.cs │ │ │ ├── PixelShaderEffect.Properties.cs │ │ │ ├── PixelShaderEffect.Properties.g.cs │ │ │ ├── PixelShaderEffect.Properties.tt │ │ │ ├── PixelShaderEffect.ResourceTextureManagerBuffer.cs │ │ │ ├── PixelShaderEffect.cs │ │ │ ├── ResourceManagers │ │ │ │ ├── D2D1ResourceTextureManagerImpl.ID2D1ResourceTextureManager.cs │ │ │ │ ├── D2D1ResourceTextureManagerImpl.ID2D1ResourceTextureManagerInternal.cs │ │ │ │ ├── D2D1ResourceTextureManagerImpl.cs │ │ │ │ ├── ID2D1ResourceTextureManager.cs │ │ │ │ └── ID2D1ResourceTextureManagerInternal.cs │ │ │ └── TransformMappers │ │ │ │ ├── D2D1DrawInfoUpdateContextImpl.ID2D1DrawInfoUpdateContex.cs │ │ │ │ ├── D2D1DrawInfoUpdateContextImpl.ID2D1DrawInfoUpdateContexInternal.cs │ │ │ │ ├── D2D1DrawInfoUpdateContextImpl.cs │ │ │ │ ├── D2D1DrawTransformMapperImpl.ID2D1DrawTransformMapper.cs │ │ │ │ ├── D2D1DrawTransformMapperImpl.ID2D1DrawTransformMapperInternal.cs │ │ │ │ ├── D2D1DrawTransformMapperImpl.cs │ │ │ │ ├── ID2D1DrawInfoUpdateContext.cs │ │ │ │ ├── ID2D1DrawInfoUpdateContextInternal.cs │ │ │ │ ├── ID2D1DrawTransformMapper.cs │ │ │ │ ├── ID2D1DrawTransformMapperInternal.cs │ │ │ │ └── ID2D1DrawTransformMapperInterop.cs │ │ ├── Extensions │ │ │ └── ID2D1EffectContextExtensions.cs │ │ ├── Factories │ │ │ ├── Abstract │ │ │ │ └── D2D1TransformMapper{T,TParameters}.cs │ │ │ ├── D2D1AffineTransformMapper{T}.cs │ │ │ └── D2D1InflateTransformMapper{T}.cs │ │ └── Helpers │ │ │ ├── D2D1AssemblyAssociatedMemory.cs │ │ │ ├── D2D1EffectXmlFactory.cs │ │ │ ├── Point64.cs │ │ │ └── Rectangle64.cs │ │ ├── Loaders │ │ ├── D2D1ByteArrayConstantBufferLoader.cs │ │ ├── D2D1ByteBufferConstantBufferLoader.cs │ │ ├── D2D1DrawInfoConstantBufferLoader.cs │ │ ├── D2D1DrawInfoUpdateContextConstantBufferLoader.cs │ │ └── D2D1EffectConstantBufferLoader.cs │ │ └── Translation │ │ ├── ASCII.cs │ │ ├── D3DCompiler.ID3DInclude.cs │ │ ├── D3DCompiler.cs │ │ └── Headers │ │ └── D2D1EffectHelpers.cs ├── ComputeSharp.D3D12MemoryAllocator │ ├── ComputeSharp.D3D12MemoryAllocator.csproj │ ├── D3D12MemoryAllocatorFactory.cs │ ├── Extensions │ │ ├── AllocatorExtensions.cs │ │ └── ID3D12DeviceExtensions.cs │ ├── Interop │ │ ├── ID3D12AllocationImpl.cs │ │ ├── ID3D12MemoryAllocatorFactoryImpl.cs │ │ └── ID3D12MemoryAllocatorImpl.cs │ └── README.md ├── ComputeSharp.Dxc │ ├── ComputeSharp.Dxc.csproj │ ├── Interop │ │ ├── ReflectionServices.LibraryLoading.cs │ │ ├── ReflectionServices.cs │ │ └── ShaderInfo.cs │ └── README.md ├── ComputeSharp.Pix │ ├── ComputeContextExtensions.cs │ ├── ComputeSharp.Pix.csproj │ ├── ComputeSharp.Pix.targets │ ├── Interop │ │ ├── ID3D12GraphicsCommandListExtensions.cs │ │ ├── Pix.cs │ │ └── Pix.h.cs │ ├── LICENSE.txt │ └── README.md ├── ComputeSharp.SourceGeneration.Hlsl │ ├── ComputeSharp.SourceGeneration.Hlsl.projitems │ ├── ComputeSharp.SourceGeneration.Hlsl.shproj │ ├── Diagnostics │ │ ├── Analyzers │ │ │ ├── MissingAllowUnsafeBlocksCompilationOptionAnalyzerBase.cs │ │ │ ├── NotAccessibleFieldTypeInGeneratedShaderDescriptorAttributeTargetAnalyzerBase.cs │ │ │ ├── NotAccessibleGeneratedShaderDescriptorAttributeTargetAnalyzerBase.cs │ │ │ └── NotReadOnlyShaderTypeWithFieldsAnalyzerBase.cs │ │ └── DiagnosticDescriptors.cs │ ├── Extensions │ │ ├── StringExtensions.cs │ │ └── SyntaxNodeExtensions.cs │ ├── Helpers │ │ ├── SemanticModelProvider.cs │ │ └── SyntaxFormattingHelper.cs │ ├── Mappings │ │ ├── HlslKnownFields.cs │ │ ├── HlslKnownKeywords.cs │ │ ├── HlslKnownMethods.cs │ │ ├── HlslKnownOperators.cs │ │ ├── HlslKnownProperties.cs │ │ ├── HlslKnownSizes.cs │ │ └── HlslKnownTypes.cs │ ├── Models │ │ ├── FieldInfo.cs │ │ ├── HlslBytecodeInfo.cs │ │ ├── Interfaces │ │ │ └── IConstantBufferInfo.cs │ │ └── TypeAliases.cs │ ├── SyntaxProcessors │ │ ├── ConstantBufferSyntaxProcessor.Generation.cs │ │ ├── ConstantBufferSyntaxProcessor.cs │ │ ├── HlslBytecodeSyntaxProcessor.cs │ │ ├── HlslDefinitionsSyntaxProcessor.cs │ │ ├── HlslOperatorsSyntaxProcessor.cs │ │ └── HlslSourceSyntaxProcessor.cs │ └── SyntaxRewriters │ │ ├── HlslSourceRewriter.Diagnostics.cs │ │ ├── HlslSourceRewriter.Tracking.cs │ │ ├── HlslSourceRewriter.cs │ │ ├── ShaderSourceRewriter.cs │ │ └── StaticFieldRewriter.cs ├── ComputeSharp.SourceGeneration │ ├── ComputeSharp.SourceGeneration.projitems │ ├── ComputeSharp.SourceGeneration.shproj │ ├── Constants │ │ └── WellKnownTrackingNames.cs │ ├── Extensions │ │ ├── AccessibilityExtensions.cs │ │ ├── AttributeDataExtensions.cs │ │ ├── CompilationExtensions.cs │ │ ├── DiagnosticsExtensions.cs │ │ ├── IFieldSymbolExtensions.cs │ │ ├── IMethodSymbolExtensions.cs │ │ ├── IPropertySymbolExtensions.cs │ │ ├── ISymbolExtensions.cs │ │ ├── ITypeSymbolExtensions.cs │ │ ├── IncrementalValueProviderExtensions.cs │ │ ├── IndentedTextWriterExtensions.cs │ │ ├── SymbolInfoExtensions.cs │ │ └── SyntaxNodeExtensions.cs │ ├── Helpers │ │ ├── DynamicCache{TKey,TValue}.cs │ │ ├── EquatableArray{T}.cs │ │ ├── HashCode.cs │ │ ├── ImmutableArrayBuilder{T}.cs │ │ ├── ImmutableHashSetBuilder{T}.cs │ │ ├── IndentedTextWriter.cs │ │ └── ObjectPool{T}.cs │ └── Models │ │ ├── DiagnosticInfo.cs │ │ ├── HierarchyInfo.cs │ │ └── TypeInfo.cs ├── ComputeSharp.SourceGenerators │ ├── AnalyzerReleases.Shipped.md │ ├── AnalyzerReleases.Unshipped.md │ ├── ComputeShaderDescriptorGenerator.ConstantBuffer.cs │ ├── ComputeShaderDescriptorGenerator.Helpers.cs │ ├── ComputeShaderDescriptorGenerator.HlslBytecode.Syntax.cs │ ├── ComputeShaderDescriptorGenerator.HlslBytecode.cs │ ├── ComputeShaderDescriptorGenerator.HlslSource.Syntax.cs │ ├── ComputeShaderDescriptorGenerator.HlslSource.cs │ ├── ComputeShaderDescriptorGenerator.MetadataProperties.Syntax.cs │ ├── ComputeShaderDescriptorGenerator.NumThreads.Syntax.cs │ ├── ComputeShaderDescriptorGenerator.NumThreads.cs │ ├── ComputeShaderDescriptorGenerator.ResourceDescriptorRanges.Syntax.cs │ ├── ComputeShaderDescriptorGenerator.Resources.Syntax.cs │ ├── ComputeShaderDescriptorGenerator.Resources.cs │ ├── ComputeShaderDescriptorGenerator.cs │ ├── ComputeSharp.SourceGenerators.csproj │ ├── Diagnostics │ │ ├── Analyzers │ │ │ ├── ExcedeedComputeShaderDispatchDataSizeAnalyzer.cs │ │ │ ├── InvalidComputeContextCopyAnalyzer.cs │ │ │ ├── InvalidGeneratedComputeShaderDescriptorAttributeTargetAnalyzer.cs │ │ │ ├── InvalidGloballyCoherentFieldDeclarationAnalyzer.cs │ │ │ ├── InvalidGroupSharedFieldDeclarationAnalyzer.cs │ │ │ ├── InvalidThreadGroupSizeAttributeUseAnalyzer.cs │ │ │ ├── MissingAllowUnsafeBlocksCompilationOptionAnalyzer.cs │ │ │ ├── MissingComputeShaderDescriptorOnComputeShaderAnalyzer.cs │ │ │ ├── MultipleComputeShaderInterfacesOnShaderTypeAnalyzer.cs │ │ │ ├── NotAccessibleFieldTypeInGeneratedShaderDescriptorAttributeTargetAnalyzer.cs │ │ │ ├── NotAccessibleGeneratedComputeShaderDescriptorAttributeTargetAnalyzer.cs │ │ │ └── NotReadOnlyComputeShaderTypeWithFieldsAnalyzer.cs │ │ └── DiagnosticDescriptors.cs │ ├── Dxc │ │ ├── DxcCompilationException.cs │ │ ├── DxcLibraryLoader.cs │ │ ├── DxcShaderCompiler.cs │ │ └── Windows.Win32 │ │ │ ├── ComPtr{T}.cs │ │ │ └── HRESULT.cs │ ├── Mappings │ │ ├── HlslKnownKeywords.cs │ │ ├── HlslKnownMethods.cs │ │ ├── HlslKnownProperties.cs │ │ └── HlslKnownTypes.cs │ ├── Models │ │ ├── HlslBytecodeInfoKey.cs │ │ ├── ResourceDescriptor.cs │ │ ├── ResourceInfo.cs │ │ └── ShaderInfo.cs │ ├── NativeMethods.json │ ├── NativeMethods.txt │ ├── SyntaxProcessors │ │ ├── ConstantBufferSyntaxProcessor.ArtificialFields.cs │ │ └── HlslBytecodeSyntaxProcessor.D3D12.cs │ └── SyntaxRewriters │ │ ├── ExecuteMethodRewriter.cs │ │ ├── ShaderSourceRewriter.cs │ │ └── StaticFieldRewriter.cs ├── ComputeSharp.UI │ ├── ComputeSharp.UI.projitems │ ├── ComputeSharp.UI.shproj │ ├── Controls │ │ ├── AnimatedComputeShaderPanel.Properties.cs │ │ ├── AnimatedComputeShaderPanel.cs │ │ ├── ComputeShaderPanel.Properties.cs │ │ ├── ComputeShaderPanel.cs │ │ └── RenderingFailedEventArgs.cs │ ├── Extensions │ │ ├── IDXGIAdapterExtensions.cs │ │ └── SemaphoreSlimExtensions.cs │ ├── Helpers │ │ ├── DynamicResolutionManager.cs │ │ ├── SwapChainManager.Rendering.cs │ │ ├── SwapChainManager.cs │ │ └── SwapChainPanelNativeMarshaller.cs │ ├── IFrameRequestQueue.cs │ ├── IShaderRunner.cs │ └── ShaderRunner{T}.cs ├── ComputeSharp.Uwp │ ├── ComputeSharp.Uwp.csproj │ └── README.md ├── ComputeSharp.Win32.D2D1 │ ├── .editorconfig │ ├── ComputeSharp.Win32.D2D1.projitems │ ├── ComputeSharp.Win32.D2D1.shproj │ ├── DirectX │ │ ├── headers │ │ │ └── d3dcommon │ │ │ │ └── D3D_FEATURE_LEVEL.cs │ │ └── um │ │ │ ├── d2d1 │ │ │ ├── D2D1_EXTEND_MODE.cs │ │ │ ├── ID2D1Factory.cs │ │ │ └── ID2D1Image.cs │ │ │ ├── d2d1_1 │ │ │ ├── D2D1_BUFFER_PRECISION.cs │ │ │ ├── D2D1_CHANNEL_DEPTH.cs │ │ │ ├── D2D1_PROPERTY.cs │ │ │ ├── D2D1_PROPERTY_TYPE.cs │ │ │ ├── ID2D1CommandList.cs │ │ │ ├── ID2D1DeviceContext.cs │ │ │ ├── ID2D1Effect.cs │ │ │ ├── ID2D1Factory1.cs │ │ │ └── ID2D1Multithread.cs │ │ │ ├── d2d1_2 │ │ │ └── ID2D1Device1.cs │ │ │ ├── d2d1effectauthor │ │ │ ├── D2D1_CHANGE_TYPE.cs │ │ │ ├── D2D1_FEATURE.cs │ │ │ ├── D2D1_FEATURE_DATA_DOUBLES.cs │ │ │ ├── D2D1_FILTER.cs │ │ │ ├── D2D1_INPUT_DESCRIPTION.cs │ │ │ ├── D2D1_PIXEL_OPTIONS.cs │ │ │ ├── D2D1_PROPERTY_BINDING.cs │ │ │ ├── D2D1_RESOURCE_TEXTURE_PROPERTIES.cs │ │ │ ├── ID2D1DrawInfo.cs │ │ │ ├── ID2D1DrawTransform.cs │ │ │ ├── ID2D1EffectContext.cs │ │ │ ├── ID2D1EffectImpl.cs │ │ │ ├── ID2D1ResourceTexture.cs │ │ │ ├── ID2D1Transform.cs │ │ │ ├── ID2D1TransformGraph.cs │ │ │ └── ID2D1TransformNode.cs │ │ │ ├── d2d1effects │ │ │ ├── CLSID.cs │ │ │ ├── D2D1_BORDER_MODE.cs │ │ │ ├── D2D1_DPICOMPENSATION_INTERPOLATION_MODE.cs │ │ │ └── D2D1_DPICOMPENSATION_PROP.cs │ │ │ ├── d3d11shader │ │ │ ├── D3D11_SHADER_DESC.cs │ │ │ └── ID3D11ShaderReflection.cs │ │ │ ├── d3dcommon │ │ │ ├── D3D_INCLUDE_TYPE.cs │ │ │ ├── D3D_SHADER_MACRO.cs │ │ │ └── ID3DInclude.cs │ │ │ ├── d3dcompiler │ │ │ ├── D3DCOMPILE.cs │ │ │ ├── D3DCOMPILER_STRIP_FLAGS.cs │ │ │ ├── D3D_BLOB_PART.cs │ │ │ └── DirectX.cs │ │ │ └── dcommon │ │ │ └── D2D_VECTOR_2F.cs │ └── Windows │ │ ├── other │ │ └── helper-types │ │ │ └── HSTRING.cs │ │ └── shared │ │ ├── windef │ │ └── RECT.cs │ │ └── winerror │ │ ├── D2DERR.cs │ │ └── RO.cs ├── ComputeSharp.Win32.D3D12 │ ├── .editorconfig │ ├── ComPtr`1.cs │ ├── ComputeSharp.Win32.D3D12.projitems │ ├── ComputeSharp.Win32.D3D12.shproj │ ├── DirectX │ │ ├── other │ │ │ └── d3dx12 │ │ │ │ ├── D3D12_BOX.Manual.cs │ │ │ │ ├── D3D12_CPU_DESCRIPTOR_HANDLE.Manual.cs │ │ │ │ ├── D3D12_GPU_DESCRIPTOR_HANDLE.Manual.cs │ │ │ │ ├── D3D12_RESOURCE_ALLOCATION_INFO.Manual.cs │ │ │ │ ├── D3D12_RESOURCE_BARRIER.Manual.cs │ │ │ │ ├── D3D12_RESOURCE_DESC.Manual.cs │ │ │ │ ├── D3D12_ROOT_CONSTANTS.Manual.cs │ │ │ │ ├── D3D12_ROOT_DESCRIPTOR.Manual.cs │ │ │ │ ├── D3D12_ROOT_DESCRIPTOR1.Manual.cs │ │ │ │ ├── D3D12_ROOT_DESCRIPTOR_TABLE1.Manual.cs │ │ │ │ ├── D3D12_ROOT_PARAMETER1.Manual.cs │ │ │ │ ├── D3D12_SHADER_BYTECODE.Manual.cs │ │ │ │ ├── D3D12_STATIC_SAMPLER_DESC.Manual.cs │ │ │ │ ├── D3D12_TEXTURE_COPY_LOCATION.Manual.cs │ │ │ │ └── D3D12_VERSIONED_ROOT_SIGNATURE_DESC.Manual.cs │ │ ├── shared │ │ │ ├── dxgi │ │ │ │ ├── DXGI.cs │ │ │ │ ├── DXGI_ADAPTER_DESC.cs │ │ │ │ ├── DXGI_ADAPTER_DESC1.cs │ │ │ │ ├── DXGI_ADAPTER_FLAG.cs │ │ │ │ ├── DXGI_SWAP_CHAIN_FLAG.cs │ │ │ │ ├── DXGI_SWAP_EFFECT.cs │ │ │ │ ├── IDXGIAdapter.cs │ │ │ │ ├── IDXGIAdapter1.cs │ │ │ │ ├── IDXGIFactory.cs │ │ │ │ ├── IDXGIOutput.cs │ │ │ │ └── IDXGISwapChain.cs │ │ │ ├── dxgi1_2 │ │ │ │ ├── DXGIOutput1.cs │ │ │ │ ├── DXGI_ALPHA_MODE.cs │ │ │ │ ├── DXGI_MODE_DESC1.cs │ │ │ │ ├── DXGI_SCALING.cs │ │ │ │ ├── DXGI_SWAP_CHAIN_DESC1.cs │ │ │ │ ├── IDXGIFactory2.cs │ │ │ │ └── IDXGISwapChain1.cs │ │ │ ├── dxgi1_3 │ │ │ │ ├── DXGI.cs │ │ │ │ ├── DXGI_MATRIX_3X2_F.cs │ │ │ │ └── DirectX.cs │ │ │ ├── dxgi1_4 │ │ │ │ ├── IDXGIFactory4.cs │ │ │ │ └── IDXGISwapChain3.cs │ │ │ ├── dxgi1_5 │ │ │ │ └── DXGI_FEATURE.cs │ │ │ ├── dxgi1_6 │ │ │ │ ├── DXGI_GPU_PREFERENCE.cs │ │ │ │ └── IDXGIFactory6.cs │ │ │ ├── dxgicommon │ │ │ │ ├── DXGI_RATIONAL.cs │ │ │ │ ├── DXGI_SAMPLE_DESC.Manual.cs │ │ │ │ └── DXGI_SAMPLE_DESC.cs │ │ │ ├── dxgiformat │ │ │ │ └── DXGI_FORMAT.cs │ │ │ └── dxgitype │ │ │ │ ├── DXGI_MODE_SCALING.cs │ │ │ │ └── DXGI_MODE_SCANLINE_ORDER.cs │ │ └── um │ │ │ ├── d2d1 │ │ │ └── D2D1_FEATURE_LEVEL.cs │ │ │ ├── d3d11 │ │ │ └── D3D11.cs │ │ │ ├── d3d11shader │ │ │ └── D3D.cs │ │ │ ├── d3d12 │ │ │ ├── D3D12.cs │ │ │ ├── D3D12_AUTO_BREADCRUMB_NODE1.cs │ │ │ ├── D3D12_AUTO_BREADCRUMB_OP.cs │ │ │ ├── D3D12_BOX.cs │ │ │ ├── D3D12_BUFFER_SRV.cs │ │ │ ├── D3D12_BUFFER_SRV_FLAGS.cs │ │ │ ├── D3D12_BUFFER_UAV.cs │ │ │ ├── D3D12_BUFFER_UAV_FLAGS.cs │ │ │ ├── D3D12_CACHED_PIPELINE_STATE.cs │ │ │ ├── D3D12_CLEAR_VALUE.cs │ │ │ ├── D3D12_COMMAND_LIST_TYPE.cs │ │ │ ├── D3D12_COMMAND_QUEUE_DESC.cs │ │ │ ├── D3D12_COMMAND_QUEUE_FLAGS.cs │ │ │ ├── D3D12_COMMAND_QUEUE_PRIORITY.cs │ │ │ ├── D3D12_COMPARISON_FUNC.cs │ │ │ ├── D3D12_COMPUTE_PIPELINE_STATE_DESC.cs │ │ │ ├── D3D12_CONSERVATIVE_RASTERIZATION_TIER.cs │ │ │ ├── D3D12_CONSTANT_BUFFER_VIEW_DESC.cs │ │ │ ├── D3D12_CPU_DESCRIPTOR_HANDLE.cs │ │ │ ├── D3D12_CPU_PAGE_PROPERTY.cs │ │ │ ├── D3D12_CROSS_NODE_SHARING_TIER.cs │ │ │ ├── D3D12_DEPTH_STENCIL_VALUE.cs │ │ │ ├── D3D12_DESCRIPTOR_HEAP_DESC.cs │ │ │ ├── D3D12_DESCRIPTOR_HEAP_FLAGS.cs │ │ │ ├── D3D12_DESCRIPTOR_HEAP_TYPE.cs │ │ │ ├── D3D12_DESCRIPTOR_RANGE.cs │ │ │ ├── D3D12_DESCRIPTOR_RANGE1.cs │ │ │ ├── D3D12_DESCRIPTOR_RANGE_FLAGS.cs │ │ │ ├── D3D12_DESCRIPTOR_RANGE_TYPE.cs │ │ │ ├── D3D12_DRED_AUTO_BREADCRUMB_OUTPUT1.cs │ │ │ ├── D3D12_DRED_BREADCRUMB_CONTEXT.cs │ │ │ ├── D3D12_DRED_ENABLEMENT.cs │ │ │ ├── D3D12_FEATURE.cs │ │ │ ├── D3D12_FEATURE_DATA_ARCHITECTURE.cs │ │ │ ├── D3D12_FEATURE_DATA_ARCHITECTURE1.cs │ │ │ ├── D3D12_FEATURE_DATA_D3D12_OPTIONS.cs │ │ │ ├── D3D12_FEATURE_DATA_D3D12_OPTIONS1.cs │ │ │ ├── D3D12_FEATURE_DATA_D3D12_OPTIONS7.cs │ │ │ ├── D3D12_FEATURE_DATA_FORMAT_SUPPORT.cs │ │ │ ├── D3D12_FEATURE_DATA_SHADER_MODEL.cs │ │ │ ├── D3D12_FENCE_FLAGS.cs │ │ │ ├── D3D12_FILTER.cs │ │ │ ├── D3D12_FORMAT_SUPPORT1.cs │ │ │ ├── D3D12_FORMAT_SUPPORT2.cs │ │ │ ├── D3D12_GPU_DESCRIPTOR_HANDLE.cs │ │ │ ├── D3D12_HEAP_DESC.cs │ │ │ ├── D3D12_HEAP_FLAGS.cs │ │ │ ├── D3D12_HEAP_PROPERTIES.cs │ │ │ ├── D3D12_HEAP_TYPE.cs │ │ │ ├── D3D12_MEMORY_POOL.cs │ │ │ ├── D3D12_MESH_SHADER_TIER.cs │ │ │ ├── D3D12_MIP_REGION.cs │ │ │ ├── D3D12_PIPELINE_STATE_FLAGS.cs │ │ │ ├── D3D12_PLACED_SUBRESOURCE_FOOTPRINT.cs │ │ │ ├── D3D12_RANGE.cs │ │ │ ├── D3D12_RAYTRACING_ACCELERATION_STRUCTURE_SRV.cs │ │ │ ├── D3D12_RESOURCE_ALIASING_BARRIER.cs │ │ │ ├── D3D12_RESOURCE_ALLOCATION_INFO.cs │ │ │ ├── D3D12_RESOURCE_ALLOCATION_INFO1.cs │ │ │ ├── D3D12_RESOURCE_BARRIER.cs │ │ │ ├── D3D12_RESOURCE_BARRIER_FLAGS.cs │ │ │ ├── D3D12_RESOURCE_BARRIER_TYPE.cs │ │ │ ├── D3D12_RESOURCE_BINDING_TIER.cs │ │ │ ├── D3D12_RESOURCE_DESC.cs │ │ │ ├── D3D12_RESOURCE_DESC1.cs │ │ │ ├── D3D12_RESOURCE_DIMENSION.cs │ │ │ ├── D3D12_RESOURCE_FLAGS.cs │ │ │ ├── D3D12_RESOURCE_HEAP_TIER.cs │ │ │ ├── D3D12_RESOURCE_STATES.cs │ │ │ ├── D3D12_RESOURCE_TRANSITION_BARRIER.cs │ │ │ ├── D3D12_RESOURCE_UAV_BARRIER.cs │ │ │ ├── D3D12_ROOT_CONSTANTS.cs │ │ │ ├── D3D12_ROOT_DESCRIPTOR.cs │ │ │ ├── D3D12_ROOT_DESCRIPTOR1.cs │ │ │ ├── D3D12_ROOT_DESCRIPTOR_FLAGS.cs │ │ │ ├── D3D12_ROOT_DESCRIPTOR_TABLE.cs │ │ │ ├── D3D12_ROOT_DESCRIPTOR_TABLE1.cs │ │ │ ├── D3D12_ROOT_PARAMETER.cs │ │ │ ├── D3D12_ROOT_PARAMETER1.cs │ │ │ ├── D3D12_ROOT_PARAMETER_TYPE.cs │ │ │ ├── D3D12_ROOT_SIGNATURE_DESC.cs │ │ │ ├── D3D12_ROOT_SIGNATURE_DESC1.cs │ │ │ ├── D3D12_ROOT_SIGNATURE_FLAGS.cs │ │ │ ├── D3D12_SAMPLER_FEEDBACK_TIER.cs │ │ │ ├── D3D12_SHADER_BYTECODE.cs │ │ │ ├── D3D12_SHADER_MIN_PRECISION_SUPPORT.cs │ │ │ ├── D3D12_SHADER_RESOURCE_VIEW_DESC.cs │ │ │ ├── D3D12_SHADER_VISIBILITY.cs │ │ │ ├── D3D12_SRV_DIMENSION.cs │ │ │ ├── D3D12_STATIC_BORDER_COLOR.cs │ │ │ ├── D3D12_STATIC_SAMPLER_DESC.cs │ │ │ ├── D3D12_SUBRESOURCE_FOOTPRINT.cs │ │ │ ├── D3D12_TEX1D_ARRAY_SRV.cs │ │ │ ├── D3D12_TEX1D_ARRAY_UAV.cs │ │ │ ├── D3D12_TEX1D_SRV.cs │ │ │ ├── D3D12_TEX1D_UAV.cs │ │ │ ├── D3D12_TEX2DMS_ARRAY_SRV.cs │ │ │ ├── D3D12_TEX2DMS_SRV.cs │ │ │ ├── D3D12_TEX2D_ARRAY_SRV.cs │ │ │ ├── D3D12_TEX2D_ARRAY_UAV.cs │ │ │ ├── D3D12_TEX2D_SRV.cs │ │ │ ├── D3D12_TEX2D_UAV.cs │ │ │ ├── D3D12_TEX3D_SRV.cs │ │ │ ├── D3D12_TEX3D_UAV.cs │ │ │ ├── D3D12_TEXCUBE_ARRAY_SRV.cs │ │ │ ├── D3D12_TEXCUBE_SRV.cs │ │ │ ├── D3D12_TEXTURE_ADDRESS_MODE.cs │ │ │ ├── D3D12_TEXTURE_COPY_LOCATION.cs │ │ │ ├── D3D12_TEXTURE_COPY_TYPE.cs │ │ │ ├── D3D12_TEXTURE_LAYOUT.cs │ │ │ ├── D3D12_TILED_RESOURCES_TIER.cs │ │ │ ├── D3D12_UAV_DIMENSION.cs │ │ │ ├── D3D12_UNORDERED_ACCESS_VIEW_DESC.cs │ │ │ ├── D3D12_VERSIONED_ROOT_SIGNATURE_DESC.cs │ │ │ ├── D3D_ROOT_SIGNATURE_VERSION.cs │ │ │ ├── D3D_SHADER_MODEL.cs │ │ │ ├── DirectX.cs │ │ │ ├── ID3D12CommandAllocator.cs │ │ │ ├── ID3D12CommandList.cs │ │ │ ├── ID3D12CommandQueue.cs │ │ │ ├── ID3D12DescriptorHeap.cs │ │ │ ├── ID3D12Device.cs │ │ │ ├── ID3D12DeviceRemovedExtendedData1.cs │ │ │ ├── ID3D12DeviceRemovedExtendedDataSettings1.cs │ │ │ ├── ID3D12Fence.cs │ │ │ ├── ID3D12GraphicsCommandList.cs │ │ │ ├── ID3D12Heap.cs │ │ │ ├── ID3D12PipelineState.cs │ │ │ ├── ID3D12Resource.cs │ │ │ └── ID3D12RootSignature.cs │ │ │ ├── d3d12sdklayers │ │ │ ├── D3D12_INFO_QUEUE_FILTER.cs │ │ │ ├── D3D12_INFO_QUEUE_FILTER_DESC.cs │ │ │ ├── D3D12_MESSAGE.cs │ │ │ ├── D3D12_MESSAGE_CATEGORY.cs │ │ │ ├── D3D12_MESSAGE_ID.cs │ │ │ ├── D3D12_MESSAGE_SEVERITY.cs │ │ │ ├── ID3D12Debug.cs │ │ │ ├── ID3D12Debug1.cs │ │ │ └── ID3D12InfoQueue.cs │ │ │ ├── d3d12shader │ │ │ ├── D3D12_SHADER_DESC.cs │ │ │ └── ID3D12ShaderReflection.cs │ │ │ ├── d3dcommon │ │ │ ├── D3D_FEATURE_LEVEL.cs │ │ │ ├── D3D_PRIMITIVE.cs │ │ │ ├── D3D_PRIMITIVE_TOPOLOGY.cs │ │ │ ├── D3D_TESSELLATOR_DOMAIN.cs │ │ │ ├── D3D_TESSELLATOR_OUTPUT_PRIMITIVE.cs │ │ │ ├── D3D_TESSELLATOR_PARTITIONING.cs │ │ │ └── ID3DBlob.cs │ │ │ └── dxcapi │ │ │ ├── CLSID.cs │ │ │ ├── DirectX.cs │ │ │ ├── DxcBuffer.cs │ │ │ └── IDxcUtils.cs │ ├── WinRT │ │ └── um │ │ │ └── windows.ui.xaml.media.dxinterop │ │ │ └── ISwapChainPanelNative.cs │ └── Windows │ │ ├── other │ │ └── helper-types │ │ │ ├── BOOL.cs │ │ │ ├── HANDLE.cs │ │ │ ├── HRESULT.cs │ │ │ ├── IComObject.cs │ │ │ ├── NativeInheritanceAttribute.cs │ │ │ ├── NativeTypeNameAttribute.cs │ │ │ └── VtblIndexAttribute.cs │ │ ├── shared │ │ ├── minwindef │ │ │ ├── FILETIME.cs │ │ │ └── Windows.cs │ │ ├── uuids │ │ │ └── Windows.Manual.cs │ │ ├── winerror │ │ │ ├── DXGI.cs │ │ │ ├── E.cs │ │ │ ├── S.cs │ │ │ ├── STG.cs │ │ │ └── Windows.Manual.cs │ │ ├── wtypes │ │ │ └── STATFLAG.cs │ │ └── wtypesbase │ │ │ └── CLSCTX.cs │ │ └── um │ │ ├── Unknwnbase │ │ └── IUnknown.cs │ │ ├── WinBase │ │ └── Windows.cs │ │ ├── combaseapi │ │ └── Windows.cs │ │ ├── coml2api │ │ └── STGM.cs │ │ ├── handleapi │ │ └── Windows.cs │ │ ├── minwinbase │ │ └── SECURITY_ATTRIBUTES.cs │ │ ├── objidlbase │ │ ├── IID.cs │ │ ├── IStream.cs │ │ ├── STATSTG.cs │ │ └── STGTY.cs │ │ ├── synchapi │ │ └── Windows.cs │ │ ├── wincodec │ │ ├── CLSID.cs │ │ ├── GUID.cs │ │ ├── IWICBitmap.cs │ │ ├── IWICBitmapDecoder.cs │ │ ├── IWICBitmapEncoder.cs │ │ ├── IWICBitmapFrameDecode.cs │ │ ├── IWICBitmapFrameEncode.cs │ │ ├── IWICBitmapSource.cs │ │ ├── IWICFormatConverter.cs │ │ ├── IWICImagingFactory2.cs │ │ ├── IWICPalette.cs │ │ ├── IWICStream.cs │ │ ├── WICBitmapAlphaChannelOption.cs │ │ ├── WICBitmapCreateCacheOption.cs │ │ ├── WICBitmapDitherType.cs │ │ ├── WICBitmapEncoderCacheOption.cs │ │ ├── WICBitmapPaletteType.cs │ │ ├── WICDecodeOptions.cs │ │ └── WICRect.cs │ │ └── winnt │ │ ├── LARGE_INTEGER.cs │ │ ├── LUID.cs │ │ ├── ULARGE_INTEGER.cs │ │ └── Windows.cs ├── ComputeSharp.WinUI │ ├── ComputeSharp.WinUI.csproj │ └── README.md ├── ComputeSharp │ ├── Attributes │ │ ├── CompileOptionsAttribute.cs │ │ ├── Enums │ │ │ ├── CompileOptions.cs │ │ │ └── DefaultThreadGroupSizes.cs │ │ ├── GeneratedComputeShaderDescriptorAttribute.cs │ │ ├── GloballyCoherentAttribute.cs │ │ ├── GroupSharedAttribute.cs │ │ ├── RequiresDoublePrecisionSupportAttribute.cs │ │ └── ThreadGroupSizeAttribute.cs │ ├── ComputeSharp.csproj │ ├── ComputeSharp.targets │ ├── Dispatch │ │ ├── DispatchSize.cs │ │ ├── GridIds.cs │ │ ├── GroupIds.cs │ │ ├── GroupSize.cs │ │ ├── ThreadIds.Normalized.cs │ │ └── ThreadIds.cs │ ├── Graphics │ │ ├── Commands │ │ │ ├── CommandList.cs │ │ │ └── Interop │ │ │ │ ├── ID3D12CommandListPool.cs │ │ │ │ ├── ID3D12DescriptorHandleAllocator.cs │ │ │ │ └── ID3D12ResourceDescriptorHandles.cs │ │ ├── DeviceLostEventArgs.cs │ │ ├── DeviceLostReason.cs │ │ ├── Exceptions │ │ │ ├── GraphicsDeviceMismatchException.cs │ │ │ ├── UnsupportedDoubleOperationsException.cs │ │ │ └── UnsupportedTextureTypeException.cs │ │ ├── Extensions │ │ │ ├── BufferExtensions.cs │ │ │ ├── GraphicsDeviceExtensions.Dispatching.cs │ │ │ ├── GraphicsDeviceExtensions.Resources.cs │ │ │ ├── Interop │ │ │ │ ├── ComPtrExtensions.cs │ │ │ │ ├── HRESULTExtensions.cs │ │ │ │ ├── ID3D12AllocationExtensions.cs │ │ │ │ ├── ID3D12DeviceExtensions.cs │ │ │ │ ├── ID3D12GraphicsCommandListExtensions.cs │ │ │ │ ├── ID3D12MemoryAllocatorExtensions.cs │ │ │ │ ├── ID3D12ResourceExtensions.cs │ │ │ │ ├── IWICStreamExtensions.IBufferWriter.cs │ │ │ │ └── IWICStreamExtensions.Stream.cs │ │ │ ├── ReadBackBufferExtensions.cs │ │ │ ├── ReadBackTexture1DExtensions.cs │ │ │ ├── ReadBackTexture2DExtensions.cs │ │ │ ├── ReadBackTexture3DExtensions.cs │ │ │ ├── ReadWriteTexture1DExtensions.cs │ │ │ ├── ReadWriteTexture2DExtensions.cs │ │ │ ├── ReadWriteTexture3DExtensions.cs │ │ │ ├── StructuredBufferExtensions.cs │ │ │ ├── Texture1DExtensions.cs │ │ │ ├── Texture2DExtensions.cs │ │ │ ├── Texture3DExtensions.cs │ │ │ ├── UploadBufferExtensions.cs │ │ │ ├── UploadTexture1DExtensions.cs │ │ │ ├── UploadTexture2DExtensions.cs │ │ │ └── UploadTexture3DExtensions.cs │ │ ├── GraphicsDevice.DeviceLost.cs │ │ ├── GraphicsDevice.Execute.cs │ │ ├── GraphicsDevice.GetDevice.cs │ │ ├── GraphicsDevice.Resources.cs │ │ ├── GraphicsDevice.cs │ │ ├── GraphicsDeviceInfo.cs │ │ ├── Helpers │ │ │ ├── AlignmentHelper.cs │ │ │ ├── DXGIFormatHelper.cs │ │ │ ├── DeviceHelper.Enumerator.cs │ │ │ ├── DeviceHelper.Factory.cs │ │ │ ├── DeviceHelper.ID3D12InfoQueue.cs │ │ │ ├── DeviceHelper.IDXGIFactory6.cs │ │ │ ├── DeviceHelper.cs │ │ │ ├── MemoryHelper.cs │ │ │ ├── TypeInfo{T}.cs │ │ │ ├── WICFormatHelper.cs │ │ │ └── WICHelper.cs │ │ ├── Interop │ │ │ ├── Allocation │ │ │ │ ├── ID3D12Allocation.cs │ │ │ │ ├── ID3D12MemoryAllocator.cs │ │ │ │ └── ID3D12MemoryAllocatorFactory.cs │ │ │ ├── AllocationServices.cs │ │ │ ├── IReferenceTrackedObject.cs │ │ │ ├── InteropServices.cs │ │ │ ├── ReferenceTrackedObject.cs │ │ │ ├── ReferenceTrackedTypes.g.cs │ │ │ ├── ReferenceTrackedTypes.tt │ │ │ ├── ReferenceTracker.cs │ │ │ ├── ResourceDescriptorRange.cs │ │ │ └── ResourceDescriptorRangeType.cs │ │ ├── Luid.cs │ │ └── Resources │ │ │ ├── Abstract │ │ │ ├── Buffer{T}.cs │ │ │ ├── StructuredBuffer{T}.cs │ │ │ ├── Texture1D{T}.cs │ │ │ ├── Texture2D{T}.cs │ │ │ ├── Texture3D{T}.cs │ │ │ ├── TransferBuffer{T}.cs │ │ │ ├── TransferTexture1D{T}.cs │ │ │ ├── TransferTexture2D{T}.cs │ │ │ └── TransferTexture3D{T}.cs │ │ │ ├── ConstantBuffer{T}.cs │ │ │ ├── Debug │ │ │ ├── BufferDebugView{T}.cs │ │ │ ├── Texture1DDebugView{T}.cs │ │ │ ├── Texture2DDebugView{T}.cs │ │ │ ├── Texture3DDebugView{T}.cs │ │ │ ├── TransferBufferDebugView{T}.cs │ │ │ ├── TransferTexture1DDebugView{T}.cs │ │ │ ├── TransferTexture2DDebugView{T}.cs │ │ │ └── TransferTexture3DDebugView{T}.cs │ │ │ ├── Enums │ │ │ ├── AllocationMode.cs │ │ │ ├── ResourceState.cs │ │ │ └── ResourceType.cs │ │ │ ├── Helpers │ │ │ └── ResourceStateHelper.cs │ │ │ ├── Interfaces │ │ │ ├── IGraphicsResource.cs │ │ │ ├── IReadOnlyNormalizedTexture1D{TPixel}.cs │ │ │ ├── IReadOnlyNormalizedTexture2D{TPixel}.cs │ │ │ ├── IReadOnlyNormalizedTexture3D{TPixel}.cs │ │ │ ├── IReadOnlyTexture1D{T}.cs │ │ │ ├── IReadOnlyTexture2D{T}.cs │ │ │ ├── IReadOnlyTexture3D{T}.cs │ │ │ ├── IReadWriteNormalizedTexture1D{TPixel}.cs │ │ │ ├── IReadWriteNormalizedTexture2D{TPixel}.cs │ │ │ ├── IReadWriteNormalizedTexture3D{TPixel}.cs │ │ │ └── Interop │ │ │ │ ├── ID3D12ReadOnlyResource.cs │ │ │ │ └── ID3D12ReadWriteResource.cs │ │ │ ├── Interop │ │ │ └── ID3D12ResourceMap.cs │ │ │ ├── ReadBackBuffer{T}.cs │ │ │ ├── ReadBackTexture1D{T}.cs │ │ │ ├── ReadBackTexture2D{T}.cs │ │ │ ├── ReadBackTexture3D{T}.cs │ │ │ ├── ReadOnlyBuffer{T}.cs │ │ │ ├── ReadOnlyTexture1D{T,TPixel}.cs │ │ │ ├── ReadOnlyTexture1D{T}.cs │ │ │ ├── ReadOnlyTexture2D{T,TPixel}.cs │ │ │ ├── ReadOnlyTexture2D{T}.cs │ │ │ ├── ReadOnlyTexture3D{T,TPixel}.cs │ │ │ ├── ReadOnlyTexture3D{T}.cs │ │ │ ├── ReadWriteBuffer{T}.cs │ │ │ ├── ReadWriteTexture1D{T,TPixel}.ReadOnly.cs │ │ │ ├── ReadWriteTexture1D{T,TPixel}.cs │ │ │ ├── ReadWriteTexture1D{T}.ReadOnly.cs │ │ │ ├── ReadWriteTexture1D{T}.cs │ │ │ ├── ReadWriteTexture2D{T,TPixel}.ReadOnly.cs │ │ │ ├── ReadWriteTexture2D{T,TPixel}.cs │ │ │ ├── ReadWriteTexture2D{T}.ReadOnly.cs │ │ │ ├── ReadWriteTexture2D{T}.cs │ │ │ ├── ReadWriteTexture3D{T,TPixel}.ReadOnly.cs │ │ │ ├── ReadWriteTexture3D{T,TPixel}.cs │ │ │ ├── ReadWriteTexture3D{T}.ReadOnly.cs │ │ │ ├── ReadWriteTexture3D{T}.cs │ │ │ ├── UploadBuffer{T}.cs │ │ │ ├── UploadTexture1D{T}.cs │ │ │ ├── UploadTexture2D{T}.cs │ │ │ ├── UploadTexture3D{T}.cs │ │ │ └── Views │ │ │ ├── TextureView2D{T}.cs │ │ │ └── TextureView3D{T}.cs │ ├── Imaging │ │ ├── Bgra32.cs │ │ ├── Formats │ │ │ └── ImageFormat.cs │ │ ├── Interfaces │ │ │ └── IPixel{T,TPixel}.cs │ │ ├── R16.cs │ │ ├── R8.cs │ │ ├── Rg16.cs │ │ ├── Rg32.cs │ │ ├── Rgba32.cs │ │ └── Rgba64.cs │ ├── Interfaces │ │ ├── Descriptors │ │ │ ├── IComputeShaderDescriptor{T}.cs │ │ │ ├── IConstantBufferLoader.cs │ │ │ └── IGraphicsResourceLoader.cs │ │ ├── IComputeShader.cs │ │ └── IComputeShader{TPixel}.cs │ ├── Properties │ │ ├── Configuration.cs │ │ └── ILLink.Substitutions.xml │ ├── README.md │ └── Shaders │ │ ├── ComputeContext.cs │ │ ├── Dispatching │ │ ├── D3D12GraphicsCommandListConstantBufferLoader.cs │ │ └── D3D12GraphicsCommandListGraphicsResourceLoader.cs │ │ ├── Extensions │ │ ├── ComputeContextExtensions.cs │ │ └── Interop │ │ │ └── ID3D12DeviceExtensions.cs │ │ └── Loading │ │ ├── PipelineData.cs │ │ └── PipelineDataLoader{T}.cs ├── Directory.Build.BeforeMicrosoftNETSdkTargets.targets ├── Directory.Build.props └── Directory.Build.targets └── tests ├── .editorconfig ├── ComputeSharp.D2D1.Tests.AssemblyLevelAttributes ├── ComputeSharp.D2D1.Tests.AssemblyLevelAttributes.csproj ├── D2D1PixelShaderTests.cs └── Properties │ └── AssemblyInfo.cs ├── ComputeSharp.D2D1.Tests.SourceGenerators ├── ComputeSharp.D2D1.Tests.SourceGenerators.csproj ├── Test_D2DPixelShaderDescriptorGenerator.cs ├── Test_D2DPixelShaderDescriptorGenerator_Analyzers.cs ├── Test_D2DPixelShaderDescriptorGenerator_Diagnostics.cs ├── Test_D2DPixelShaderDescriptorGenerator_Incrementality.cs ├── Test_D2DPixelShaderSourceGenerator_Analyzers.cs ├── Test_D2DPixelShaderSourceGenerator_Incrementality.cs └── Test_MissingPixelShaderDescriptorOnPixelShaderCodeFixer.cs ├── ComputeSharp.D2D1.Tests ├── Assets │ ├── ContouredLayers.png │ ├── Green32x32.png │ ├── Landscape.png │ ├── Landscape_CheckerboardClip.png │ ├── Landscape_Inverted.png │ ├── Landscape_Pixelate.png │ ├── PyramidPattern.png │ ├── RadialFadeOut.png │ ├── TerracedHills.png │ ├── TriangleGridContouring.png │ ├── TwoTiledTruchet.png │ ├── Wallpaper0.png │ ├── Wallpaper1.png │ ├── WallpapersStack.png │ └── ZonePlate.png ├── ComputeSharp.D2D1.Tests.csproj ├── D2D1EffectRegistrationDataTests.cs ├── D2D1PixelShaderEffectTests.cs ├── D2D1PixelShaderTests.cs ├── D2D1ReflectionServicesTests.cs ├── D2D1ResourceTextureManagerTests.cs ├── D2D1ResourceTextureUninitializedFieldDiagnosticSuppressorTests.cs ├── D2D1ShaderCompilerTests.cs ├── D2D1TransformMapperTests.cs ├── D2DPixelShaderSourceTests.cs ├── Effects │ ├── BokehBlurEffect.cs │ ├── CheckerboardClipEffect.cs │ ├── InvertEffect.cs │ ├── InvertWithThresholdEffect.cs │ ├── InvertWithUserTypeAndMutuallyInvokingMethods.cs │ ├── InvertWithUserTypeWithConstructorEffect.cs │ ├── PixelateEffect.cs │ └── ZonePlateEffect.cs ├── EffectsTests.cs ├── Extensions │ ├── ComPtrExtensions.cs │ └── HRESULTExtensions.cs ├── Helpers │ ├── D2D1Helper.cs │ ├── D2D1TestRunner.cs │ └── ImageHelper.cs ├── ShaderRewriterTests.cs └── ShadersTests.cs ├── ComputeSharp.D2D1.WinUI.Tests.SourceGenerators ├── ComputeSharp.D2D1.WinUI.Tests.SourceGenerators.csproj ├── Helpers │ └── CSharpCodeFixerTest{TAnalyzer,TCodeFixer}.cs ├── Test_CanvasEffectPropertyGenerator.cs ├── Test_CanvasEffectPropertyGenerator_Analyzers.cs ├── Test_CanvasEffectPropertyGenerator_Incrementality.cs └── Test_UseGeneratedCanvasEffectPropertyOnSemiAutoPropertyCodeFixer.cs ├── ComputeSharp.D2D1.WinUI.Tests ├── App.xaml ├── App.xaml.cs ├── Assets │ ├── LockScreenLogo.scale-200.png │ ├── SplashScreen.scale-200.png │ ├── Square150x150Logo.scale-200.png │ ├── Square44x44Logo.scale-200.png │ ├── Square44x44Logo.targetsize-24_altform-unplated.png │ ├── StoreLogo.png │ └── Wide310x150Logo.scale-200.png ├── ComputeSharp.D2D1.WinUI.Tests.csproj ├── Helpers │ ├── TolerantImageComparer.cs │ └── Win2DHelper.cs ├── Package.appxmanifest ├── Properties │ ├── PublishProfiles │ │ ├── win-arm64.pubxml │ │ └── win-x64.pubxml │ └── launchSettings.json ├── Tests │ ├── CanvasEffectTests.cs │ ├── PixelShaderEffectTests.cs │ └── ShadersTests.cs └── app.manifest ├── ComputeSharp.Dxc.NuGet ├── ComputeSharp.Dxc.NuGet.csproj └── Program.cs ├── ComputeSharp.NuGet ├── ComputeSharp.NuGet.csproj └── Program.cs ├── ComputeSharp.Pix.NuGet ├── ComputeSharp.Pix.NuGet.csproj └── Program.cs ├── ComputeSharp.Tests.DeviceLost ├── ComputeSharp.Tests.DeviceLost.csproj ├── DeviceDisposalTests.cs ├── DeviceLostTests.cs ├── Extensions │ └── DeviceExtensions.cs ├── GetDefaultDeviceTests.cs ├── Helpers │ └── GraphicsDeviceHelper.cs └── Properties │ └── AssemblyInfo.cs ├── ComputeSharp.Tests.DisableDynamicCompilation ├── ComputeSharp.Tests.DisableDynamicCompilation.csproj └── DispatchTests.cs ├── ComputeSharp.Tests.GlobalStatements ├── ComputeSharp.Tests.GlobalStatements.csproj └── Program.cs ├── ComputeSharp.Tests.Internals ├── AlignmentHelperTests.cs ├── ComputeSharp.Tests.Internals.csproj ├── DebugViewTests.cs ├── Helpers │ └── DebugDispatchDataLoader.cs ├── NativeObjectTests.cs └── ShaderDataLoaderTests.cs ├── ComputeSharp.Tests.NativeLibrariesResolver ├── ComputeSharp.Tests.NativeLibrariesResolver.csproj ├── DxcNativeLibrariesResolverTests.cs ├── Helpers │ └── NativeLibrariesResolverTestsBase.cs ├── NativeLibrariesResolverTests.cs ├── PixNativeLibrariesResolverTests.cs └── Properties │ └── AssemblyInfo.cs ├── ComputeSharp.Tests.SourceGenerators ├── ComputeSharp.Tests.SourceGenerators.csproj ├── Helpers │ ├── CSharpAnalyzerTest{TAnalyzer}.cs │ └── CSharpGeneratorTest{TGenerator}.cs ├── Test_ComputeShaderDescriptorGenerator.cs ├── Test_ComputeShaderDescriptorGenerator_Analyzers.cs ├── Test_ComputeShaderDescriptorGenerator_Diagnostics.cs └── Test_ComputeShaderDescriptorGenerator_Incrementality.cs ├── ComputeSharp.Tests ├── AllocationServicesTests.cs ├── Assets │ ├── CityAfter1024x1024Sampling.png │ ├── CityAfter1024x1024SamplingAndDashing.png │ ├── CityAfter1024x1024SamplingFrom1920x1080.png │ ├── CityAfter1024x1024SamplingFrom1920x1080AndDashing.png │ ├── CityAfter1024x1024SamplingInverted.png │ ├── CityWith1920x1280Resizing.png │ ├── ColorfulInfinity.png │ ├── ContouredLayers.png │ ├── ExtrudedTruchetPattern.png │ ├── FourColorGradient.png │ ├── FractalTiling.png │ ├── HelloWorld.png │ ├── MengerJourney.png │ ├── Octagrams.png │ ├── ProteanClouds.png │ ├── PyramidPattern.png │ ├── TerracedHills.png │ ├── TriangleGridContouring.png │ └── TwoTiledTruchet.png ├── Attributes │ ├── AdditionalDataAttribute.cs │ ├── AdditionalResourceAttribute.cs │ ├── AllDevicesAttribute.cs │ ├── CombinatorialTestMethodAttribute.cs │ ├── DataAttribute.cs │ ├── DeviceAttribute.cs │ └── ResourceAttribute.cs ├── BufferTests.cs ├── ComputeContextTests.cs ├── ComputeSharp.Tests.csproj ├── DispatchTests.cs ├── Extensions │ ├── ComPtrExtensions.cs │ ├── DeviceExtensions.cs │ ├── GraphicsDeviceExtensions.cs │ └── ImagingExtensions.cs ├── GlobalUsingDirectivesTests.cs ├── Helpers │ ├── TestHelper.cs │ └── TolerantImageComparer.cs ├── HlslPrimitiveTests.cs ├── IPixelShaderTests.cs ├── ImageProcessingTests.cs ├── ImagingTests.cs ├── InitializationTests.cs ├── InteropServicesTests.cs ├── Misc │ └── ExternalStructType.cs ├── PixelTypeTests.cs ├── Properties │ └── AssemblyInfo.cs ├── ResourceDimensionsTests.g.cs ├── ResourceDimensionsTests.tt ├── ShaderCompilerTests.cs ├── ShaderMembersTests.cs ├── ShaderRewriterTests.cs ├── Shaders │ └── Compute │ │ ├── ColorfulInfinity.cs │ │ ├── ContouredLayers.cs │ │ ├── ExtrudedTruchetPattern.cs │ │ ├── FourColorGradient.cs │ │ ├── FractalTiling.cs │ │ ├── HelloWorld.cs │ │ ├── MengerJourney.cs │ │ ├── Octagrams.cs │ │ ├── ProteanClouds.cs │ │ ├── PyramidPattern.cs │ │ ├── TerracedHills.cs │ │ ├── TriangleGridContouring.cs │ │ └── TwoTiledTruchet.cs ├── ShadersTests.cs ├── Texture1DTests.Pixels.cs ├── Texture1DTests.Pixels.g.cs ├── Texture1DTests.Pixels.tt ├── Texture1DTests.cs ├── Texture2DTests.Pixels.cs ├── Texture2DTests.Pixels.g.cs ├── Texture2DTests.Pixels.tt ├── Texture2DTests.cs ├── Texture3DTests.Pixels.cs ├── Texture3DTests.Pixels.g.cs ├── Texture3DTests.Pixels.tt ├── Texture3DTests.cs ├── ThreadGroupSizeTests.cs ├── TransferBufferTests.cs ├── TransferTexture1DTests.cs ├── TransferTexture2DTests.cs ├── TransferTexture3DTests.cs └── UserDefinedTypeConstructorTests.cs ├── Directory.Build.props └── Directory.Build.targets /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: Sergio0694 # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 13 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/question.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Question 3 | about: Ask a general question about this project (not a bug report or proposal) 4 | title: '' 5 | labels: 'question :question:, untriaged :toolbox:' 6 | assignees: '' 7 | 8 | --- 9 | 10 | Ask any questions you might have about the project. If you think it might be 11 | useful, please also include additional context that might help understand it. 12 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### Closes # 2 | 3 | ### Description (optional) 4 | 5 | This section should contain an expanded description 6 | of the pull request, if the title is not sufficient. 7 | 8 | ### API breakdown (for new features) 9 | 10 | This section should contain the APIs being implemented. 11 | 12 | ### Additional context (optional) 13 | 14 | Any additional info that might be useful to resolve the issue. 15 | -------------------------------------------------------------------------------- /assets/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/assets/icon.ico -------------------------------------------------------------------------------- /assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/assets/icon.png -------------------------------------------------------------------------------- /assets/icon_highres.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/assets/icon_highres.png -------------------------------------------------------------------------------- /build/computesharp.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/build/computesharp.snk -------------------------------------------------------------------------------- /docs/ComputeSharp.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/docs/ComputeSharp.pdf -------------------------------------------------------------------------------- /global.json: -------------------------------------------------------------------------------- 1 | { 2 | "sdk": { 3 | "version": "9.0.202", 4 | "rollForward": "latestFeature", 5 | "allowPrerelease": false 6 | } 7 | } -------------------------------------------------------------------------------- /libs/arm64/WinPixEventRuntime.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/libs/arm64/WinPixEventRuntime.dll -------------------------------------------------------------------------------- /libs/arm64/WinPixEventRuntime_UAP.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/libs/arm64/WinPixEventRuntime_UAP.dll -------------------------------------------------------------------------------- /libs/arm64/dxcompiler.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/libs/arm64/dxcompiler.dll -------------------------------------------------------------------------------- /libs/arm64/dxil.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/libs/arm64/dxil.dll -------------------------------------------------------------------------------- /libs/x64/WinPixEventRuntime.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/libs/x64/WinPixEventRuntime.dll -------------------------------------------------------------------------------- /libs/x64/WinPixEventRuntime_UAP.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/libs/x64/WinPixEventRuntime_UAP.dll -------------------------------------------------------------------------------- /libs/x64/dxcompiler.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/libs/x64/dxcompiler.dll -------------------------------------------------------------------------------- /libs/x64/dxil.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/libs/x64/dxil.dll -------------------------------------------------------------------------------- /nuget.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /samples/ComputeSharp.Benchmark/Program.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using BenchmarkDotNet.Running; 3 | 4 | // ================= 5 | // BenchmarkDotNet 6 | // ================ 7 | // In order to run this benchmark, switch to Release mode and either run select 8 | // it as the startup project for the solution and run it without the debugger 9 | // (CTRL + F5), or compile it and then go to its bin\Release\net8.0 folder, 10 | // open a cmd prompt and run "dotnet ComputeSharp.Benchmark.dll". 11 | BenchmarkSwitcher.FromAssembly(Assembly.GetExecutingAssembly()).Run(args); -------------------------------------------------------------------------------- /samples/ComputeSharp.ImageProcessing/city.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.ImageProcessing/city.jpg -------------------------------------------------------------------------------- /samples/ComputeSharp.Sample.FSharp.Shaders/MultiplyByTwo.cs: -------------------------------------------------------------------------------- 1 | namespace ComputeSharp.Sample.FSharp.Shaders; 2 | 3 | /// 4 | /// A sample shader thaat just multiplies items in a buffer by two. 5 | /// 6 | [ThreadGroupSize(DefaultThreadGroupSizes.X)] 7 | [GeneratedComputeShaderDescriptor] 8 | public readonly partial struct MultiplyByTwo(ReadWriteBuffer buffer) : IComputeShader 9 | { 10 | /// 11 | public void Execute() 12 | { 13 | buffer[ThreadIds.X] *= 2; 14 | } 15 | } -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.D2D1.Cli/app.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | true 6 | PerMonitorV2 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.D2D1.Uwp/Assets/LockScreenLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.D2D1.Uwp/Assets/LockScreenLogo.scale-200.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.D2D1.Uwp/Assets/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.D2D1.Uwp/Assets/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.D2D1.Uwp/Assets/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.D2D1.Uwp/Assets/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.D2D1.Uwp/Assets/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.D2D1.Uwp/Assets/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.D2D1.Uwp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.D2D1.Uwp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.D2D1.Uwp/Assets/StoreLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.D2D1.Uwp/Assets/StoreLogo.scale-200.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.D2D1.Uwp/Assets/Wide310x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.D2D1.Uwp/Assets/Wide310x150Logo.scale-200.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.D2D1.Uwp/Properties/PublishProfiles/win-arm64.pubxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | FileSystem 5 | ARM64 6 | win-arm64 7 | bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ 8 | true 9 | true 10 | 11 | -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.D2D1.Uwp/Properties/PublishProfiles/win-x64.pubxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | FileSystem 5 | x64 6 | win-x64 7 | bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ 8 | true 9 | true 10 | 11 | -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.D2D1.Uwp/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "ComputeSharp.SwapChain.D2D1.Uwp": { 4 | "commandName": "MsixPackage" 5 | } 6 | } 7 | } -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/LargeTile.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/LargeTile.scale-100.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/LargeTile.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/LargeTile.scale-125.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/LargeTile.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/LargeTile.scale-150.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/LargeTile.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/LargeTile.scale-200.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/LargeTile.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/LargeTile.scale-400.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/LockScreenLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/LockScreenLogo.scale-200.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/Misc/noise_low.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/Misc/noise_low.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/SmallTile.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/SmallTile.scale-100.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/SmallTile.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/SmallTile.scale-125.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/SmallTile.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/SmallTile.scale-150.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/SmallTile.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/SmallTile.scale-200.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/SmallTile.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/SmallTile.scale-400.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/SplashScreen.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/SplashScreen.scale-100.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/SplashScreen.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/SplashScreen.scale-125.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/SplashScreen.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/SplashScreen.scale-150.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/SplashScreen.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/SplashScreen.scale-400.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/Square150x150Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/Square150x150Logo.scale-100.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/Square150x150Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/Square150x150Logo.scale-125.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/Square150x150Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/Square150x150Logo.scale-150.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/Square150x150Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/Square150x150Logo.scale-400.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.altform-unplated_targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.altform-unplated_targetsize-16.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.altform-unplated_targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.altform-unplated_targetsize-256.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.altform-unplated_targetsize-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.altform-unplated_targetsize-32.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.altform-unplated_targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.altform-unplated_targetsize-48.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.scale-100.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.scale-125.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.scale-150.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.scale-400.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.targetsize-16.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.targetsize-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.targetsize-24.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.targetsize-24_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.targetsize-24_altform-unplated.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.targetsize-256.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.targetsize-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.targetsize-32.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/Square44x44Logo.targetsize-48.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/StoreLogo.backup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/StoreLogo.backup.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/StoreLogo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/StoreLogo.scale-100.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/StoreLogo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/StoreLogo.scale-125.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/StoreLogo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/StoreLogo.scale-150.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/StoreLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/StoreLogo.scale-200.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/StoreLogo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/StoreLogo.scale-400.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/Wide310x150Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/Wide310x150Logo.scale-100.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/Wide310x150Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/Wide310x150Logo.scale-125.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/Wide310x150Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/Wide310x150Logo.scale-150.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/Wide310x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/Wide310x150Logo.scale-200.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Assets/Wide310x150Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain.UI/Assets/Wide310x150Logo.scale-400.png -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Converters/RenderingPauseConverter.cs: -------------------------------------------------------------------------------- 1 | #if WINDOWS_UWP 2 | using Windows.UI.Xaml.Controls; 3 | #else 4 | using Microsoft.UI.Xaml.Controls; 5 | #endif 6 | 7 | namespace ComputeSharp.SwapChain.Core.Converters; 8 | 9 | /// 10 | /// A class with some static converters for rendering state. 11 | /// 12 | public static class RenderingPauseConverter 13 | { 14 | /// 15 | /// Gets a symbol for an input rendering state. 16 | /// 17 | /// Whether or not the rendering is currently paused. 18 | /// A symbol representing the next action for the rendering. 19 | public static Symbol ConvertPausedToSymbol(bool value) 20 | { 21 | return value ? Symbol.Play : Symbol.Pause; 22 | } 23 | } -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.UI/Enums/RenderingMode.cs: -------------------------------------------------------------------------------- 1 | namespace ComputeSharp.SwapChain.Core.Enums; 2 | 3 | /// 4 | /// Indicates the rendering mode being used. 5 | /// 6 | public enum RenderingMode 7 | { 8 | /// 9 | /// Render using DirectX 12 APIs. 10 | /// 11 | DirectX12, 12 | 13 | /// 14 | /// Render using Win2D (ie. Direct2D behind the scenes). 15 | /// 16 | Win2D 17 | } -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.Uwp/App.xaml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.Uwp/Controls/D2D1AnimatedPixelShaderPanel.xaml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 16 | 17 | -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.Uwp/Properties/PublishProfiles/win-arm64.pubxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | FileSystem 5 | ARM64 6 | win-arm64 7 | bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ 8 | true 9 | true 10 | 11 | -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.Uwp/Properties/PublishProfiles/win-x64.pubxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | FileSystem 5 | x64 6 | win-x64 7 | bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ 8 | true 9 | true 10 | 11 | -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.Uwp/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "ComputeSharp.SwapChain.Uwp": { 4 | "commandName": "MsixPackage" 5 | } 6 | } 7 | } -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.WinUI/Controls/D2D1AnimatedPixelShaderPanel.xaml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 16 | 17 | -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.WinUI/Properties/PublishProfiles/win-arm64.pubxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | FileSystem 5 | ARM64 6 | win-arm64 7 | bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ 8 | true 9 | true 10 | 11 | -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.WinUI/Properties/PublishProfiles/win-x64.pubxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | FileSystem 5 | x64 6 | win-x64 7 | bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ 8 | true 9 | true 10 | 11 | -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain.WinUI/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "ComputeSharp.SwapChain.WinUI": { 4 | "commandName": "MsixPackage" 5 | } 6 | } 7 | } -------------------------------------------------------------------------------- /samples/ComputeSharp.SwapChain/Textures/RustyMetal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/samples/ComputeSharp.SwapChain/Textures/RustyMetal.png -------------------------------------------------------------------------------- /samples/Directory.Build.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/ComputeSharp.CodeFixers/ComputeSharp.CodeFixers.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | netstandard2.0 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/ComputeSharp.CodeFixing/ComputeSharp.CodeFixing.projitems: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | true 6 | 29f6e256-ba0e-4f3b-854e-50839d67c6dd 7 | 8 | 9 | ComputeSharp.CodeFixing 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/ComputeSharp.Core.SourceGenerators/AnalyzerReleases.Shipped.md: -------------------------------------------------------------------------------- 1 | ; Shipped analyzer releases 2 | ; https://github.com/dotnet/roslyn-analyzers/blob/master/src/Microsoft.CodeAnalysis.Analyzers/ReleaseTrackingAnalyzers.Help.md 3 | 4 | ## Release 1.0 5 | 6 | ### New Rules 7 | 8 | Rule ID | Category | Severity | Notes 9 | --------|----------|----------|------- 10 | -------------------------------------------------------------------------------- /src/ComputeSharp.Core.SourceGenerators/AnalyzerReleases.Unshipped.md: -------------------------------------------------------------------------------- 1 | ; Unshipped analyzer release 2 | ; https://github.com/dotnet/roslyn-analyzers/blob/master/src/Microsoft.CodeAnalysis.Analyzers/ReleaseTrackingAnalyzers.Help.md 3 | -------------------------------------------------------------------------------- /src/ComputeSharp.Core.SourceGenerators/ComputeSharp.Core.SourceGenerators.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | netstandard2.0 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/ComputeSharp.Core/Primitives/Bool/Bool2.tt: -------------------------------------------------------------------------------- 1 | <#@include file="..\VectorType.ttinclude" #> 2 | <# 3 | GenerateVectorProperties("Bool2", sizeof(int)); 4 | #> -------------------------------------------------------------------------------- /src/ComputeSharp.Core/Primitives/Bool/Bool3.tt: -------------------------------------------------------------------------------- 1 | <#@include file="..\VectorType.ttinclude" #> 2 | <# 3 | GenerateVectorProperties("Bool3", sizeof(int)); 4 | #> -------------------------------------------------------------------------------- /src/ComputeSharp.Core/Primitives/Bool/Bool4.tt: -------------------------------------------------------------------------------- 1 | <#@include file="..\VectorType.ttinclude" #> 2 | <# 3 | GenerateVectorProperties("Bool4", sizeof(int)); 4 | #> -------------------------------------------------------------------------------- /src/ComputeSharp.Core/Primitives/Bool/BoolMxN.tt: -------------------------------------------------------------------------------- 1 | <#@include file="..\MatrixType.ttinclude" #> 2 | <# 3 | GenerateAllMatrixProperties("Bool", sizeof(int)); 4 | #> -------------------------------------------------------------------------------- /src/ComputeSharp.Core/Primitives/Double/Double2.tt: -------------------------------------------------------------------------------- 1 | <#@include file="..\VectorType.ttinclude" #> 2 | <# 3 | GenerateVectorProperties("Double2", sizeof(double)); 4 | #> -------------------------------------------------------------------------------- /src/ComputeSharp.Core/Primitives/Double/Double3.tt: -------------------------------------------------------------------------------- 1 | <#@include file="..\VectorType.ttinclude" #> 2 | <# 3 | GenerateVectorProperties("Double3", sizeof(double)); 4 | #> -------------------------------------------------------------------------------- /src/ComputeSharp.Core/Primitives/Double/Double4.tt: -------------------------------------------------------------------------------- 1 | <#@include file="..\VectorType.ttinclude" #> 2 | <# 3 | GenerateVectorProperties("Double4", sizeof(double)); 4 | #> -------------------------------------------------------------------------------- /src/ComputeSharp.Core/Primitives/Double/DoubleMxN.tt: -------------------------------------------------------------------------------- 1 | <#@include file="..\MatrixType.ttinclude" #> 2 | <# 3 | GenerateAllMatrixProperties("Double", sizeof(double)); 4 | #> -------------------------------------------------------------------------------- /src/ComputeSharp.Core/Primitives/Float/Float2.tt: -------------------------------------------------------------------------------- 1 | <#@include file="..\VectorType.ttinclude" #> 2 | <# 3 | GenerateVectorProperties("Float2", sizeof(float)); 4 | #> -------------------------------------------------------------------------------- /src/ComputeSharp.Core/Primitives/Float/Float3.tt: -------------------------------------------------------------------------------- 1 | <#@include file="..\VectorType.ttinclude" #> 2 | <# 3 | GenerateVectorProperties("Float3", sizeof(float)); 4 | #> -------------------------------------------------------------------------------- /src/ComputeSharp.Core/Primitives/Float/Float4.tt: -------------------------------------------------------------------------------- 1 | <#@include file="..\VectorType.ttinclude" #> 2 | <# 3 | GenerateVectorProperties("Float4", sizeof(float)); 4 | #> -------------------------------------------------------------------------------- /src/ComputeSharp.Core/Primitives/Float/FloatMxN.tt: -------------------------------------------------------------------------------- 1 | <#@include file="..\MatrixType.ttinclude" #> 2 | <# 3 | GenerateAllMatrixProperties("Float", sizeof(float)); 4 | #> -------------------------------------------------------------------------------- /src/ComputeSharp.Core/Primitives/Int/Int2.tt: -------------------------------------------------------------------------------- 1 | <#@include file="..\VectorType.ttinclude" #> 2 | <# 3 | GenerateVectorProperties("Int2", sizeof(int)); 4 | #> -------------------------------------------------------------------------------- /src/ComputeSharp.Core/Primitives/Int/Int3.tt: -------------------------------------------------------------------------------- 1 | <#@include file="..\VectorType.ttinclude" #> 2 | <# 3 | GenerateVectorProperties("Int3", sizeof(int)); 4 | #> -------------------------------------------------------------------------------- /src/ComputeSharp.Core/Primitives/Int/Int4.tt: -------------------------------------------------------------------------------- 1 | <#@include file="..\VectorType.ttinclude" #> 2 | <# 3 | GenerateVectorProperties("Int4", sizeof(int)); 4 | #> -------------------------------------------------------------------------------- /src/ComputeSharp.Core/Primitives/Int/IntMxN.tt: -------------------------------------------------------------------------------- 1 | <#@include file="..\MatrixType.ttinclude" #> 2 | <# 3 | GenerateAllMatrixProperties("Int", sizeof(int)); 4 | #> -------------------------------------------------------------------------------- /src/ComputeSharp.Core/Primitives/Internals/UndefinedData.cs: -------------------------------------------------------------------------------- 1 | #if !SOURCE_GENERATOR 2 | using System.Runtime.CompilerServices; 3 | #endif 4 | 5 | namespace ComputeSharp; 6 | 7 | /// 8 | /// A helper class with shared undefined data for all HLSL primitive types. 9 | /// This reduces allocations and minimizes reflection metadata kept per type. 10 | /// 11 | internal static class UndefinedData 12 | { 13 | /// 14 | /// The shared memory with undefined data (has size of , as it's the maximum needed at once). 15 | /// 16 | public static readonly unsafe void* Memory = 17 | #if SOURCE_GENERATOR 18 | null; 19 | #else 20 | (void*)RuntimeHelpers.AllocateTypeAssociatedMemory(typeof(UndefinedData), sizeof(Double4)); 21 | #endif 22 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Core/Primitives/UInt/UInt2.tt: -------------------------------------------------------------------------------- 1 | <#@include file="..\VectorType.ttinclude" #> 2 | <# 3 | GenerateVectorProperties("UInt2", sizeof(uint)); 4 | #> -------------------------------------------------------------------------------- /src/ComputeSharp.Core/Primitives/UInt/UInt3.tt: -------------------------------------------------------------------------------- 1 | <#@include file="..\VectorType.ttinclude" #> 2 | <# 3 | GenerateVectorProperties("UInt3", sizeof(uint)); 4 | #> -------------------------------------------------------------------------------- /src/ComputeSharp.Core/Primitives/UInt/UInt4.tt: -------------------------------------------------------------------------------- 1 | <#@include file="..\VectorType.ttinclude" #> 2 | <# 3 | GenerateVectorProperties("UInt4", sizeof(uint)); 4 | #> -------------------------------------------------------------------------------- /src/ComputeSharp.Core/Primitives/UInt/UIntMxN.tt: -------------------------------------------------------------------------------- 1 | <#@include file="..\MatrixType.ttinclude" #> 2 | <# 3 | GenerateAllMatrixProperties("UInt", sizeof(uint)); 4 | #> -------------------------------------------------------------------------------- /src/ComputeSharp.Core/README.md: -------------------------------------------------------------------------------- 1 | ![ComputeSharp cover image](https://user-images.githubusercontent.com/10199417/108635546-3512ea00-7480-11eb-8172-99bc59f4eb6f.png) 2 | 3 | # Overview 📖 4 | 5 | **ComputeSharp.Core** package containing basic primitives to support all dependent **ComputeSharp** packages, as well as some shared internal infrastructure. This package is a transitive dependency of all other **ComputeSharp** packages, and is not supposed to be referenced directly by developers. Refer to the documentation of the other packages to learn more about all the functionality that is available when using them. 6 | 7 | # There's more! 8 | 9 | For a complete list of all features available in **ComputeSharp**, check the documentation in the [GitHub repo](https://github.com/Sergio0694/ComputeSharp). -------------------------------------------------------------------------------- /src/ComputeSharp.D2D1.CodeFixers/ComputeSharp.D2D1.CodeFixers.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | netstandard2.0 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/ComputeSharp.D2D1.SourceGenerators/AnalyzerReleases.Unshipped.md: -------------------------------------------------------------------------------- 1 | ; Unshipped analyzer release 2 | ; https://github.com/dotnet/roslyn-analyzers/blob/master/src/Microsoft.CodeAnalysis.Analyzers/ReleaseTrackingAnalyzers.Help.md 3 | -------------------------------------------------------------------------------- /src/ComputeSharp.D2D1.SourceGenerators/Mappings/HlslKnownKeywords.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Reflection; 3 | using ComputeSharp.Core.Intrinsics; 4 | using ComputeSharp.D2D1; 5 | 6 | namespace ComputeSharp.SourceGeneration.Mappings; 7 | 8 | /// 9 | partial class HlslKnownKeywords 10 | { 11 | /// 12 | static partial void AddKnownKeywords(ICollection knownKeywords) 13 | { 14 | // D2D1 intrinsics method names 15 | foreach (MethodInfo? method in typeof(D2D).GetMethods(BindingFlags.Public | BindingFlags.Static)) 16 | { 17 | string name = method.GetCustomAttribute()?.Name ?? method.Name; 18 | 19 | knownKeywords.Add(name); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /src/ComputeSharp.D2D1.SourceGenerators/Models/HlslBytecodeInfoKey.cs: -------------------------------------------------------------------------------- 1 | namespace ComputeSharp.D2D1.SourceGenerators.Models; 2 | 3 | /// 4 | /// A model with info to be a unique key for instances. 5 | /// 6 | /// The input HLSL source code. 7 | /// The shader profile. 8 | /// The compile options. 9 | /// Whether compilation should be attempted for the current info. 10 | internal sealed record HlslBytecodeInfoKey( 11 | string HlslSource, 12 | D2D1ShaderProfile ShaderProfile, 13 | D2D1CompileOptions CompileOptions, 14 | bool IsCompilationEnabled); -------------------------------------------------------------------------------- /src/ComputeSharp.D2D1.SourceGenerators/Models/InputDescription.cs: -------------------------------------------------------------------------------- 1 | namespace ComputeSharp.D2D1.SourceGenerators.Models; 2 | 3 | /// 4 | /// A model representing an input description for a shader. 5 | /// 6 | /// The index of the input resource the description is for. 7 | /// The input filter to use. 8 | /// The level of detail to use. 9 | internal sealed record InputDescription(int Index, D2D1Filter Filter, int LevelOfDetailCount); -------------------------------------------------------------------------------- /src/ComputeSharp.D2D1.SourceGenerators/Models/ResourceTextureDescription.cs: -------------------------------------------------------------------------------- 1 | namespace ComputeSharp.D2D1.SourceGenerators.Models; 2 | 3 | /// 4 | /// A model representing a resource texture description for a shader. 5 | /// 6 | /// The index of the resource texture resource the description is for. 7 | /// The rank of the resource texture. 8 | internal sealed record ResourceTextureDescription(int Index, int Rank); -------------------------------------------------------------------------------- /src/ComputeSharp.D2D1.SourceGenerators/SyntaxProcessors/ConstantBufferSyntaxProcessor.ArtificialFields.cs: -------------------------------------------------------------------------------- 1 | namespace ComputeSharp.SourceGeneration.SyntaxProcessors; 2 | 3 | /// 4 | partial class ConstantBufferSyntaxProcessor 5 | { 6 | /// 7 | private static partial bool HasArtificialFields() 8 | { 9 | return false; 10 | } 11 | } -------------------------------------------------------------------------------- /src/ComputeSharp.D2D1.UI/Buffers/GraphicsEffectSourceBuffer.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | using Windows.Graphics.Effects; 3 | 4 | #pragma warning disable IDE0051 5 | 6 | #if WINDOWS_UWP 7 | namespace ComputeSharp.D2D1.Uwp.Buffers; 8 | #else 9 | namespace ComputeSharp.D2D1.WinUI.Buffers; 10 | #endif 11 | 12 | /// 13 | /// A fixed buffer type containing 16 fields. 14 | /// 15 | [InlineArray(16)] 16 | internal struct GraphicsEffectSourceBuffer 17 | { 18 | /// 19 | /// The instance at index 0. 20 | /// 21 | private SourceReference source0; 22 | } -------------------------------------------------------------------------------- /src/ComputeSharp.D2D1.UI/Buffers/ResourceTextureManagerBuffer.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | using ComputeSharp.D2D1.Interop; 3 | 4 | #pragma warning disable IDE0044, IDE0051 5 | 6 | #if WINDOWS_UWP 7 | namespace ComputeSharp.D2D1.Uwp.Buffers; 8 | #else 9 | namespace ComputeSharp.D2D1.WinUI.Buffers; 10 | #endif 11 | 12 | /// 13 | /// A fixed buffer type containing 16 fields. 14 | /// 15 | [InlineArray(16)] 16 | internal struct ResourceTextureManagerBuffer 17 | { 18 | /// 19 | /// The instance at index 0. 20 | /// 21 | private D2D1ResourceTextureManager? resourceTextureManager0; 22 | } -------------------------------------------------------------------------------- /src/ComputeSharp.D2D1.UI/CanvasEffectNode{T}.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Graphics.Canvas; 2 | 3 | #if WINDOWS_UWP 4 | namespace ComputeSharp.D2D1.Uwp; 5 | #else 6 | namespace ComputeSharp.D2D1.WinUI; 7 | #endif 8 | 9 | /// 10 | /// A marker type for an effect node that can be registered and retrieved from an value. 11 | /// 12 | /// The type of associated with the current effect node. 13 | public sealed class CanvasEffectNode : ICanvasEffectNode 14 | where T : class, ICanvasImage; -------------------------------------------------------------------------------- /src/ComputeSharp.D2D1.UI/Collections/IFixedCountList{T}.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Collections.Immutable; 3 | 4 | #if WINDOWS_UWP 5 | namespace ComputeSharp.D2D1.Uwp.Collections; 6 | #else 7 | namespace ComputeSharp.D2D1.WinUI.Collections; 8 | #endif 9 | 10 | /// 11 | /// An interface for a list with a fixed collection. 12 | /// 13 | /// The type of elements in the list. 14 | internal interface IFixedCountList 15 | { 16 | /// 17 | /// Gets the collection of valid indices for the current effect. 18 | /// 19 | ImmutableArray Indices { get; } 20 | 21 | /// 22 | T this[int index] { get; set; } 23 | } -------------------------------------------------------------------------------- /src/ComputeSharp.D2D1.Uwp.CodeFixers/ComputeSharp.D2D1.Uwp.CodeFixers.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | netstandard2.0 4 | $(DefineConstants);WINDOWS_UWP;D2D1_UI_SOURCE_GENERATOR 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/ComputeSharp.D2D1.Uwp.SourceGenerators/AnalyzerReleases.Unshipped.md: -------------------------------------------------------------------------------- 1 | ; Unshipped analyzer release 2 | ; https://github.com/dotnet/roslyn-analyzers/blob/master/src/Microsoft.CodeAnalysis.Analyzers/ReleaseTrackingAnalyzers.Help.md 3 | -------------------------------------------------------------------------------- /src/ComputeSharp.D2D1.Uwp/README.md: -------------------------------------------------------------------------------- 1 | ![ComputeSharp cover image](https://user-images.githubusercontent.com/10199417/108635546-3512ea00-7480-11eb-8172-99bc59f4eb6f.png) 2 | 3 | # Overview 📖 4 | 5 | **ComputeSharp.D2D1.Uwp** is a UWP library with APIs to leverage D2D1 functionality with D2D1 pixel shaders powered by **ComputeSharp.D2D1**. You can refer to the [Win2D docs on custom effects](https://learn.microsoft.com/en-us/windows/apps/develop/win2d/custom-effects) to learn more about how to implement custom effects using the APIs provided by this package. 6 | 7 | # There's more! 8 | 9 | For a complete list of all features available in **ComputeSharp**, check the documentation in the [GitHub repo](https://github.com/Sergio0694/ComputeSharp). 10 | -------------------------------------------------------------------------------- /src/ComputeSharp.D2D1.WinUI.CodeFixers/ComputeSharp.D2D1.WinUI.CodeFixers.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | netstandard2.0 4 | $(DefineConstants);D2D1_UI_SOURCE_GENERATOR 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/ComputeSharp.D2D1.WinUI.SourceGenerators/AnalyzerReleases.Unshipped.md: -------------------------------------------------------------------------------- 1 | ; Unshipped analyzer release 2 | ; https://github.com/dotnet/roslyn-analyzers/blob/master/src/Microsoft.CodeAnalysis.Analyzers/ReleaseTrackingAnalyzers.Help.md 3 | -------------------------------------------------------------------------------- /src/ComputeSharp.D2D1.WinUI/README.md: -------------------------------------------------------------------------------- 1 | ![ComputeSharp cover image](https://user-images.githubusercontent.com/10199417/108635546-3512ea00-7480-11eb-8172-99bc59f4eb6f.png) 2 | 3 | # Overview 📖 4 | 5 | **ComputeSharp.D2D1.WinUI** is a WinUI 3 library with APIs to leverage D2D1 functionality with D2D1 pixel shaders powered by **ComputeSharp.D2D1**. You can refer to the [Win2D docs on custom effects](https://learn.microsoft.com/en-us/windows/apps/develop/win2d/custom-effects) to learn more about how to implement custom effects using the APIs provided by this package. 6 | 7 | # There's more! 8 | 9 | For a complete list of all features available in **ComputeSharp**, check the documentation in the [GitHub repo](https://github.com/Sergio0694/ComputeSharp). -------------------------------------------------------------------------------- /src/ComputeSharp.D2D1/Attributes/D2DEffectAuthorAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ComputeSharp.D2D1; 4 | 5 | /// 6 | /// An attribute for a D2D1 shader indicating the author of the shader effect to create. 7 | /// 8 | /// 9 | /// This only applies to effects created from . 10 | /// 11 | /// The value for the author. 12 | [AttributeUsage(AttributeTargets.Struct | AttributeTargets.Assembly, AllowMultiple = false)] 13 | public sealed class D2DEffectAuthorAttribute(string value) : Attribute 14 | { 15 | /// 16 | /// Gets the author value. 17 | /// 18 | public string Value { get; } = value; 19 | } -------------------------------------------------------------------------------- /src/ComputeSharp.D2D1/Attributes/D2DEffectCategoryAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ComputeSharp.D2D1; 4 | 5 | /// 6 | /// An attribute for a D2D1 shader indicating the category of the shader effect to create. 7 | /// 8 | /// 9 | /// This only applies to effects created from . 10 | /// 11 | /// The value for the category. 12 | [AttributeUsage(AttributeTargets.Struct | AttributeTargets.Assembly, AllowMultiple = false)] 13 | public sealed class D2DEffectCategoryAttribute(string value) : Attribute 14 | { 15 | /// 16 | /// Gets the category value. 17 | /// 18 | public string Value { get; } = value; 19 | } -------------------------------------------------------------------------------- /src/ComputeSharp.D2D1/Attributes/D2DEffectDescriptionAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ComputeSharp.D2D1; 4 | 5 | /// 6 | /// An attribute for a D2D1 shader indicating the description of the shader effect to create. 7 | /// 8 | /// 9 | /// This only applies to effects created from . 10 | /// 11 | /// The value for the description. 12 | [AttributeUsage(AttributeTargets.Struct, AllowMultiple = false)] 13 | public sealed class D2DEffectDescriptionAttribute(string value) : Attribute 14 | { 15 | /// 16 | /// Gets the description value. 17 | /// 18 | public string Value { get; } = value; 19 | } -------------------------------------------------------------------------------- /src/ComputeSharp.D2D1/Attributes/D2DEffectDisplayNameAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ComputeSharp.D2D1; 4 | 5 | /// 6 | /// An attribute for a D2D1 shader indicating the display name of the shader effect to create. 7 | /// 8 | /// 9 | /// This only applies to effects created from . 10 | /// 11 | /// The value for the display name. 12 | [AttributeUsage(AttributeTargets.Struct, AllowMultiple = false)] 13 | public sealed class D2DEffectDisplayNameAttribute(string value) : Attribute 14 | { 15 | /// 16 | /// Gets the display name value. 17 | /// 18 | public string Value { get; } = value; 19 | } -------------------------------------------------------------------------------- /src/ComputeSharp.D2D1/Attributes/D2DEffectIdAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ComputeSharp.D2D1; 4 | 5 | /// 6 | /// An attribute for a D2D1 shader indicating the id of the shader effect to create. 7 | /// 8 | /// 9 | /// This only applies to effects created from . 10 | /// 11 | /// The value for the effect id. 12 | [AttributeUsage(AttributeTargets.Struct, AllowMultiple = false)] 13 | public sealed class D2DEffectIdAttribute(string value) : Attribute 14 | { 15 | /// 16 | /// Gets the effect id value. 17 | /// 18 | public Guid Value { get; } = Guid.Parse(value); 19 | } -------------------------------------------------------------------------------- /src/ComputeSharp.D2D1/Interfaces/Descriptors/ID2D1ConstantBufferLoader.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ComputeSharp.D2D1.Descriptors; 4 | 5 | /// 6 | /// A type representing a data loader for the constant buffer of a D2D1 shader. 7 | /// 8 | public interface ID2D1ConstantBufferLoader 9 | { 10 | /// 11 | /// Loads the constant buffer of a D2D1 shader. 12 | /// 13 | /// The constant buffer for the D2D1 shader. 14 | void LoadConstantBuffer(ReadOnlySpan data); 15 | } -------------------------------------------------------------------------------- /src/ComputeSharp.D2D1/Interfaces/ID2D1PixelShader.cs: -------------------------------------------------------------------------------- 1 | namespace ComputeSharp.D2D1; 2 | 3 | /// 4 | /// An representing a D2D1 pixel shader. 5 | /// 6 | public interface ID2D1PixelShader 7 | { 8 | /// 9 | /// Executes the current pixel shader. 10 | /// 11 | /// The pixel value for the current invocation. 12 | Float4 Execute(); 13 | } -------------------------------------------------------------------------------- /src/ComputeSharp.D3D12MemoryAllocator/ComputeSharp.D3D12MemoryAllocator.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | net8.0 4 | 6.2 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/ComputeSharp.Pix/README.md: -------------------------------------------------------------------------------- 1 | ![ComputeSharp cover image](https://user-images.githubusercontent.com/10199417/108635546-3512ea00-7480-11eb-8172-99bc59f4eb6f.png) 2 | 3 | # Overview 📖 4 | 5 | **ComputeSharp.Pix** is an extension library for **ComputeSharp** to enable [PIX](https://devblogs.microsoft.com/pix/introduction/]) support to produce debugging information. 6 | 7 | # There's more! 8 | 9 | For a complete list of all features available in **ComputeSharp**, check the documentation in the [GitHub repo](https://github.com/Sergio0694/ComputeSharp). -------------------------------------------------------------------------------- /src/ComputeSharp.SourceGeneration.Hlsl/Diagnostics/DiagnosticDescriptors.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.CodeAnalysis; 2 | 3 | namespace ComputeSharp.SourceGeneration.Diagnostics; 4 | 5 | /// 6 | /// A container for all instances for errors reported by analyzers in this project. 7 | /// 8 | internal static partial class DiagnosticDescriptors; -------------------------------------------------------------------------------- /src/ComputeSharp.SourceGeneration.Hlsl/Models/Interfaces/IConstantBufferInfo.cs: -------------------------------------------------------------------------------- 1 | using ComputeSharp.SourceGeneration.Helpers; 2 | 3 | namespace ComputeSharp.SourceGeneration.Models; 4 | 5 | /// 6 | /// An interface for a model providing info on constant buffer fields. 7 | /// 8 | internal interface IConstantBufferInfo 9 | { 10 | /// 11 | /// The hierarchy info for the shader type. 12 | /// 13 | HierarchyInfo Hierarchy { get; } 14 | 15 | /// 16 | /// The size of the shader constant buffer. 17 | /// 18 | int ConstantBufferSizeInBytes { get; } 19 | 20 | /// 21 | /// The description on shader instance fields. 22 | /// 23 | EquatableArray Fields { get; } 24 | } -------------------------------------------------------------------------------- /src/ComputeSharp.SourceGenerators/AnalyzerReleases.Unshipped.md: -------------------------------------------------------------------------------- 1 | ; Unshipped analyzer release 2 | ; https://github.com/dotnet/roslyn-analyzers/blob/master/src/Microsoft.CodeAnalysis.Analyzers/ReleaseTrackingAnalyzers.Help.md 3 | -------------------------------------------------------------------------------- /src/ComputeSharp.SourceGenerators/Dxc/Windows.Win32/HRESULT.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System.Runtime.CompilerServices; 3 | 4 | namespace Windows.Win32.Foundation; 5 | 6 | /// 7 | partial struct HRESULT 8 | { 9 | /// 10 | /// Throws a if the current value represents an error. 11 | /// 12 | /// Thrown if the current value represents an error. 13 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 14 | public readonly void Assert() 15 | { 16 | if (Failed) 17 | { 18 | throw new Win32Exception(this.Value); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /src/ComputeSharp.SourceGenerators/Mappings/HlslKnownKeywords.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ComputeSharp.SourceGeneration.Mappings; 4 | 5 | /// 6 | internal static partial class HlslKnownKeywords 7 | { 8 | /// 9 | static partial void AddKnownKeywords(ICollection knownKeywords) 10 | { 11 | // Dispatch type names 12 | knownKeywords.Add(nameof(ThreadIds)); 13 | knownKeywords.Add(nameof(GroupIds)); 14 | knownKeywords.Add(nameof(GroupSize)); 15 | knownKeywords.Add(nameof(GridIds)); 16 | } 17 | } -------------------------------------------------------------------------------- /src/ComputeSharp.SourceGenerators/Models/HlslBytecodeInfoKey.cs: -------------------------------------------------------------------------------- 1 | using ComputeSharp.SourceGeneration.Models; 2 | 3 | namespace ComputeSharp.SourceGenerators.Models; 4 | 5 | /// 6 | /// A model with info to be a unique key for instances. 7 | /// 8 | /// The input HLSL source code. 9 | /// The compile options. 10 | /// Whether compilation should be attempted for the current info. 11 | internal sealed record HlslBytecodeInfoKey( 12 | string HlslSource, 13 | CompileOptions CompileOptions, 14 | bool IsCompilationEnabled); -------------------------------------------------------------------------------- /src/ComputeSharp.SourceGenerators/Models/ResourceDescriptor.cs: -------------------------------------------------------------------------------- 1 | namespace ComputeSharp.SourceGenerators.Models; 2 | 3 | /// 4 | /// A resource descriptor for a captured resource in a shader. 5 | /// 6 | /// The type id for the resource. 7 | /// The register offset for the resource descriptor. 8 | internal sealed record ResourceDescriptor(int TypeId, int Register); -------------------------------------------------------------------------------- /src/ComputeSharp.SourceGenerators/Models/ResourceInfo.cs: -------------------------------------------------------------------------------- 1 | namespace ComputeSharp.SourceGenerators.Models; 2 | 3 | /// 4 | /// A model describing a captured resource (either a buffer or a texture). 5 | /// 6 | /// The name of the resource field. 7 | /// The fully qualified type name of the field. 8 | /// The unspeakable name of the field, if present. 9 | public sealed record ResourceInfo(string FieldName, string FieldType, string? UnspeakableName); -------------------------------------------------------------------------------- /src/ComputeSharp.SourceGenerators/NativeMethods.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://aka.ms/CsWin32.schema.json", 3 | "allowMarshaling": false, 4 | "useSafeHandles": false, 5 | "comInterop": { 6 | "preserveSigMethods": [ 7 | "*" 8 | ] 9 | }, 10 | "friendlyOverloads": { 11 | "enabled": false 12 | } 13 | } -------------------------------------------------------------------------------- /src/ComputeSharp.SourceGenerators/NativeMethods.txt: -------------------------------------------------------------------------------- 1 | CLSID_DxcCompiler 2 | CLSID_DxcLibrary 3 | DxcCreateInstance 4 | D3D_SHADER_REQUIRES_DOUBLES 5 | D3D_SHADER_REQUIRES_11_1_DOUBLE_EXTENSIONS 6 | ID3D12ShaderReflection 7 | IDxcCompiler3 8 | IDxcUtils 9 | IDxcResult 10 | IUnknown -------------------------------------------------------------------------------- /src/ComputeSharp.Uwp/README.md: -------------------------------------------------------------------------------- 1 | ![ComputeSharp cover image](https://user-images.githubusercontent.com/10199417/108635546-3512ea00-7480-11eb-8172-99bc59f4eb6f.png) 2 | 3 | # Overview 📖 4 | 5 | **ComputeSharp.Uwp** is a UWP library with controls to render DX12 shaders powered by **ComputeSharp**. 6 | 7 | # There's more! 8 | 9 | For a complete list of all features available in **ComputeSharp**, check the documentation in the [GitHub repo](https://github.com/Sergio0694/ComputeSharp). 10 | -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D2D1/DirectX/um/d2d1/D2D1_EXTEND_MODE.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d2d1.h in the Windows SDK for Windows 10.0.22000.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum D2D1_EXTEND_MODE : uint 9 | { 10 | D2D1_EXTEND_MODE_CLAMP = 0, 11 | D2D1_EXTEND_MODE_WRAP = 1, 12 | D2D1_EXTEND_MODE_MIRROR = 2, 13 | D2D1_EXTEND_MODE_FORCE_DWORD = 0xffffffff, 14 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D2D1/DirectX/um/d2d1/ID2D1Factory.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d2d1.h in the Windows SDK for Windows 10.0.22000.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | [NativeTypeName("struct ID2D1Factory : IUnknown")] 9 | [NativeInheritance("IUnknown")] 10 | internal unsafe partial struct ID2D1Factory 11 | { 12 | public void** lpVtbl; 13 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D2D1/DirectX/um/d2d1_1/D2D1_BUFFER_PRECISION.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d2d1_1.h in the Windows SDK for Windows 10.0.22000.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum D2D1_BUFFER_PRECISION : uint 9 | { 10 | D2D1_BUFFER_PRECISION_UNKNOWN = 0, 11 | D2D1_BUFFER_PRECISION_8BPC_UNORM = 1, 12 | D2D1_BUFFER_PRECISION_8BPC_UNORM_SRGB = 2, 13 | D2D1_BUFFER_PRECISION_16BPC_UNORM = 3, 14 | D2D1_BUFFER_PRECISION_16BPC_FLOAT = 4, 15 | D2D1_BUFFER_PRECISION_32BPC_FLOAT = 5, 16 | D2D1_BUFFER_PRECISION_FORCE_DWORD = 0xffffffff 17 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D2D1/DirectX/um/d2d1_1/D2D1_CHANNEL_DEPTH.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d2d1_1.h in the Windows SDK for Windows 10.0.22000.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum D2D1_CHANNEL_DEPTH : uint 9 | { 10 | D2D1_CHANNEL_DEPTH_DEFAULT = 0, 11 | D2D1_CHANNEL_DEPTH_1 = 1, 12 | D2D1_CHANNEL_DEPTH_4 = 4, 13 | D2D1_CHANNEL_DEPTH_FORCE_DWORD = 0xffffffff 14 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D2D1/DirectX/um/d2d1_1/D2D1_PROPERTY_TYPE.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d2d1_1.h in the Windows SDK for Windows 10.0.22000.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum D2D1_PROPERTY_TYPE : uint 9 | { 10 | D2D1_PROPERTY_TYPE_UNKNOWN = 0, 11 | D2D1_PROPERTY_TYPE_BOOL = 2, 12 | D2D1_PROPERTY_TYPE_BLOB = 9, 13 | D2D1_PROPERTY_TYPE_IUNKNOWN = 10 14 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D2D1/DirectX/um/d2d1effectauthor/D2D1_CHANGE_TYPE.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d2d1effectauthor.h in the Windows SDK for Windows 10.0.22000.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | using System; 7 | 8 | namespace ComputeSharp.Win32; 9 | 10 | [Flags] 11 | internal enum D2D1_CHANGE_TYPE : uint 12 | { 13 | D2D1_CHANGE_TYPE_NONE = 0, 14 | D2D1_CHANGE_TYPE_PROPERTIES = 1, 15 | D2D1_CHANGE_TYPE_CONTEXT = 2, 16 | D2D1_CHANGE_TYPE_GRAPH = 3, 17 | D2D1_CHANGE_TYPE_FORCE_DWORD = 0xffffffff, 18 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D2D1/DirectX/um/d2d1effectauthor/D2D1_FEATURE.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d2d1effectauthor.h in the Windows SDK for Windows 10.0.22000.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum D2D1_FEATURE : uint 9 | { 10 | D2D1_FEATURE_DOUBLES = 0, 11 | D2D1_FEATURE_D3D10_X_HARDWARE_OPTIONS = 1, 12 | D2D1_FEATURE_FORCE_DWORD = 0xffffffff 13 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D2D1/DirectX/um/d2d1effectauthor/D2D1_FEATURE_DATA_DOUBLES.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d2d1effectauthor.h in the Windows SDK for Windows 10.0.22000.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D2D1_FEATURE_DATA_DOUBLES 9 | { 10 | public int doublePrecisionFloatShaderOps; 11 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D2D1/DirectX/um/d2d1effectauthor/D2D1_INPUT_DESCRIPTION.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d2d1effectauthor.h in the Windows SDK for Windows 10.0.22000.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D2D1_INPUT_DESCRIPTION 9 | { 10 | public D2D1_FILTER filter; 11 | 12 | [NativeTypeName("UINT32")] 13 | public uint levelOfDetailCount; 14 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D2D1/DirectX/um/d2d1effectauthor/D2D1_PIXEL_OPTIONS.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d2d1effectauthor.h in the Windows SDK for Windows 10.0.22000.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | using System; 7 | 8 | namespace ComputeSharp.Win32; 9 | 10 | [Flags] 11 | internal enum D2D1_PIXEL_OPTIONS : uint 12 | { 13 | D2D1_PIXEL_OPTIONS_NONE = 0, 14 | D2D1_PIXEL_OPTIONS_TRIVIAL_SAMPLING = 1, 15 | D2D1_PIXEL_OPTIONS_FORCE_DWORD = 0xffffffff, 16 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D2D1/DirectX/um/d2d1effects/D2D1_BORDER_MODE.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d2d1effects.h in the Windows SDK for Windows 10.0.22621.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum D2D1_BORDER_MODE : uint 9 | { 10 | D2D1_BORDER_MODE_SOFT = 0, 11 | D2D1_BORDER_MODE_HARD = 1, 12 | D2D1_BORDER_MODE_FORCE_DWORD = 0xffffffff, 13 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D2D1/DirectX/um/d2d1effects/D2D1_DPICOMPENSATION_PROP.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d2d1effects.h in the Windows SDK for Windows 10.0.22621.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum D2D1_DPICOMPENSATION_PROP : uint 9 | { 10 | D2D1_DPICOMPENSATION_PROP_INTERPOLATION_MODE = 0, 11 | D2D1_DPICOMPENSATION_PROP_BORDER_MODE = 1, 12 | D2D1_DPICOMPENSATION_PROP_INPUT_DPI = 2, 13 | D2D1_DPICOMPENSATION_PROP_FORCE_DWORD = 0xffffffff, 14 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D2D1/DirectX/um/d3dcommon/D3D_INCLUDE_TYPE.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from d3dcommon.h in Microsoft.Direct3D.D3D12 v1.600.10 4 | // Original source is Copyright © Microsoft. Licensed under the MIT license 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum D3D_INCLUDE_TYPE 9 | { 10 | D3D_INCLUDE_LOCAL = 0, 11 | D3D_INCLUDE_SYSTEM = (D3D_INCLUDE_LOCAL + 1), 12 | D3D10_INCLUDE_LOCAL = D3D_INCLUDE_LOCAL, 13 | D3D10_INCLUDE_SYSTEM = D3D_INCLUDE_SYSTEM, 14 | D3D_INCLUDE_FORCE_DWORD = 0x7fffffff, 15 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D2D1/DirectX/um/d3dcommon/D3D_SHADER_MACRO.cs: -------------------------------------------------------------------------------- 1 | // Copyright � Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from d3dcommon.h in Microsoft.Direct3D.D3D12 v1.600.10 4 | // Original source is Copyright � Microsoft. Licensed under the MIT license 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal unsafe partial struct D3D_SHADER_MACRO 9 | { 10 | [NativeTypeName("LPCSTR")] 11 | public sbyte* Name; 12 | 13 | [NativeTypeName("LPCSTR")] 14 | public sbyte* Definition; 15 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D2D1/DirectX/um/d3dcompiler/D3DCOMPILER_STRIP_FLAGS.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3dcompiler.h in the Windows SDK for Windows 10.0.22621.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | using System; 7 | 8 | namespace ComputeSharp.Win32; 9 | 10 | [Flags] 11 | internal enum D3DCOMPILER_STRIP_FLAGS 12 | { 13 | D3DCOMPILER_STRIP_REFLECTION_DATA = 0x00000001, 14 | D3DCOMPILER_STRIP_DEBUG_INFO = 0x00000002, 15 | D3DCOMPILER_STRIP_TEST_BLOBS = 0x00000004, 16 | D3DCOMPILER_STRIP_PRIVATE_DATA = 0x00000008, 17 | D3DCOMPILER_STRIP_ROOT_SIGNATURE = 0x00000010, 18 | D3DCOMPILER_STRIP_FORCE_DWORD = 0x7fffffff, 19 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D2D1/DirectX/um/dcommon/D2D_VECTOR_2F.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/dcommon.h in the Windows SDK for Windows 10.0.22621.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D2D_VECTOR_2F 9 | { 10 | public float x; 11 | public float y; 12 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D2D1/Windows/other/helper-types/HSTRING.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | namespace ComputeSharp.Win32; 4 | 5 | internal readonly unsafe partial struct HSTRING 6 | { 7 | public readonly void* Value; 8 | 9 | public HSTRING(void* value) 10 | { 11 | Value = value; 12 | } 13 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D2D1/Windows/shared/windef/RECT.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from shared/windef.h in the Windows SDK for Windows 10.0.22000.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal struct RECT 9 | { 10 | [NativeTypeName("LONG")] 11 | public int left; 12 | 13 | [NativeTypeName("LONG")] 14 | public int top; 15 | 16 | [NativeTypeName("LONG")] 17 | public int right; 18 | 19 | [NativeTypeName("LONG")] 20 | public int bottom; 21 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D2D1/Windows/shared/winerror/RO.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from shared/winerror.h in the Windows SDK for Windows 10.0.22621.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal static partial class RO 9 | { 10 | [NativeTypeName("#define RO_E_CLOSED _HRESULT_TYPEDEF_(0x80000013L)")] 11 | public const int RO_E_CLOSED = unchecked((int)(0x80000013)); 12 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/other/d3dx12/D3D12_RESOURCE_ALLOCATION_INFO.Manual.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from d3dx12.h in DirectX-Graphics-Samples commit a7a87f1853b5540f10920518021d91ae641033fb 4 | // Original source is Copyright © Microsoft. All rights reserved. Licensed under the MIT License (MIT). 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_RESOURCE_ALLOCATION_INFO 9 | { 10 | public D3D12_RESOURCE_ALLOCATION_INFO([NativeTypeName("UINT64")] ulong size, [NativeTypeName("UINT64")] ulong alignment) 11 | { 12 | SizeInBytes = size; 13 | Alignment = alignment; 14 | } 15 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/shared/dxgi/DXGI_ADAPTER_FLAG.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from shared/dxgi.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | using System; 7 | 8 | namespace ComputeSharp.Win32; 9 | 10 | [Flags] 11 | internal enum DXGI_ADAPTER_FLAG : uint 12 | { 13 | DXGI_ADAPTER_FLAG_NONE = 0, 14 | DXGI_ADAPTER_FLAG_REMOTE = 1, 15 | DXGI_ADAPTER_FLAG_SOFTWARE = 2, 16 | DXGI_ADAPTER_FLAG_FORCE_DWORD = 0xffffffff, 17 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/shared/dxgi/DXGI_SWAP_EFFECT.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from shared/dxgi.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum DXGI_SWAP_EFFECT 9 | { 10 | DXGI_SWAP_EFFECT_DISCARD = 0, 11 | DXGI_SWAP_EFFECT_SEQUENTIAL = 1, 12 | DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL = 3, 13 | DXGI_SWAP_EFFECT_FLIP_DISCARD = 4, 14 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/shared/dxgi1_2/DXGI_ALPHA_MODE.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from shared/dxgi1_2.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum DXGI_ALPHA_MODE : uint 9 | { 10 | DXGI_ALPHA_MODE_UNSPECIFIED = 0, 11 | DXGI_ALPHA_MODE_PREMULTIPLIED = 1, 12 | DXGI_ALPHA_MODE_STRAIGHT = 2, 13 | DXGI_ALPHA_MODE_IGNORE = 3, 14 | DXGI_ALPHA_MODE_FORCE_DWORD = 0xffffffff, 15 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/shared/dxgi1_2/DXGI_MODE_DESC1.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from shared/dxgi1_2.h in the Windows SDK for Windows 10.0.22000.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct DXGI_MODE_DESC1 9 | { 10 | public uint Width; 11 | 12 | public uint Height; 13 | 14 | public DXGI_RATIONAL RefreshRate; 15 | 16 | public DXGI_FORMAT Format; 17 | 18 | public DXGI_MODE_SCANLINE_ORDER ScanlineOrdering; 19 | 20 | public DXGI_MODE_SCALING Scaling; 21 | 22 | public BOOL Stereo; 23 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/shared/dxgi1_2/DXGI_SCALING.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from shared/dxgi1_2.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum DXGI_SCALING 9 | { 10 | DXGI_SCALING_STRETCH = 0, 11 | DXGI_SCALING_NONE = 1, 12 | DXGI_SCALING_ASPECT_RATIO_STRETCH = 2, 13 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/shared/dxgi1_3/DXGI.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from shared/dxgi1_3.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal static partial class DXGI 9 | { 10 | [NativeTypeName("#define DXGI_CREATE_FACTORY_DEBUG 0x1")] 11 | public const int DXGI_CREATE_FACTORY_DEBUG = 0x1; 12 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/shared/dxgi1_3/DXGI_MATRIX_3X2_F.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from shared/dxgi1_3.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | using System.Runtime.Versioning; 7 | 8 | namespace ComputeSharp.Win32; 9 | 10 | [SupportedOSPlatform("windows8.1")] 11 | internal partial struct DXGI_MATRIX_3X2_F 12 | { 13 | public float _11; 14 | 15 | public float _12; 16 | 17 | public float _21; 18 | 19 | public float _22; 20 | 21 | public float _31; 22 | 23 | public float _32; 24 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/shared/dxgi1_3/DirectX.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from shared/dxgi1_3.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | using System; 7 | using System.Runtime.InteropServices; 8 | using System.Runtime.Versioning; 9 | 10 | namespace ComputeSharp.Win32; 11 | 12 | internal static unsafe partial class DirectX 13 | { 14 | [SupportedOSPlatform("windows8.1")] 15 | [DllImport("dxgi", ExactSpelling = true)] 16 | public static extern HRESULT CreateDXGIFactory2(uint Flags, [NativeTypeName("const IID &")] Guid* riid, void** ppFactory); 17 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/shared/dxgi1_5/DXGI_FEATURE.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from shared/dxgi1_5.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum DXGI_FEATURE 9 | { 10 | DXGI_FEATURE_PRESENT_ALLOW_TEARING = 0, 11 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/shared/dxgi1_6/DXGI_GPU_PREFERENCE.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from shared/dxgi1_6.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum DXGI_GPU_PREFERENCE 9 | { 10 | DXGI_GPU_PREFERENCE_UNSPECIFIED = 0, 11 | DXGI_GPU_PREFERENCE_MINIMUM_POWER = (DXGI_GPU_PREFERENCE_UNSPECIFIED + 1), 12 | DXGI_GPU_PREFERENCE_HIGH_PERFORMANCE = (DXGI_GPU_PREFERENCE_MINIMUM_POWER + 1), 13 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/shared/dxgicommon/DXGI_RATIONAL.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from shared/dxgicommon.h in the Windows SDK for Windows 10.0.22000.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct DXGI_RATIONAL 9 | { 10 | public uint Numerator; 11 | 12 | public uint Denominator; 13 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/shared/dxgicommon/DXGI_SAMPLE_DESC.Manual.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from shared/dxgicommon.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct DXGI_SAMPLE_DESC 9 | { 10 | public DXGI_SAMPLE_DESC(uint count, uint quality) 11 | { 12 | Count = count; 13 | Quality = quality; 14 | } 15 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/shared/dxgicommon/DXGI_SAMPLE_DESC.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from shared/dxgicommon.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct DXGI_SAMPLE_DESC 9 | { 10 | public uint Count; 11 | 12 | public uint Quality; 13 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/shared/dxgitype/DXGI_MODE_SCALING.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from shared/dxgitype.h in the Windows SDK for Windows 10.0.22000.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum DXGI_MODE_SCALING 9 | { 10 | DXGI_MODE_SCALING_UNSPECIFIED = 0, 11 | DXGI_MODE_SCALING_CENTERED = 1, 12 | DXGI_MODE_SCALING_STRETCHED = 2, 13 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/shared/dxgitype/DXGI_MODE_SCANLINE_ORDER.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from shared/dxgitype.h in the Windows SDK for Windows 10.0.22000.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum DXGI_MODE_SCANLINE_ORDER 9 | { 10 | DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED = 0, 11 | DXGI_MODE_SCANLINE_ORDER_PROGRESSIVE = 1, 12 | DXGI_MODE_SCANLINE_ORDER_UPPER_FIELD_FIRST = 2, 13 | DXGI_MODE_SCANLINE_ORDER_LOWER_FIELD_FIRST = 3, 14 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d2d1/D2D1_FEATURE_LEVEL.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d2d1.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | using static ComputeSharp.Win32.D3D_FEATURE_LEVEL; 7 | 8 | namespace ComputeSharp.Win32; 9 | 10 | internal enum D2D1_FEATURE_LEVEL : uint 11 | { 12 | D2D1_FEATURE_LEVEL_DEFAULT = 0, 13 | D2D1_FEATURE_LEVEL_9 = D3D_FEATURE_LEVEL_9_1, 14 | D2D1_FEATURE_LEVEL_10 = D3D_FEATURE_LEVEL_10_0, 15 | D2D1_FEATURE_LEVEL_FORCE_DWORD = 0xffffffff, 16 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d11/D3D11.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d11.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal static partial class D3D11 9 | { 10 | [NativeTypeName("#define D3D11_CS_DISPATCH_MAX_THREAD_GROUPS_PER_DIMENSION ( 65535 )")] 11 | public const int D3D11_CS_DISPATCH_MAX_THREAD_GROUPS_PER_DIMENSION = (65535); 12 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d11shader/D3D.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d11shader.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal static partial class D3D 9 | { 10 | [NativeTypeName("#define D3D_SHADER_REQUIRES_DOUBLES 0x00000001")] 11 | public const int D3D_SHADER_REQUIRES_DOUBLES = 0x00000001; 12 | 13 | [NativeTypeName("#define D3D_SHADER_REQUIRES_11_1_DOUBLE_EXTENSIONS 0x00000020")] 14 | public const int D3D_SHADER_REQUIRES_11_1_DOUBLE_EXTENSIONS = 0x00000020; 15 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_BOX.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_BOX 9 | { 10 | public uint left; 11 | 12 | public uint top; 13 | 14 | public uint front; 15 | 16 | public uint right; 17 | 18 | public uint bottom; 19 | 20 | public uint back; 21 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_BUFFER_SRV.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_BUFFER_SRV 9 | { 10 | [NativeTypeName("UINT64")] 11 | public ulong FirstElement; 12 | 13 | public uint NumElements; 14 | 15 | public uint StructureByteStride; 16 | 17 | public D3D12_BUFFER_SRV_FLAGS Flags; 18 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_BUFFER_SRV_FLAGS.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | using System; 7 | 8 | namespace ComputeSharp.Win32; 9 | 10 | [Flags] 11 | internal enum D3D12_BUFFER_SRV_FLAGS 12 | { 13 | D3D12_BUFFER_SRV_FLAG_NONE = 0, 14 | D3D12_BUFFER_SRV_FLAG_RAW = 0x1, 15 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_BUFFER_UAV.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_BUFFER_UAV 9 | { 10 | [NativeTypeName("UINT64")] 11 | public ulong FirstElement; 12 | 13 | public uint NumElements; 14 | 15 | public uint StructureByteStride; 16 | 17 | [NativeTypeName("UINT64")] 18 | public ulong CounterOffsetInBytes; 19 | 20 | public D3D12_BUFFER_UAV_FLAGS Flags; 21 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_BUFFER_UAV_FLAGS.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | using System; 7 | 8 | namespace ComputeSharp.Win32; 9 | 10 | [Flags] 11 | internal enum D3D12_BUFFER_UAV_FLAGS 12 | { 13 | D3D12_BUFFER_UAV_FLAG_NONE = 0, 14 | D3D12_BUFFER_UAV_FLAG_RAW = 0x1, 15 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_CACHED_PIPELINE_STATE.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal unsafe partial struct D3D12_CACHED_PIPELINE_STATE 9 | { 10 | [NativeTypeName("const void *")] 11 | public void* pCachedBlob; 12 | 13 | [NativeTypeName("SIZE_T")] 14 | public nuint CachedBlobSizeInBytes; 15 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_COMMAND_LIST_TYPE.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum D3D12_COMMAND_LIST_TYPE 9 | { 10 | D3D12_COMMAND_LIST_TYPE_DIRECT = 0, 11 | D3D12_COMMAND_LIST_TYPE_BUNDLE = 1, 12 | D3D12_COMMAND_LIST_TYPE_COMPUTE = 2, 13 | D3D12_COMMAND_LIST_TYPE_COPY = 3, 14 | D3D12_COMMAND_LIST_TYPE_VIDEO_DECODE = 4, 15 | D3D12_COMMAND_LIST_TYPE_VIDEO_PROCESS = 5, 16 | D3D12_COMMAND_LIST_TYPE_VIDEO_ENCODE = 6, 17 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_COMMAND_QUEUE_DESC.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_COMMAND_QUEUE_DESC 9 | { 10 | public D3D12_COMMAND_LIST_TYPE Type; 11 | 12 | public int Priority; 13 | 14 | public D3D12_COMMAND_QUEUE_FLAGS Flags; 15 | 16 | public uint NodeMask; 17 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_COMMAND_QUEUE_FLAGS.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | using System; 7 | 8 | namespace ComputeSharp.Win32; 9 | 10 | [Flags] 11 | internal enum D3D12_COMMAND_QUEUE_FLAGS 12 | { 13 | D3D12_COMMAND_QUEUE_FLAG_NONE = 0, 14 | D3D12_COMMAND_QUEUE_FLAG_DISABLE_GPU_TIMEOUT = 0x1, 15 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_COMMAND_QUEUE_PRIORITY.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum D3D12_COMMAND_QUEUE_PRIORITY 9 | { 10 | D3D12_COMMAND_QUEUE_PRIORITY_NORMAL = 0, 11 | D3D12_COMMAND_QUEUE_PRIORITY_HIGH = 100, 12 | D3D12_COMMAND_QUEUE_PRIORITY_GLOBAL_REALTIME = 10000, 13 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_COMPARISON_FUNC.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum D3D12_COMPARISON_FUNC 9 | { 10 | D3D12_COMPARISON_FUNC_NEVER = 1, 11 | D3D12_COMPARISON_FUNC_LESS = 2, 12 | D3D12_COMPARISON_FUNC_EQUAL = 3, 13 | D3D12_COMPARISON_FUNC_LESS_EQUAL = 4, 14 | D3D12_COMPARISON_FUNC_GREATER = 5, 15 | D3D12_COMPARISON_FUNC_NOT_EQUAL = 6, 16 | D3D12_COMPARISON_FUNC_GREATER_EQUAL = 7, 17 | D3D12_COMPARISON_FUNC_ALWAYS = 8, 18 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_COMPUTE_PIPELINE_STATE_DESC.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal unsafe partial struct D3D12_COMPUTE_PIPELINE_STATE_DESC 9 | { 10 | public ID3D12RootSignature* pRootSignature; 11 | 12 | public D3D12_SHADER_BYTECODE CS; 13 | 14 | public uint NodeMask; 15 | 16 | public D3D12_CACHED_PIPELINE_STATE CachedPSO; 17 | 18 | public D3D12_PIPELINE_STATE_FLAGS Flags; 19 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_CONSERVATIVE_RASTERIZATION_TIER.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum D3D12_CONSERVATIVE_RASTERIZATION_TIER 9 | { 10 | D3D12_CONSERVATIVE_RASTERIZATION_TIER_NOT_SUPPORTED = 0, 11 | D3D12_CONSERVATIVE_RASTERIZATION_TIER_1 = 1, 12 | D3D12_CONSERVATIVE_RASTERIZATION_TIER_2 = 2, 13 | D3D12_CONSERVATIVE_RASTERIZATION_TIER_3 = 3, 14 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_CONSTANT_BUFFER_VIEW_DESC.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_CONSTANT_BUFFER_VIEW_DESC 9 | { 10 | [NativeTypeName("D3D12_GPU_VIRTUAL_ADDRESS")] 11 | public ulong BufferLocation; 12 | 13 | public uint SizeInBytes; 14 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_CPU_DESCRIPTOR_HANDLE.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_CPU_DESCRIPTOR_HANDLE 9 | { 10 | [NativeTypeName("SIZE_T")] 11 | public nuint ptr; 12 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_CPU_PAGE_PROPERTY.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum D3D12_CPU_PAGE_PROPERTY 9 | { 10 | D3D12_CPU_PAGE_PROPERTY_UNKNOWN = 0, 11 | D3D12_CPU_PAGE_PROPERTY_NOT_AVAILABLE = 1, 12 | D3D12_CPU_PAGE_PROPERTY_WRITE_COMBINE = 2, 13 | D3D12_CPU_PAGE_PROPERTY_WRITE_BACK = 3, 14 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_CROSS_NODE_SHARING_TIER.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum D3D12_CROSS_NODE_SHARING_TIER 9 | { 10 | D3D12_CROSS_NODE_SHARING_TIER_NOT_SUPPORTED = 0, 11 | D3D12_CROSS_NODE_SHARING_TIER_1_EMULATED = 1, 12 | D3D12_CROSS_NODE_SHARING_TIER_1 = 2, 13 | D3D12_CROSS_NODE_SHARING_TIER_2 = 3, 14 | D3D12_CROSS_NODE_SHARING_TIER_3 = 4, 15 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_DEPTH_STENCIL_VALUE.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_DEPTH_STENCIL_VALUE 9 | { 10 | public float Depth; 11 | 12 | [NativeTypeName("UINT8")] 13 | public byte Stencil; 14 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_DESCRIPTOR_HEAP_DESC.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_DESCRIPTOR_HEAP_DESC 9 | { 10 | public D3D12_DESCRIPTOR_HEAP_TYPE Type; 11 | 12 | public uint NumDescriptors; 13 | 14 | public D3D12_DESCRIPTOR_HEAP_FLAGS Flags; 15 | 16 | public uint NodeMask; 17 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_DESCRIPTOR_HEAP_FLAGS.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | using System; 7 | 8 | namespace ComputeSharp.Win32; 9 | 10 | [Flags] 11 | internal enum D3D12_DESCRIPTOR_HEAP_FLAGS 12 | { 13 | D3D12_DESCRIPTOR_HEAP_FLAG_NONE = 0, 14 | D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE = 0x1, 15 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_DESCRIPTOR_RANGE.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_DESCRIPTOR_RANGE 9 | { 10 | public D3D12_DESCRIPTOR_RANGE_TYPE RangeType; 11 | 12 | public uint NumDescriptors; 13 | 14 | public uint BaseShaderRegister; 15 | 16 | public uint RegisterSpace; 17 | 18 | public uint OffsetInDescriptorsFromTableStart; 19 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_DESCRIPTOR_RANGE1.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_DESCRIPTOR_RANGE1 9 | { 10 | public D3D12_DESCRIPTOR_RANGE_TYPE RangeType; 11 | 12 | public uint NumDescriptors; 13 | 14 | public uint BaseShaderRegister; 15 | 16 | public uint RegisterSpace; 17 | 18 | public D3D12_DESCRIPTOR_RANGE_FLAGS Flags; 19 | 20 | public uint OffsetInDescriptorsFromTableStart; 21 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_DESCRIPTOR_RANGE_TYPE.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum D3D12_DESCRIPTOR_RANGE_TYPE 9 | { 10 | D3D12_DESCRIPTOR_RANGE_TYPE_SRV = 0, 11 | D3D12_DESCRIPTOR_RANGE_TYPE_UAV = (D3D12_DESCRIPTOR_RANGE_TYPE_SRV + 1), 12 | D3D12_DESCRIPTOR_RANGE_TYPE_CBV = (D3D12_DESCRIPTOR_RANGE_TYPE_UAV + 1), 13 | D3D12_DESCRIPTOR_RANGE_TYPE_SAMPLER = (D3D12_DESCRIPTOR_RANGE_TYPE_CBV + 1), 14 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_DRED_AUTO_BREADCRUMB_OUTPUT1.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from d3d12.h in Microsoft.Direct3D.D3D12 v1.600.10 4 | // Original source is Copyright © Microsoft. Licensed under the MIT license 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal unsafe partial struct D3D12_DRED_AUTO_BREADCRUMBS_OUTPUT1 9 | { 10 | [NativeTypeName("const D3D12_AUTO_BREADCRUMB_NODE1 *")] 11 | public D3D12_AUTO_BREADCRUMB_NODE1* pHeadAutoBreadcrumbNode; 12 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_DRED_BREADCRUMB_CONTEXT.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from d3d12.h in Microsoft.Direct3D.D3D12 v1.600.10 4 | // Original source is Copyright © Microsoft. Licensed under the MIT license 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal unsafe partial struct D3D12_DRED_BREADCRUMB_CONTEXT 9 | { 10 | public uint BreadcrumbIndex; 11 | 12 | [NativeTypeName("const wchar_t *")] 13 | public ushort* pContextString; 14 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_DRED_ENABLEMENT.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from d3d12.h in Microsoft.Direct3D.D3D12 v1.600.10 4 | // Original source is Copyright © Microsoft. Licensed under the MIT license 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum D3D12_DRED_ENABLEMENT 9 | { 10 | D3D12_DRED_ENABLEMENT_SYSTEM_CONTROLLED = 0, 11 | D3D12_DRED_ENABLEMENT_FORCED_OFF = 1, 12 | D3D12_DRED_ENABLEMENT_FORCED_ON = 2, 13 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_FEATURE_DATA_ARCHITECTURE.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_FEATURE_DATA_ARCHITECTURE 9 | { 10 | public uint NodeIndex; 11 | 12 | public BOOL TileBasedRenderer; 13 | 14 | public BOOL UMA; 15 | 16 | public BOOL CacheCoherentUMA; 17 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_FEATURE_DATA_ARCHITECTURE1.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_FEATURE_DATA_ARCHITECTURE1 9 | { 10 | public uint NodeIndex; 11 | 12 | public BOOL TileBasedRenderer; 13 | 14 | public BOOL UMA; 15 | 16 | public BOOL CacheCoherentUMA; 17 | 18 | public BOOL IsolatedMMU; 19 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_FEATURE_DATA_D3D12_OPTIONS1.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_FEATURE_DATA_D3D12_OPTIONS1 9 | { 10 | public BOOL WaveOps; 11 | 12 | public uint WaveLaneCountMin; 13 | 14 | public uint WaveLaneCountMax; 15 | 16 | public uint TotalLaneCount; 17 | 18 | public BOOL ExpandedComputeResourceStates; 19 | 20 | public BOOL Int64ShaderOps; 21 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_FEATURE_DATA_D3D12_OPTIONS7.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_FEATURE_DATA_D3D12_OPTIONS7 9 | { 10 | public D3D12_MESH_SHADER_TIER MeshShaderTier; 11 | 12 | public D3D12_SAMPLER_FEEDBACK_TIER SamplerFeedbackTier; 13 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_FEATURE_DATA_FORMAT_SUPPORT.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_FEATURE_DATA_FORMAT_SUPPORT 9 | { 10 | public DXGI_FORMAT Format; 11 | 12 | public D3D12_FORMAT_SUPPORT1 Support1; 13 | 14 | public D3D12_FORMAT_SUPPORT2 Support2; 15 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_FEATURE_DATA_SHADER_MODEL.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_FEATURE_DATA_SHADER_MODEL 9 | { 10 | public D3D_SHADER_MODEL HighestShaderModel; 11 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_FENCE_FLAGS.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | using System; 7 | 8 | namespace ComputeSharp.Win32; 9 | 10 | [Flags] 11 | internal enum D3D12_FENCE_FLAGS 12 | { 13 | D3D12_FENCE_FLAG_NONE = 0, 14 | D3D12_FENCE_FLAG_SHARED = 0x1, 15 | D3D12_FENCE_FLAG_SHARED_CROSS_ADAPTER = 0x2, 16 | D3D12_FENCE_FLAG_NON_MONITORED = 0x4, 17 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_GPU_DESCRIPTOR_HANDLE.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_GPU_DESCRIPTOR_HANDLE 9 | { 10 | [NativeTypeName("UINT64")] 11 | public ulong ptr; 12 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_HEAP_DESC.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_HEAP_DESC 9 | { 10 | [NativeTypeName("UINT64")] 11 | public ulong SizeInBytes; 12 | 13 | public D3D12_HEAP_PROPERTIES Properties; 14 | 15 | [NativeTypeName("UINT64")] 16 | public ulong Alignment; 17 | 18 | public D3D12_HEAP_FLAGS Flags; 19 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_HEAP_PROPERTIES.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_HEAP_PROPERTIES 9 | { 10 | public D3D12_HEAP_TYPE Type; 11 | 12 | public D3D12_CPU_PAGE_PROPERTY CPUPageProperty; 13 | 14 | public D3D12_MEMORY_POOL MemoryPoolPreference; 15 | 16 | public uint CreationNodeMask; 17 | 18 | public uint VisibleNodeMask; 19 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_HEAP_TYPE.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum D3D12_HEAP_TYPE 9 | { 10 | D3D12_HEAP_TYPE_DEFAULT = 1, 11 | D3D12_HEAP_TYPE_UPLOAD = 2, 12 | D3D12_HEAP_TYPE_READBACK = 3, 13 | D3D12_HEAP_TYPE_CUSTOM = 4, 14 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_MEMORY_POOL.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum D3D12_MEMORY_POOL 9 | { 10 | D3D12_MEMORY_POOL_UNKNOWN = 0, 11 | D3D12_MEMORY_POOL_L0 = 1, 12 | D3D12_MEMORY_POOL_L1 = 2, 13 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_MESH_SHADER_TIER.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum D3D12_MESH_SHADER_TIER 9 | { 10 | D3D12_MESH_SHADER_TIER_NOT_SUPPORTED = 0, 11 | D3D12_MESH_SHADER_TIER_1 = 10, 12 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_MIP_REGION.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_MIP_REGION 9 | { 10 | public uint Width; 11 | 12 | public uint Height; 13 | 14 | public uint Depth; 15 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_PIPELINE_STATE_FLAGS.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | using System; 7 | 8 | namespace ComputeSharp.Win32; 9 | 10 | [Flags] 11 | internal enum D3D12_PIPELINE_STATE_FLAGS 12 | { 13 | D3D12_PIPELINE_STATE_FLAG_NONE = 0, 14 | D3D12_PIPELINE_STATE_FLAG_TOOL_DEBUG = 0x1, 15 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_PLACED_SUBRESOURCE_FOOTPRINT.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_PLACED_SUBRESOURCE_FOOTPRINT 9 | { 10 | [NativeTypeName("UINT64")] 11 | public ulong Offset; 12 | 13 | public D3D12_SUBRESOURCE_FOOTPRINT Footprint; 14 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_RANGE.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_RANGE 9 | { 10 | [NativeTypeName("SIZE_T")] 11 | public nuint Begin; 12 | 13 | [NativeTypeName("SIZE_T")] 14 | public nuint End; 15 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_RAYTRACING_ACCELERATION_STRUCTURE_SRV.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_RAYTRACING_ACCELERATION_STRUCTURE_SRV 9 | { 10 | [NativeTypeName("D3D12_GPU_VIRTUAL_ADDRESS")] 11 | public ulong Location; 12 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_RESOURCE_ALIASING_BARRIER.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal unsafe partial struct D3D12_RESOURCE_ALIASING_BARRIER 9 | { 10 | public ID3D12Resource* pResourceBefore; 11 | 12 | public ID3D12Resource* pResourceAfter; 13 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_RESOURCE_ALLOCATION_INFO.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_RESOURCE_ALLOCATION_INFO 9 | { 10 | [NativeTypeName("UINT64")] 11 | public ulong SizeInBytes; 12 | 13 | [NativeTypeName("UINT64")] 14 | public ulong Alignment; 15 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_RESOURCE_ALLOCATION_INFO1.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_RESOURCE_ALLOCATION_INFO1 9 | { 10 | [NativeTypeName("UINT64")] 11 | public ulong Offset; 12 | 13 | [NativeTypeName("UINT64")] 14 | public ulong Alignment; 15 | 16 | [NativeTypeName("UINT64")] 17 | public ulong SizeInBytes; 18 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_RESOURCE_BARRIER_FLAGS.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | using System; 7 | 8 | namespace ComputeSharp.Win32; 9 | 10 | [Flags] 11 | internal enum D3D12_RESOURCE_BARRIER_FLAGS 12 | { 13 | D3D12_RESOURCE_BARRIER_FLAG_NONE = 0, 14 | D3D12_RESOURCE_BARRIER_FLAG_BEGIN_ONLY = 0x1, 15 | D3D12_RESOURCE_BARRIER_FLAG_END_ONLY = 0x2, 16 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_RESOURCE_BARRIER_TYPE.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum D3D12_RESOURCE_BARRIER_TYPE 9 | { 10 | D3D12_RESOURCE_BARRIER_TYPE_TRANSITION = 0, 11 | D3D12_RESOURCE_BARRIER_TYPE_ALIASING = (D3D12_RESOURCE_BARRIER_TYPE_TRANSITION + 1), 12 | D3D12_RESOURCE_BARRIER_TYPE_UAV = (D3D12_RESOURCE_BARRIER_TYPE_ALIASING + 1), 13 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_RESOURCE_BINDING_TIER.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum D3D12_RESOURCE_BINDING_TIER 9 | { 10 | D3D12_RESOURCE_BINDING_TIER_1 = 1, 11 | D3D12_RESOURCE_BINDING_TIER_2 = 2, 12 | D3D12_RESOURCE_BINDING_TIER_3 = 3, 13 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_RESOURCE_DIMENSION.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum D3D12_RESOURCE_DIMENSION 9 | { 10 | D3D12_RESOURCE_DIMENSION_UNKNOWN = 0, 11 | D3D12_RESOURCE_DIMENSION_BUFFER = 1, 12 | D3D12_RESOURCE_DIMENSION_TEXTURE1D = 2, 13 | D3D12_RESOURCE_DIMENSION_TEXTURE2D = 3, 14 | D3D12_RESOURCE_DIMENSION_TEXTURE3D = 4, 15 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_RESOURCE_HEAP_TIER.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum D3D12_RESOURCE_HEAP_TIER 9 | { 10 | D3D12_RESOURCE_HEAP_TIER_1 = 1, 11 | D3D12_RESOURCE_HEAP_TIER_2 = 2, 12 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_RESOURCE_TRANSITION_BARRIER.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal unsafe partial struct D3D12_RESOURCE_TRANSITION_BARRIER 9 | { 10 | public ID3D12Resource* pResource; 11 | 12 | public uint Subresource; 13 | 14 | public D3D12_RESOURCE_STATES StateBefore; 15 | 16 | public D3D12_RESOURCE_STATES StateAfter; 17 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_RESOURCE_UAV_BARRIER.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal unsafe partial struct D3D12_RESOURCE_UAV_BARRIER 9 | { 10 | public ID3D12Resource* pResource; 11 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_ROOT_CONSTANTS.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_ROOT_CONSTANTS 9 | { 10 | public uint ShaderRegister; 11 | 12 | public uint RegisterSpace; 13 | 14 | public uint Num32BitValues; 15 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_ROOT_DESCRIPTOR.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_ROOT_DESCRIPTOR 9 | { 10 | public uint ShaderRegister; 11 | 12 | public uint RegisterSpace; 13 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_ROOT_DESCRIPTOR1.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_ROOT_DESCRIPTOR1 9 | { 10 | public uint ShaderRegister; 11 | 12 | public uint RegisterSpace; 13 | 14 | public D3D12_ROOT_DESCRIPTOR_FLAGS Flags; 15 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_ROOT_DESCRIPTOR_FLAGS.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | using System; 7 | 8 | namespace ComputeSharp.Win32; 9 | 10 | [Flags] 11 | internal enum D3D12_ROOT_DESCRIPTOR_FLAGS 12 | { 13 | D3D12_ROOT_DESCRIPTOR_FLAG_NONE = 0, 14 | D3D12_ROOT_DESCRIPTOR_FLAG_DATA_VOLATILE = 0x2, 15 | D3D12_ROOT_DESCRIPTOR_FLAG_DATA_STATIC_WHILE_SET_AT_EXECUTE = 0x4, 16 | D3D12_ROOT_DESCRIPTOR_FLAG_DATA_STATIC = 0x8, 17 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_ROOT_DESCRIPTOR_TABLE.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal unsafe partial struct D3D12_ROOT_DESCRIPTOR_TABLE 9 | { 10 | public uint NumDescriptorRanges; 11 | 12 | [NativeTypeName("const D3D12_DESCRIPTOR_RANGE *")] 13 | public D3D12_DESCRIPTOR_RANGE* pDescriptorRanges; 14 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_ROOT_DESCRIPTOR_TABLE1.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal unsafe partial struct D3D12_ROOT_DESCRIPTOR_TABLE1 9 | { 10 | public uint NumDescriptorRanges; 11 | 12 | [NativeTypeName("const D3D12_DESCRIPTOR_RANGE1 *")] 13 | public D3D12_DESCRIPTOR_RANGE1* pDescriptorRanges; 14 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_SAMPLER_FEEDBACK_TIER.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum D3D12_SAMPLER_FEEDBACK_TIER 9 | { 10 | D3D12_SAMPLER_FEEDBACK_TIER_NOT_SUPPORTED = 0, 11 | D3D12_SAMPLER_FEEDBACK_TIER_0_9 = 90, 12 | D3D12_SAMPLER_FEEDBACK_TIER_1_0 = 100, 13 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_SHADER_BYTECODE.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal unsafe partial struct D3D12_SHADER_BYTECODE 9 | { 10 | [NativeTypeName("const void *")] 11 | public void* pShaderBytecode; 12 | 13 | [NativeTypeName("SIZE_T")] 14 | public nuint BytecodeLength; 15 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_SHADER_MIN_PRECISION_SUPPORT.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | using System; 7 | 8 | namespace ComputeSharp.Win32; 9 | 10 | [Flags] 11 | internal enum D3D12_SHADER_MIN_PRECISION_SUPPORT 12 | { 13 | D3D12_SHADER_MIN_PRECISION_SUPPORT_NONE = 0, 14 | D3D12_SHADER_MIN_PRECISION_SUPPORT_10_BIT = 0x1, 15 | D3D12_SHADER_MIN_PRECISION_SUPPORT_16_BIT = 0x2, 16 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_SHADER_VISIBILITY.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum D3D12_SHADER_VISIBILITY 9 | { 10 | D3D12_SHADER_VISIBILITY_ALL = 0, 11 | D3D12_SHADER_VISIBILITY_VERTEX = 1, 12 | D3D12_SHADER_VISIBILITY_HULL = 2, 13 | D3D12_SHADER_VISIBILITY_DOMAIN = 3, 14 | D3D12_SHADER_VISIBILITY_GEOMETRY = 4, 15 | D3D12_SHADER_VISIBILITY_PIXEL = 5, 16 | D3D12_SHADER_VISIBILITY_AMPLIFICATION = 6, 17 | D3D12_SHADER_VISIBILITY_MESH = 7, 18 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_STATIC_BORDER_COLOR.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum D3D12_STATIC_BORDER_COLOR 9 | { 10 | D3D12_STATIC_BORDER_COLOR_TRANSPARENT_BLACK = 0, 11 | D3D12_STATIC_BORDER_COLOR_OPAQUE_BLACK = (D3D12_STATIC_BORDER_COLOR_TRANSPARENT_BLACK + 1), 12 | D3D12_STATIC_BORDER_COLOR_OPAQUE_WHITE = (D3D12_STATIC_BORDER_COLOR_OPAQUE_BLACK + 1), 13 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_SUBRESOURCE_FOOTPRINT.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_SUBRESOURCE_FOOTPRINT 9 | { 10 | public DXGI_FORMAT Format; 11 | 12 | public uint Width; 13 | 14 | public uint Height; 15 | 16 | public uint Depth; 17 | 18 | public uint RowPitch; 19 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_TEX1D_ARRAY_SRV.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_TEX1D_ARRAY_SRV 9 | { 10 | public uint MostDetailedMip; 11 | 12 | public uint MipLevels; 13 | 14 | public uint FirstArraySlice; 15 | 16 | public uint ArraySize; 17 | 18 | public float ResourceMinLODClamp; 19 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_TEX1D_ARRAY_UAV.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_TEX1D_ARRAY_UAV 9 | { 10 | public uint MipSlice; 11 | 12 | public uint FirstArraySlice; 13 | 14 | public uint ArraySize; 15 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_TEX1D_SRV.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_TEX1D_SRV 9 | { 10 | public uint MostDetailedMip; 11 | 12 | public uint MipLevels; 13 | 14 | public float ResourceMinLODClamp; 15 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_TEX1D_UAV.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_TEX1D_UAV 9 | { 10 | public uint MipSlice; 11 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_TEX2DMS_ARRAY_SRV.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_TEX2DMS_ARRAY_SRV 9 | { 10 | public uint FirstArraySlice; 11 | 12 | public uint ArraySize; 13 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_TEX2DMS_SRV.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_TEX2DMS_SRV 9 | { 10 | public uint UnusedField_NothingToDefine; 11 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_TEX2D_ARRAY_SRV.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_TEX2D_ARRAY_SRV 9 | { 10 | public uint MostDetailedMip; 11 | 12 | public uint MipLevels; 13 | 14 | public uint FirstArraySlice; 15 | 16 | public uint ArraySize; 17 | 18 | public uint PlaneSlice; 19 | 20 | public float ResourceMinLODClamp; 21 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_TEX2D_ARRAY_UAV.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_TEX2D_ARRAY_UAV 9 | { 10 | public uint MipSlice; 11 | 12 | public uint FirstArraySlice; 13 | 14 | public uint ArraySize; 15 | 16 | public uint PlaneSlice; 17 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_TEX2D_SRV.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_TEX2D_SRV 9 | { 10 | public uint MostDetailedMip; 11 | 12 | public uint MipLevels; 13 | 14 | public uint PlaneSlice; 15 | 16 | public float ResourceMinLODClamp; 17 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_TEX2D_UAV.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_TEX2D_UAV 9 | { 10 | public uint MipSlice; 11 | 12 | public uint PlaneSlice; 13 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_TEX3D_SRV.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_TEX3D_SRV 9 | { 10 | public uint MostDetailedMip; 11 | 12 | public uint MipLevels; 13 | 14 | public float ResourceMinLODClamp; 15 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_TEX3D_UAV.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_TEX3D_UAV 9 | { 10 | public uint MipSlice; 11 | 12 | public uint FirstWSlice; 13 | 14 | public uint WSize; 15 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_TEXCUBE_ARRAY_SRV.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_TEXCUBE_ARRAY_SRV 9 | { 10 | public uint MostDetailedMip; 11 | 12 | public uint MipLevels; 13 | 14 | public uint First2DArrayFace; 15 | 16 | public uint NumCubes; 17 | 18 | public float ResourceMinLODClamp; 19 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_TEXCUBE_SRV.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_TEXCUBE_SRV 9 | { 10 | public uint MostDetailedMip; 11 | 12 | public uint MipLevels; 13 | 14 | public float ResourceMinLODClamp; 15 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_TEXTURE_ADDRESS_MODE.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum D3D12_TEXTURE_ADDRESS_MODE 9 | { 10 | D3D12_TEXTURE_ADDRESS_MODE_WRAP = 1, 11 | D3D12_TEXTURE_ADDRESS_MODE_MIRROR = 2, 12 | D3D12_TEXTURE_ADDRESS_MODE_CLAMP = 3, 13 | D3D12_TEXTURE_ADDRESS_MODE_BORDER = 4, 14 | D3D12_TEXTURE_ADDRESS_MODE_MIRROR_ONCE = 5, 15 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_TEXTURE_COPY_TYPE.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum D3D12_TEXTURE_COPY_TYPE 9 | { 10 | D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX = 0, 11 | D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT = 1, 12 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_TEXTURE_LAYOUT.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum D3D12_TEXTURE_LAYOUT 9 | { 10 | D3D12_TEXTURE_LAYOUT_UNKNOWN = 0, 11 | D3D12_TEXTURE_LAYOUT_ROW_MAJOR = 1, 12 | D3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLE = 2, 13 | D3D12_TEXTURE_LAYOUT_64KB_STANDARD_SWIZZLE = 3, 14 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_TILED_RESOURCES_TIER.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum D3D12_TILED_RESOURCES_TIER 9 | { 10 | D3D12_TILED_RESOURCES_TIER_NOT_SUPPORTED = 0, 11 | D3D12_TILED_RESOURCES_TIER_1 = 1, 12 | D3D12_TILED_RESOURCES_TIER_2 = 2, 13 | D3D12_TILED_RESOURCES_TIER_3 = 3, 14 | D3D12_TILED_RESOURCES_TIER_4 = 4, 15 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D12_UAV_DIMENSION.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum D3D12_UAV_DIMENSION 9 | { 10 | D3D12_UAV_DIMENSION_UNKNOWN = 0, 11 | D3D12_UAV_DIMENSION_BUFFER = 1, 12 | D3D12_UAV_DIMENSION_TEXTURE1D = 2, 13 | D3D12_UAV_DIMENSION_TEXTURE1DARRAY = 3, 14 | D3D12_UAV_DIMENSION_TEXTURE2D = 4, 15 | D3D12_UAV_DIMENSION_TEXTURE2DARRAY = 5, 16 | D3D12_UAV_DIMENSION_TEXTURE3D = 8, 17 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D_ROOT_SIGNATURE_VERSION.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum D3D_ROOT_SIGNATURE_VERSION 9 | { 10 | D3D_ROOT_SIGNATURE_VERSION_1 = 0x1, 11 | D3D_ROOT_SIGNATURE_VERSION_1_0 = 0x1, 12 | D3D_ROOT_SIGNATURE_VERSION_1_1 = 0x2, 13 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/D3D_SHADER_MODEL.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum D3D_SHADER_MODEL 9 | { 10 | D3D_SHADER_MODEL_5_1 = 0x51, 11 | D3D_SHADER_MODEL_6_0 = 0x60, 12 | D3D_SHADER_MODEL_6_1 = 0x61, 13 | D3D_SHADER_MODEL_6_2 = 0x62, 14 | D3D_SHADER_MODEL_6_3 = 0x63, 15 | D3D_SHADER_MODEL_6_4 = 0x64, 16 | D3D_SHADER_MODEL_6_5 = 0x65, 17 | D3D_SHADER_MODEL_6_6 = 0x66, 18 | D3D_SHADER_MODEL_6_7 = 0x67, 19 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12/ID3D12Heap.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | [NativeTypeName("struct ID3D12Heap : ID3D12Pageable")] 9 | [NativeInheritance("ID3D12Pageable")] 10 | internal unsafe partial struct ID3D12Heap 11 | { 12 | public void** lpVtbl; 13 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12sdklayers/D3D12_INFO_QUEUE_FILTER.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12sdklayers.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct D3D12_INFO_QUEUE_FILTER 9 | { 10 | public D3D12_INFO_QUEUE_FILTER_DESC AllowList; 11 | 12 | public D3D12_INFO_QUEUE_FILTER_DESC DenyList; 13 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12sdklayers/D3D12_INFO_QUEUE_FILTER_DESC.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12sdklayers.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal unsafe partial struct D3D12_INFO_QUEUE_FILTER_DESC 9 | { 10 | public uint NumCategories; 11 | 12 | public D3D12_MESSAGE_CATEGORY* pCategoryList; 13 | 14 | public uint NumSeverities; 15 | 16 | public D3D12_MESSAGE_SEVERITY* pSeverityList; 17 | 18 | public uint NumIDs; 19 | 20 | public D3D12_MESSAGE_ID* pIDList; 21 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12sdklayers/D3D12_MESSAGE.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12sdklayers.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal unsafe partial struct D3D12_MESSAGE 9 | { 10 | public D3D12_MESSAGE_CATEGORY Category; 11 | 12 | public D3D12_MESSAGE_SEVERITY Severity; 13 | 14 | public D3D12_MESSAGE_ID ID; 15 | 16 | [NativeTypeName("const char *")] 17 | public sbyte* pDescription; 18 | 19 | [NativeTypeName("SIZE_T")] 20 | public nuint DescriptionByteLength; 21 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/d3d12sdklayers/D3D12_MESSAGE_SEVERITY.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/d3d12sdklayers.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum D3D12_MESSAGE_SEVERITY 9 | { 10 | D3D12_MESSAGE_SEVERITY_CORRUPTION = 0, 11 | D3D12_MESSAGE_SEVERITY_ERROR = (D3D12_MESSAGE_SEVERITY_CORRUPTION + 1), 12 | D3D12_MESSAGE_SEVERITY_WARNING = (D3D12_MESSAGE_SEVERITY_ERROR + 1), 13 | D3D12_MESSAGE_SEVERITY_INFO = (D3D12_MESSAGE_SEVERITY_WARNING + 1), 14 | D3D12_MESSAGE_SEVERITY_MESSAGE = (D3D12_MESSAGE_SEVERITY_INFO + 1), 15 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/dxcapi/DirectX.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/dxcapi.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. Licensed under the University of Illinois Open Source License. 5 | 6 | using System; 7 | using System.Runtime.InteropServices; 8 | 9 | namespace ComputeSharp.Win32; 10 | 11 | internal static unsafe partial class DirectX 12 | { 13 | [DllImport("dxcompiler", ExactSpelling = true)] 14 | public static extern HRESULT DxcCreateInstance([NativeTypeName("const IID &")] Guid* rclsid, [NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("LPVOID *")] void** ppv); 15 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/DirectX/um/dxcapi/DxcBuffer.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/dxcapi.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. Licensed under the University of Illinois Open Source License. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal unsafe partial struct DxcBuffer 9 | { 10 | [NativeTypeName("LPCVOID")] 11 | public void* Ptr; 12 | 13 | [NativeTypeName("SIZE_T")] 14 | public nuint Size; 15 | 16 | public uint Encoding; 17 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/Windows/other/helper-types/IComObject.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ComputeSharp.Win32; 4 | 5 | /// 6 | /// An interface for a COM object, with a specific IID. 7 | /// 8 | internal unsafe interface IComObject 9 | { 10 | /// 11 | /// Gets a pointer to the IID for the object type. 12 | /// 13 | static abstract Guid* IID { get; } 14 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/Windows/shared/minwindef/FILETIME.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from shared/minwindef.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct FILETIME 9 | { 10 | [NativeTypeName("DWORD")] 11 | public uint dwLowDateTime; 12 | 13 | [NativeTypeName("DWORD")] 14 | public uint dwHighDateTime; 15 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/Windows/shared/minwindef/Windows.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from shared/minwindef.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal static partial class Windows 9 | { 10 | [NativeTypeName("#define FALSE 0")] 11 | public const int FALSE = 0; 12 | 13 | [NativeTypeName("#define TRUE 1")] 14 | public const int TRUE = 1; 15 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/Windows/shared/winerror/S.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from shared/winerror.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal static partial class S 9 | { 10 | [NativeTypeName("#define S_OK ((HRESULT)0L)")] 11 | public const int S_OK = ((int)(0)); 12 | 13 | [NativeTypeName("#define S_FALSE ((HRESULT)1L)")] 14 | public const int S_FALSE = ((int)(1)); 15 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/Windows/shared/winerror/STG.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from shared/winerror.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal static partial class STG 9 | { 10 | [NativeTypeName("#define STG_E_INVALIDFUNCTION _HRESULT_TYPEDEF_(0x80030001L)")] 11 | public const int STG_E_INVALIDFUNCTION = unchecked((int)(0x80030001)); 12 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/Windows/shared/winerror/Windows.Manual.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from shared/winerror.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal static partial class Windows 9 | { 10 | public static bool SUCCEEDED(HRESULT hr) 11 | { 12 | return hr >= 0; 13 | } 14 | 15 | public static bool FAILED(HRESULT hr) 16 | { 17 | return hr < 0; 18 | } 19 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/Windows/shared/wtypes/STATFLAG.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from shared/wtypes.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum STATFLAG 9 | { 10 | STATFLAG_DEFAULT = 0, 11 | STATFLAG_NONAME = 1, 12 | STATFLAG_NOOPEN = 2, 13 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/Windows/um/coml2api/STGM.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/coml2api.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal static partial class STGM 9 | { 10 | [NativeTypeName("#define STGM_READ 0x00000000L")] 11 | public const int STGM_READ = 0x00000000; 12 | 13 | [NativeTypeName("#define STGM_WRITE 0x00000001L")] 14 | public const int STGM_WRITE = 0x00000001; 15 | 16 | [NativeTypeName("#define STGM_READWRITE 0x00000002L")] 17 | public const int STGM_READWRITE = 0x00000002; 18 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/Windows/um/handleapi/Windows.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/synchapi.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | using System.Runtime.InteropServices; 7 | 8 | namespace ComputeSharp.Win32; 9 | 10 | internal static unsafe partial class Windows 11 | { 12 | [DllImport("kernel32", ExactSpelling = true)] 13 | public static extern BOOL CloseHandle(HANDLE hObject); 14 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/Windows/um/minwinbase/SECURITY_ATTRIBUTES.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/minwinbase.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal unsafe partial struct SECURITY_ATTRIBUTES 9 | { 10 | [NativeTypeName("DWORD")] 11 | public uint nLength; 12 | 13 | [NativeTypeName("LPVOID")] 14 | public void* lpSecurityDescriptor; 15 | 16 | public BOOL bInheritHandle; 17 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/Windows/um/objidlbase/STGTY.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/objidlbase.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum STGTY 9 | { 10 | STGTY_STORAGE = 1, 11 | STGTY_STREAM = 2, 12 | STGTY_LOCKBYTES = 3, 13 | STGTY_PROPERTY = 4, 14 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/Windows/um/wincodec/WICBitmapAlphaChannelOption.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/wincodec.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum WICBitmapAlphaChannelOption 9 | { 10 | WICBitmapUseAlpha = 0, 11 | WICBitmapUsePremultipliedAlpha = 0x1, 12 | WICBitmapIgnoreAlpha = 0x2, 13 | WICBITMAPALPHACHANNELOPTIONS_FORCE_DWORD = 0x7fffffff, 14 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/Windows/um/wincodec/WICBitmapCreateCacheOption.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/wincodec.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum WICBitmapCreateCacheOption 9 | { 10 | WICBitmapNoCache = 0, 11 | WICBitmapCacheOnDemand = 0x1, 12 | WICBitmapCacheOnLoad = 0x2, 13 | WICBITMAPCREATECACHEOPTION_FORCE_DWORD = 0x7fffffff, 14 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/Windows/um/wincodec/WICBitmapEncoderCacheOption.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/wincodec.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum WICBitmapEncoderCacheOption 9 | { 10 | WICBitmapEncoderCacheInMemory = 0, 11 | WICBitmapEncoderCacheTempFile = 0x1, 12 | WICBitmapEncoderNoCache = 0x2, 13 | WICBITMAPENCODERCACHEOPTION_FORCE_DWORD = 0x7fffffff, 14 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/Windows/um/wincodec/WICDecodeOptions.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/wincodec.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal enum WICDecodeOptions 9 | { 10 | WICDecodeMetadataCacheOnDemand = 0, 11 | WICDecodeMetadataCacheOnLoad = 0x1, 12 | WICMETADATACACHEOPTION_FORCE_DWORD = 0x7fffffff, 13 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/Windows/um/wincodec/WICRect.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/wincodec.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct WICRect 9 | { 10 | public int X; 11 | 12 | public int Y; 13 | 14 | public int Width; 15 | 16 | public int Height; 17 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/Windows/um/winnt/LUID.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/winnt.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal partial struct LUID 9 | { 10 | [NativeTypeName("DWORD")] 11 | public uint LowPart; 12 | 13 | [NativeTypeName("LONG")] 14 | public int HighPart; 15 | } -------------------------------------------------------------------------------- /src/ComputeSharp.Win32.D3D12/Windows/um/winnt/Windows.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. 2 | 3 | // Ported from um/winnt.h in the Windows SDK for Windows 10.0.20348.0 4 | // Original source is Copyright © Microsoft. All rights reserved. 5 | 6 | namespace ComputeSharp.Win32; 7 | 8 | internal static partial class Windows 9 | { 10 | [NativeTypeName("#define GENERIC_READ (0x80000000L)")] 11 | public const uint GENERIC_READ = (0x80000000); 12 | 13 | [NativeTypeName("#define GENERIC_WRITE (0x40000000L)")] 14 | public const int GENERIC_WRITE = (0x40000000); 15 | } -------------------------------------------------------------------------------- /src/ComputeSharp.WinUI/README.md: -------------------------------------------------------------------------------- 1 | ![ComputeSharp cover image](https://user-images.githubusercontent.com/10199417/108635546-3512ea00-7480-11eb-8172-99bc59f4eb6f.png) 2 | 3 | # Overview 📖 4 | 5 | **ComputeSharp.WinUI** is a WinUI 3 library with controls to render DX12 shaders powered by **ComputeSharp**. 6 | 7 | # There's more! 8 | 9 | For a complete list of all features available in **ComputeSharp**, check the documentation in the [GitHub repo](https://github.com/Sergio0694/ComputeSharp). -------------------------------------------------------------------------------- /src/ComputeSharp/Graphics/DeviceLostEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ComputeSharp; 4 | 5 | /// 6 | /// The arguments for the event. 7 | /// 8 | public sealed class DeviceLostEventArgs : EventArgs 9 | { 10 | /// 11 | /// Creates a new instance with the specified arguments. 12 | /// 13 | /// The value for the event. 14 | internal DeviceLostEventArgs(DeviceLostReason reason) 15 | { 16 | Reason = reason; 17 | } 18 | 19 | /// 20 | /// Gets the reason that caused the device to be lost. 21 | /// 22 | public DeviceLostReason Reason { get; } 23 | } -------------------------------------------------------------------------------- /src/ComputeSharp/Graphics/Resources/Debug/TransferTexture1DDebugView{T}.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | 3 | namespace ComputeSharp.Resources.Debug; 4 | 5 | /// 6 | /// A debug proxy used to display items in a instance. 7 | /// 8 | /// The type of items to display. 9 | /// The input instance with the items to display. 10 | internal sealed class TransferTexture1DDebugView(TransferTexture1D? texture) 11 | where T : unmanaged 12 | { 13 | /// 14 | /// Gets the items to display for the current instance. 15 | /// 16 | [DebuggerBrowsable(DebuggerBrowsableState.Collapsed)] 17 | public T[]? Items { get; } = texture?.Span.ToArray(); 18 | } -------------------------------------------------------------------------------- /src/ComputeSharp/Graphics/Resources/Debug/TransferTexture2DDebugView{T}.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | 3 | namespace ComputeSharp.Resources.Debug; 4 | 5 | /// 6 | /// A debug proxy used to display items in a instance. 7 | /// 8 | /// The type of items to display. 9 | /// The input instance with the items to display. 10 | internal sealed class TransferTexture2DDebugView(TransferTexture2D? texture) 11 | where T : unmanaged 12 | { 13 | /// 14 | /// Gets the items to display for the current instance. 15 | /// 16 | [DebuggerBrowsable(DebuggerBrowsableState.Collapsed)] 17 | public T[,]? Items { get; } = texture?.View.ToArray(); 18 | } -------------------------------------------------------------------------------- /src/ComputeSharp/Graphics/Resources/Enums/AllocationMode.cs: -------------------------------------------------------------------------------- 1 | namespace ComputeSharp; 2 | 3 | /// 4 | /// An that indicates a mode to use when allocating resources. 5 | /// 6 | public enum AllocationMode 7 | { 8 | /// 9 | /// The default allocation mode for graphics resources. Allocated buffers are not explicitly cleared when created. 10 | /// They can still be cleared for security reasons in some situations, but this step will be skipped whenever possible. 11 | /// As such, always make sure not to read directly to buffers created this way before writing data to them first. 12 | /// 13 | Default, 14 | 15 | /// 16 | /// Clear allocated buffers when creating them. 17 | /// 18 | Clear 19 | } -------------------------------------------------------------------------------- /src/ComputeSharp/Graphics/Resources/Enums/ResourceState.cs: -------------------------------------------------------------------------------- 1 | namespace ComputeSharp; 2 | 3 | /// 4 | /// An that indicates the state of a resource after a given transition. 5 | /// 6 | public enum ResourceState 7 | { 8 | /// 9 | /// A readonly resource, that can only be read from by the GPU and supports texture sampling. 10 | /// 11 | ReadOnly, 12 | 13 | /// 14 | /// A read write resource, with both read and write access for the GPU, but without support for texture sampling. 15 | /// 16 | ReadWrite 17 | } -------------------------------------------------------------------------------- /src/ComputeSharp/Graphics/Resources/Interfaces/IGraphicsResource.cs: -------------------------------------------------------------------------------- 1 | namespace ComputeSharp; 2 | 3 | /// 4 | /// An interface representing a graphics resource associated to a given instance. 5 | /// 6 | public interface IGraphicsResource 7 | { 8 | /// 9 | /// Gets the instance associated with the current resource. 10 | /// 11 | GraphicsDevice GraphicsDevice { get; } 12 | } -------------------------------------------------------------------------------- /src/ComputeSharp/Interfaces/Descriptors/IConstantBufferLoader.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ComputeSharp.Descriptors; 4 | 5 | /// 6 | /// A type representing a data loader for the constant buffer of a compute shader. 7 | /// 8 | public interface IConstantBufferLoader 9 | { 10 | /// 11 | /// Loads the constant buffer of a compute shader. 12 | /// 13 | /// The constant buffer for the compute shader (the size must be a multiple of the size of a DWORD value). 14 | /// Thrown if the size of is not a multiple of the size of a DWORD value). 15 | void LoadConstantBuffer(ReadOnlySpan data); 16 | } -------------------------------------------------------------------------------- /src/ComputeSharp/Interfaces/IComputeShader.cs: -------------------------------------------------------------------------------- 1 | namespace ComputeSharp; 2 | 3 | /// 4 | /// An representing a compute shader. 5 | /// 6 | public interface IComputeShader 7 | { 8 | /// 9 | /// Executes the current compute shader. 10 | /// 11 | void Execute(); 12 | } -------------------------------------------------------------------------------- /src/ComputeSharp/Interfaces/IComputeShader{TPixel}.cs: -------------------------------------------------------------------------------- 1 | namespace ComputeSharp; 2 | 3 | /// 4 | /// An representing a compute shader writing into a target texture. 5 | /// 6 | /// The type of pixels being written by the compute shader. 7 | /// 8 | /// This interface allows implementing logic analogous of pixel shaders, but via compute shaders. 9 | /// 10 | public interface IComputeShader 11 | where TPixel : unmanaged 12 | { 13 | /// 14 | /// Executes the current compute shader. 15 | /// 16 | /// The pixel value for the current invocation. 17 | TPixel Execute(); 18 | } -------------------------------------------------------------------------------- /tests/.editorconfig: -------------------------------------------------------------------------------- 1 | # C# files 2 | [*.cs] 3 | 4 | # Disable fields naming rule violation warnings just for unit tests 5 | dotnet_naming_rule.private_fields_must_be_pascal_case.severity = none 6 | dotnet_naming_rule.constant_fields_must_be_pascal_case.severity = none 7 | dotnet_naming_rule.static_readonly_fields_must_be_pascal_case.severity = none 8 | dotnet_naming_rule.non_private_fields_must_be_pascal_case.severity = none -------------------------------------------------------------------------------- /tests/ComputeSharp.D2D1.Tests.AssemblyLevelAttributes/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using ComputeSharp.D2D1; 2 | 3 | [assembly: D2DShaderProfile(D2D1ShaderProfile.PixelShader41)] 4 | [assembly: D2DCompileOptions(D2D1CompileOptions.IeeeStrictness | D2D1CompileOptions.OptimizationLevel2 | D2D1CompileOptions.PartialPrecision)] -------------------------------------------------------------------------------- /tests/ComputeSharp.D2D1.Tests/Assets/ContouredLayers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.D2D1.Tests/Assets/ContouredLayers.png -------------------------------------------------------------------------------- /tests/ComputeSharp.D2D1.Tests/Assets/Green32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.D2D1.Tests/Assets/Green32x32.png -------------------------------------------------------------------------------- /tests/ComputeSharp.D2D1.Tests/Assets/Landscape.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.D2D1.Tests/Assets/Landscape.png -------------------------------------------------------------------------------- /tests/ComputeSharp.D2D1.Tests/Assets/Landscape_CheckerboardClip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.D2D1.Tests/Assets/Landscape_CheckerboardClip.png -------------------------------------------------------------------------------- /tests/ComputeSharp.D2D1.Tests/Assets/Landscape_Inverted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.D2D1.Tests/Assets/Landscape_Inverted.png -------------------------------------------------------------------------------- /tests/ComputeSharp.D2D1.Tests/Assets/Landscape_Pixelate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.D2D1.Tests/Assets/Landscape_Pixelate.png -------------------------------------------------------------------------------- /tests/ComputeSharp.D2D1.Tests/Assets/PyramidPattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.D2D1.Tests/Assets/PyramidPattern.png -------------------------------------------------------------------------------- /tests/ComputeSharp.D2D1.Tests/Assets/RadialFadeOut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.D2D1.Tests/Assets/RadialFadeOut.png -------------------------------------------------------------------------------- /tests/ComputeSharp.D2D1.Tests/Assets/TerracedHills.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.D2D1.Tests/Assets/TerracedHills.png -------------------------------------------------------------------------------- /tests/ComputeSharp.D2D1.Tests/Assets/TriangleGridContouring.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.D2D1.Tests/Assets/TriangleGridContouring.png -------------------------------------------------------------------------------- /tests/ComputeSharp.D2D1.Tests/Assets/TwoTiledTruchet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.D2D1.Tests/Assets/TwoTiledTruchet.png -------------------------------------------------------------------------------- /tests/ComputeSharp.D2D1.Tests/Assets/Wallpaper0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.D2D1.Tests/Assets/Wallpaper0.png -------------------------------------------------------------------------------- /tests/ComputeSharp.D2D1.Tests/Assets/Wallpaper1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.D2D1.Tests/Assets/Wallpaper1.png -------------------------------------------------------------------------------- /tests/ComputeSharp.D2D1.Tests/Assets/WallpapersStack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.D2D1.Tests/Assets/WallpapersStack.png -------------------------------------------------------------------------------- /tests/ComputeSharp.D2D1.Tests/Assets/ZonePlate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.D2D1.Tests/Assets/ZonePlate.png -------------------------------------------------------------------------------- /tests/ComputeSharp.D2D1.Tests/Effects/InvertEffect.cs: -------------------------------------------------------------------------------- 1 | namespace ComputeSharp.D2D1.Tests.Effects; 2 | 3 | [D2DInputCount(1)] 4 | [D2DInputSimple(0)] 5 | [D2DShaderProfile(D2D1ShaderProfile.PixelShader50)] 6 | [D2DGeneratedPixelShaderDescriptor] 7 | public partial struct InvertEffect : ID2D1PixelShader 8 | { 9 | /// 10 | public float4 Execute() 11 | { 12 | float4 color = D2D.GetInput(0); 13 | float3 rgb = Hlsl.Saturate(1.0f - color.RGB); 14 | 15 | return new(rgb, 1); 16 | } 17 | } -------------------------------------------------------------------------------- /tests/ComputeSharp.D2D1.Tests/Effects/InvertWithThresholdEffect.cs: -------------------------------------------------------------------------------- 1 | namespace ComputeSharp.D2D1.Tests.Effects; 2 | 3 | [D2DInputCount(1)] 4 | [D2DInputSimple(0)] 5 | [D2DShaderProfile(D2D1ShaderProfile.PixelShader50)] 6 | [D2DGeneratedPixelShaderDescriptor] 7 | public readonly partial struct InvertWithThresholdEffect(float number) : ID2D1PixelShader 8 | { 9 | /// 10 | public float4 Execute() 11 | { 12 | float4 color = D2D.GetInput(0); 13 | float3 rgb = Hlsl.Saturate(number - color.RGB); 14 | 15 | return new(rgb, 1); 16 | } 17 | } -------------------------------------------------------------------------------- /tests/ComputeSharp.D2D1.WinUI.Tests/App.xaml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/ComputeSharp.D2D1.WinUI.Tests/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.UI.Xaml; 3 | using Microsoft.VisualStudio.TestPlatform.TestExecutor; 4 | 5 | namespace ComputeSharp.D2D1.WinUI.Tests; 6 | 7 | /// 8 | /// Provides application-specific behavior to supplement the default Application class. 9 | /// 10 | public partial class App : Application 11 | { 12 | /// 13 | /// Creates a new instance. 14 | /// 15 | public App() 16 | { 17 | InitializeComponent(); 18 | } 19 | 20 | /// 21 | protected override void OnLaunched(LaunchActivatedEventArgs args) 22 | { 23 | UnitTestClient.Run(Environment.CommandLine); 24 | } 25 | } -------------------------------------------------------------------------------- /tests/ComputeSharp.D2D1.WinUI.Tests/Assets/LockScreenLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.D2D1.WinUI.Tests/Assets/LockScreenLogo.scale-200.png -------------------------------------------------------------------------------- /tests/ComputeSharp.D2D1.WinUI.Tests/Assets/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.D2D1.WinUI.Tests/Assets/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /tests/ComputeSharp.D2D1.WinUI.Tests/Assets/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.D2D1.WinUI.Tests/Assets/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /tests/ComputeSharp.D2D1.WinUI.Tests/Assets/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.D2D1.WinUI.Tests/Assets/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /tests/ComputeSharp.D2D1.WinUI.Tests/Assets/Square44x44Logo.targetsize-24_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.D2D1.WinUI.Tests/Assets/Square44x44Logo.targetsize-24_altform-unplated.png -------------------------------------------------------------------------------- /tests/ComputeSharp.D2D1.WinUI.Tests/Assets/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.D2D1.WinUI.Tests/Assets/StoreLogo.png -------------------------------------------------------------------------------- /tests/ComputeSharp.D2D1.WinUI.Tests/Assets/Wide310x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.D2D1.WinUI.Tests/Assets/Wide310x150Logo.scale-200.png -------------------------------------------------------------------------------- /tests/ComputeSharp.D2D1.WinUI.Tests/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "ComputeSharp.D2D1.WinUI.Tests (Package)": { 4 | "commandName": "MsixPackage" 5 | }, 6 | "ComputeSharp.D2D1.WinUI.Tests (Unpackaged)": { 7 | "commandName": "Project" 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /tests/ComputeSharp.NuGet/ComputeSharp.NuGet.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | Exe 4 | net8.0 5 | true 6 | $(NoWarn);IL2026 7 | true 8 | 9 | https://api.nuget.org/v3/index.json; 10 | ..\..\artifacts; 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /tests/ComputeSharp.Tests.DeviceLost/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | 3 | [assembly: DoNotParallelize] -------------------------------------------------------------------------------- /tests/ComputeSharp.Tests.NativeLibrariesResolver/ComputeSharp.Tests.NativeLibrariesResolver.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | net8.0 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /tests/ComputeSharp.Tests.NativeLibrariesResolver/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | 3 | [assembly: DoNotParallelize] -------------------------------------------------------------------------------- /tests/ComputeSharp.Tests/Assets/CityAfter1024x1024Sampling.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.Tests/Assets/CityAfter1024x1024Sampling.png -------------------------------------------------------------------------------- /tests/ComputeSharp.Tests/Assets/CityAfter1024x1024SamplingAndDashing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.Tests/Assets/CityAfter1024x1024SamplingAndDashing.png -------------------------------------------------------------------------------- /tests/ComputeSharp.Tests/Assets/CityAfter1024x1024SamplingFrom1920x1080.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.Tests/Assets/CityAfter1024x1024SamplingFrom1920x1080.png -------------------------------------------------------------------------------- /tests/ComputeSharp.Tests/Assets/CityAfter1024x1024SamplingFrom1920x1080AndDashing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.Tests/Assets/CityAfter1024x1024SamplingFrom1920x1080AndDashing.png -------------------------------------------------------------------------------- /tests/ComputeSharp.Tests/Assets/CityAfter1024x1024SamplingInverted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.Tests/Assets/CityAfter1024x1024SamplingInverted.png -------------------------------------------------------------------------------- /tests/ComputeSharp.Tests/Assets/CityWith1920x1280Resizing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.Tests/Assets/CityWith1920x1280Resizing.png -------------------------------------------------------------------------------- /tests/ComputeSharp.Tests/Assets/ColorfulInfinity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.Tests/Assets/ColorfulInfinity.png -------------------------------------------------------------------------------- /tests/ComputeSharp.Tests/Assets/ContouredLayers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.Tests/Assets/ContouredLayers.png -------------------------------------------------------------------------------- /tests/ComputeSharp.Tests/Assets/ExtrudedTruchetPattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.Tests/Assets/ExtrudedTruchetPattern.png -------------------------------------------------------------------------------- /tests/ComputeSharp.Tests/Assets/FourColorGradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.Tests/Assets/FourColorGradient.png -------------------------------------------------------------------------------- /tests/ComputeSharp.Tests/Assets/FractalTiling.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.Tests/Assets/FractalTiling.png -------------------------------------------------------------------------------- /tests/ComputeSharp.Tests/Assets/HelloWorld.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.Tests/Assets/HelloWorld.png -------------------------------------------------------------------------------- /tests/ComputeSharp.Tests/Assets/MengerJourney.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.Tests/Assets/MengerJourney.png -------------------------------------------------------------------------------- /tests/ComputeSharp.Tests/Assets/Octagrams.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.Tests/Assets/Octagrams.png -------------------------------------------------------------------------------- /tests/ComputeSharp.Tests/Assets/ProteanClouds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.Tests/Assets/ProteanClouds.png -------------------------------------------------------------------------------- /tests/ComputeSharp.Tests/Assets/PyramidPattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.Tests/Assets/PyramidPattern.png -------------------------------------------------------------------------------- /tests/ComputeSharp.Tests/Assets/TerracedHills.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.Tests/Assets/TerracedHills.png -------------------------------------------------------------------------------- /tests/ComputeSharp.Tests/Assets/TriangleGridContouring.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.Tests/Assets/TriangleGridContouring.png -------------------------------------------------------------------------------- /tests/ComputeSharp.Tests/Assets/TwoTiledTruchet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sergio0694/ComputeSharp/9a7c9e0c755bf68447f7293e5729547750fe6be3/tests/ComputeSharp.Tests/Assets/TwoTiledTruchet.png -------------------------------------------------------------------------------- /tests/ComputeSharp.Tests/Attributes/AdditionalDataAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ComputeSharp.Tests.Attributes; 4 | 5 | /// 6 | /// An attribute to use with adding additional arbitrary input data. 7 | /// 8 | /// The additional input data. 9 | [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] 10 | public sealed class AdditionalDataAttribute(params object[] data) : Attribute 11 | { 12 | /// 13 | /// Gets the additional input data for the current attribute. 14 | /// 15 | public object[] Data { get; } = data; 16 | } -------------------------------------------------------------------------------- /tests/ComputeSharp.Tests/Attributes/AdditionalResourceAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ComputeSharp.Tests.Attributes; 4 | 5 | /// 6 | /// An attribute to use with targeting an additional specific resource type. 7 | /// 8 | /// The additional resource type. 9 | [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] 10 | public sealed class AdditionalResourceAttribute(Type type) : Attribute 11 | { 12 | /// 13 | /// Gets the additional resource type for the current attribute. 14 | /// 15 | public Type Type { get; } = type; 16 | } -------------------------------------------------------------------------------- /tests/ComputeSharp.Tests/Attributes/AllDevicesAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ComputeSharp.Tests.Attributes; 4 | 5 | /// 6 | /// An attribute to use with targeting all supported devices. 7 | /// 8 | [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] 9 | public sealed class AllDevicesAttribute : Attribute; -------------------------------------------------------------------------------- /tests/ComputeSharp.Tests/Attributes/DataAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ComputeSharp.Tests.Attributes; 4 | 5 | /// 6 | /// An attribute to use with adding arbitrary input data. 7 | /// 8 | /// The input data. 9 | [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] 10 | public sealed class DataAttribute(params object[] data) : Attribute 11 | { 12 | /// 13 | /// Gets the input data for the current attribute. 14 | /// 15 | public object[] Data { get; } = data; 16 | } -------------------------------------------------------------------------------- /tests/ComputeSharp.Tests/Attributes/DeviceAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ComputeSharp.Tests.Extensions; 3 | 4 | namespace ComputeSharp.Tests.Attributes; 5 | 6 | /// 7 | /// An attribute to use with adding a specific input. 8 | /// 9 | /// The target device type to use.. 10 | [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] 11 | public sealed class DeviceAttribute(Device device) : Attribute 12 | { 13 | /// 14 | /// Gets the target to use. 15 | /// 16 | public Device Device { get; } = device; 17 | } -------------------------------------------------------------------------------- /tests/ComputeSharp.Tests/Attributes/ResourceAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ComputeSharp.Tests.Attributes; 4 | 5 | /// 6 | /// An attribute to use with targeting a specific resource type. 7 | /// 8 | /// The resource type. 9 | [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] 10 | public sealed class ResourceAttribute(Type type) : Attribute 11 | { 12 | /// 13 | /// Gets the resource type for the current attribute. 14 | /// 15 | public Type Type { get; } = type; 16 | } -------------------------------------------------------------------------------- /tests/ComputeSharp.Tests/Misc/ExternalStructType.cs: -------------------------------------------------------------------------------- 1 | namespace ComputeSharp.Tests.Misc; 2 | 3 | /// 4 | /// An internal custom struct used to test semantic model information coming from different files (different syntax trees). 5 | /// 6 | internal struct ExternalStructType 7 | { 8 | public int A; 9 | public float B; 10 | 11 | public static ExternalStructType New(int a, float b) 12 | { 13 | ExternalStructType value; 14 | value.A = a; 15 | value.B = b; 16 | 17 | return value; 18 | } 19 | 20 | public static float Sum(ExternalStructType value) 21 | { 22 | return value.A + value.B; 23 | } 24 | } -------------------------------------------------------------------------------- /tests/ComputeSharp.Tests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | 3 | [assembly: DoNotParallelize] -------------------------------------------------------------------------------- /tests/Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | false 8 | 9 | 10 | $(NoWarn);CS1591 11 | 12 | 13 | $(NoWarn);CA1416 14 | 15 | 16 | $(NoWarn);IDE0251 17 | 18 | 19 | $(NoWarn);WMC1006 20 | 21 | -------------------------------------------------------------------------------- /tests/Directory.Build.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | --------------------------------------------------------------------------------