3.0.0
ComputeSharp 3.0 is now live! 🚀
This new major release includes completely revamped source generators for both DX12 and D2D1, featuring major performance improvements, and lots of new analyers. It also brings full .NET 8 support (with AOT!), much improved and more extensible APIs for shader dispatching, new helpers, more configuration options for shaders (eg. the ability to disable double precision support), and more!
What's Changed
- Add [D2DEffectId] and [D2DEffectDisplayName] by @Sergio0694 in #560
- Add [D2DEffectAuthor], [D2DEffectCategory] and [D2DEffectDescription] by @Sergio0694 in #566
- Simplify HasAccessibleTypeWithMetadataName by @Sergio0694 in #563
- Don't fail the CI on STATUS_CONTROL_C_EXIT errors by @Sergio0694 in #567
- Require for D2D1 source generator by @Sergio0694 in #568
- Remove language checks for C# 11 by @Sergio0694 in #569
- Generate D2D1 input types as file local ReadOnlyMemory by @Sergio0694 in #570
- Generate D2D1 input descriptions as file local ReadOnlyMemory by @Sergio0694 in #571
- Generate D2D1 resource texture descriptions as file local ReadOnlyMemory by @Sergio0694 in #572
- Switch all D2D1 interface methods (except bytecode) to properties by @Sergio0694 in #573
- Generate constant buffer layout type for marshalling by @Sergio0694 in #574
- Don't fail the CI if pushing to Azure fails by @Sergio0694 in #576
- Always assume [SkipLocalsInit] can be used in generator by @Sergio0694 in #575
- Switch HLSL bytecode, shader profile and compile options to properties by @Sergio0694 in #577
- Unify D2D1 source generator logic and emit a single file by @Sergio0694 in #578
- Add DynamicCache<,> type to cache HLSL bytecode results by @Sergio0694 in #579
- Switch D2D1 generator to use indented text writer by @Sergio0694 in #580
- Add new numeric properties to ID2D1Shader by @Sergio0694 in #581
- Refactor interface and introduce new ID2D1PixelShaderDescriptor by @Sergio0694 in #582
- Remove matrix types row accessors for generated code by @Sergio0694 in #583
- Add D2D1PixelShader.CreateFromConstantBuffer() APIs by @Sergio0694 in #584
- Unify effect XML building logic, optimize on .NET 6 by @Sergio0694 in #585
- Only declare valid resource texture manager properties in effect XML by @Sergio0694 in #586
- Add [D2DGeneratedPixelShaderDescriptor] attribute and use FAWMN by @Sergio0694 in #587
- Fix handling partial record struct types, add test by @Sergio0694 in #589
- Rewrite D2DPixelShaderSourceGenerator to be simpler and faster by @Sergio0694 in #590
- Minor refactoring, remove unnecessary code by @Sergio0694 in #591
- Refactor global state for built-in pixel shader effects by @Sergio0694 in #592
- Reduce rooted metadata due to reflection by @Sergio0694 in #594
- Fix possible deadlock in ResourceTextureManager.Update by @Sergio0694 in #595
- Tweak ComPtr extensions, fix IsSameInstance bug by @Sergio0694 in #596
- Obsolete APIs to remove, bump package version by @Sergio0694 in #597
- Use ImmutableArrayBuilder to create HLSL source by @Sergio0694 in #599
- Optimize InputTypes memory manager for downlevel TFMs by @Sergio0694 in #600
- Remove UWP support by @Sergio0694 in #602
- Always assume [SkipLocalsInit] is available in DX12 generator by @Sergio0694 in #601
- Remove UWP sample app by @Sergio0694 in #603
- Remove .NET Standard 2.0 support by @Sergio0694 in #604
- Remove multi-targeting, only use one .NET TFM per project by @Sergio0694 in #605
- Use string literal in global using directives generator by @Sergio0694 in #606
- Centralize defines for SOURCE_GENERATOR by @Sergio0694 in #607
- Switch to TerraFX.Interop.Windows in unit tests by @Sergio0694 in #608
- Remove TerraFX.Interop.Windows.Dynamic project by @Sergio0694 in #609
- Remove redundant ComPtr extensions by @Sergio0694 in #610
- Refactor Win32 bindings by @Sergio0694 in #611
- Remove shader metaprogramming and dynamic compilation (DX12) by @Sergio0694 in #613
- Rewrite D3D12 generator to use indented writer, dynamic cache, unified pipeline by @Sergio0694 in #614
- Tweak IShader, add HlslBytecode and [NumThreads] properties by @Sergio0694 in #615
- Improve D3D12 generator and IShader public API by @Sergio0694 in #617
- Rework IShader APIs to load constant buffer and resources by @Sergio0694 in #618
- Add IComputeShaderDescriptor interface by @Sergio0694 in #619
- Add [GeneratedComputeShaderDescriptor] for D3D12 shaders by @Sergio0694 in #620
- Shader FieldInfo model across D2D1/D3D12 generators by @Sergio0694 in #621
- Remove shader compilation from reflection services, rename Dynamic library by @Sergio0694 in #622
- Switch to CsWin32 for DXC APIs in D3D12 generator by @Sergio0694 in #623
- Switch to CsWin32 for DXC APIs in D2D1 generator by @Sergio0694 in #624
- Remove ComputeSharp.NetStandard polyfill project by @Sergio0694 in #625
- Centralize native libs to cleanup solution explorer by @Sergio0694 in #626
- Update ImageSharp from 2.1.4 to 3.0.2 by @Sergio0694 in #627
- Use local D3D12 bindings for ComputeSharp by @Sergio0694 in #612
- Remove conditional .NET Standard 2.0 paths by @Sergio0694 in #628
- Update all TFMs to .NET 7 by @Sergio0694 in #629
- Leverage static abstracts in interfaces in all descriptor interfaces by @Sergio0694 in #630
- Add analyzers for shader types being less accessible than internal by @Sergio0694 in #631
- Generate [DisableRuntimeMarshalling] in all projects by @Sergio0694 in #632
- Add analyzers for shader fields of types being less accessible than internal by @Sergio0694 in #633
- Update NuGet packages and release version by @Sergio0694 in #634
- Apply some code tweaks to make analysis happy by @Sergio0694 in #635
- Skip CI workflow for draft PRs and PRs from this repository by @Sergio0694 in #636
- Fix duplicate diagnostic titles, use target-typed new() by @Sergio0694 in #637
- Improve throw path in ReferenceTracker by @Sergio0694 in #644
- Remove some leftover Win32 bindings by @Sergio0694 in #645
- Switch all TFMs to .NET 8 and enable C# 12 by @Sergio0694 in #649
- Support primary constructor parameters for D2D shaders by @Sergio0694 in #650
- Support primary constructor parameters for DX12 shaders by @Sergio0694 in #651
- Support primary constructor parameters for DX12 shader resources by @Sergio0694 in #652
- Use primary constructors and collection expressions by @Sergio0694 in #653
- Use collection expressions in generated code by @Sergio0694 in #654
- Use [InlineArray] where applicable by @Sergio0694 in #655
- Use ComPtr in all fields of native objects by @Sergio0694 in #656
- Use ImmutableCollectionsMarshal for fast ImmutableArray creation by @Sergio0694 in #657
- Use more static abstracts directly instead of helper methods by @Sergio0694 in #643
- Add diagnostic for invalid linking D2D compile option by @Sergio0694 in #638
- Update DXC compiler to August 2023 release by @Sergio0694 in #639
- Add [CompileOptions] attribute for DX12 shaders by @Sergio0694 in #658
- Remove unnecessary CS0649 suppressions by @Sergio0694 in #642
- Rename [EmbeddedBytecode] attribute by @Sergio0694 in #641
- Fix handling of suppressed D2D compilation warnings by @Sergio0694 in #648
- Add native library sample by @Sergio0694 in #659
- Remove unnecessary -c Release options from CI script by @Sergio0694 in #660
- Update Win2D dependency, remove RID graph workaround by @Sergio0694 in #662
- Update NuGet packages to latest stable by @Sergio0694 in #664
- Fix XML docs in generated unsafe accessors by @Sergio0694 in #665
- Tweak source generators, add full output tests by @Sergio0694 in #666
- Enable publishing Win2D sample on arm64 too by @Sergio0694 in #667
- Remove some leftover binding types by @Sergio0694 in #668
- Replace all typeof(T).GUID uses with RVA fields by @Sergio0694 in #669
- Remove some leftover binding constants/IIDs by @Sergio0694 in #670
- Replace [AutoConstructor] with primary constructors in samples by @Sergio0694 in #671
- Add new analyzers to warn on not readonly shader types by @Sergio0694 in #672
- Remove [AutoConstructor] attribute and generator by @Sergio0694 in #673
- Add [GloballyCoherent] attribute for UAV buffers by @Sergio0694 in #675
- Add InvalidGroupSharedFieldDeclarationAnalyzer by @Sergio0694 in #676
- Intercept publish samples insta-crashing on launch by @Sergio0694 in #677
- Add README files for all NuGet packages by @Sergio0694 in #678
- Refactor file organizations across projects by @Sergio0694 in #679
- Set AccelerateBuildsInVisualStudio in .props by @Sergio0694 in #680
- Use more collection expressions in samples and tests by @Sergio0694 in #681
- Unify more HLSL rewriting logic by @Sergio0694 in #682
- Use [MemberFunction] callconv in native bindings by @Sergio0694 in #674
- Update NuGet packages info by @Sergio0694 in #683
- Fix analyzer for missing shader descriptors when manually implemented by @Sergio0694 in #685
- Detect and warn on annotated generic shader types by @Sergio0694 in #686
- Correctly rewrite ref readonly parameters in HLSL by @Sergio0694 in #687
- Add XML remarks to document RDP specific behavior by @Sergio0694 in #689
- Correctly handle and error on initializer expressions and collection expressions by @Sergio0694 in #691
- Handle partial members in shader types by @Sergio0694 in #693
- Move MultipleShaderTypesImplemented diagnostic to analyzer by @Sergio0694 in #694
- Check for cancellation while doing HLSL rewriting by @Sergio0694 in #695
- Flow cancellation token to SyntaxReference.GetSyntax() calls by @Sergio0694 in #696
- Use IsTargetFrameworkCompatible instead of StartsWith by @Sergio0694 in #697
- More source generator tweaks by @Sergio0694 in #698
- Add support for constructors in DX12 and D2D1 shaders by @Sergio0694 in #699
- Add and leverage ImmutableArrayBuilder.AsEnumerable() by @Sergio0694 in #700
- Check for cancellation during HLSL rewriting by @Sergio0694 in #701
- Keep original identifiers for instance methods by @Sergio0694 in #702
- Remove unnecessary symbol in [GroupShared] analyzer by @Sergio0694 in #704
- Add diagnostics for invalid 'this' expressions by @Sergio0694 in #705
- Implement full support for static fields by @Sergio0694 in #703
- Flow cancellation token to all semantics operations by @Sergio0694 in #706
- Add D2D1CompileOptions.StripReflectionData flag by @Sergio0694 in #707
- Tweak unit test files by @Sergio0694 in #708
- Optimize HLSL type lookups in generators, refactor code by @Sergio0694 in #709
- Skip generating unnecessary using for constant buffer by @Sergio0694 in #710
- Remove VectorN/Math/MatF HLSL projections by @Sergio0694 in #711
- Remove .NET vector types projections, add Matrix3x2/Matrix4x4 implicit conversions by @Sergio0694 in #712
- Switch HLSL writing to IndentedTextWriter by @Sergio0694 in #713
- Use global aliases to simplify HLSL generation code by @Sergio0694 in #714
- Use forward declarations for user types and all methods by @Sergio0694 in #716
- Handle recursive members in HLSL rewriting by @Sergio0694 in #717
- Refactor D2DTransformMapper APIs by @Sergio0694 in #715
- Avoid rooting IUnknown metadata info by @Sergio0694 in #718
- Use stackalloc to marshal constant buffer if possible by @Sergio0694 in #719
- Add [D2DEnableRuntimeCompilation] and analyzers by @Sergio0694 in #720
- Add [D2DRequiresDoublePrecisionSupport] attribute by @Sergio0694 in #721
- Add [RequiresDoublePrecisionSupport] attribute by @Sergio0694 in #722
- Check cancellation for D2D linked shaders, share code by @Sergio0694 in #723
- Remove leftover syntax factory helpers by @Sergio0694 in #724
- Fix invalid HLSL for shader methods using custom types in signatures by @Sergio0694 in #728
- Support 'this.' expressions within custom types by @Sergio0694 in #729
- Fix support for ComputeSharp.Bool shader fields by @Sergio0694 in #730
- Update NuGet packages to latest stable by @Sergio0694 in #731
- Centralize and cleanup NoWarn properties by @Sergio0694 in #732
- Remove header from generated HLSL sources by @Sergio0694 in #733
- Centralize source generator testing logic by @Sergio0694 in #734
- Fix whitespace formatting in all T4 files by @Sergio0694 in #737
- Fix whitespace formatting in all T4 files (take 2) by @Sergio0694 in #739
- Add all combinatorial constructors for HLSL vector types by @Sergio0694 in #740
- Move all possible HLSL vector type operators to T4 generation by @Sergio0694 in #741
- Add incrementality unit tests for DX12 and D2D generators by @Sergio0694 in #742
- Add nuget.config file by @Sergio0694 in #743
- Add cast operators for all HLSL matrix types by @Sergio0694 in #745
- Add Hlsl.ConditionalSelect intrinsics by @Sergio0694 in #746
- Add Hlsl.And and Hlsl.Or intrinsics by @Sergio0694 in #747
- Update TerraFX.Interop.* dependencies to latest stable by @Sergio0694 in #744
- Refactor and optimize D2D resource texture diagnostics by @Sergio0694 in #748
- Use Encoding polyfills in CreateDefaultEffectId by @Sergio0694 in #749
- Move D2D shader compile options diagnostics to analyzer by @Sergio0694 in #751
- Use 'ref readonly' where applicable by @Sergio0694 in #750
- Move D2D constant buffer size diagnostics to analyzer by @Sergio0694 in #752
- Move D2D input descriptions diagnostics to analyzer by @Sergio0694 in #753
- Update copyright year to 2024 by @Sergio0694 in #754
- Add D2DPixelShaderSourceGenerator incrementality tests by @Sergio0694 in #756
- Move D2D input count and types diagnostics to analyzer by @Sergio0694 in #755
- Move almost all [D2DPixelShaderSource] diagnostics to analyzers by @Sergio0694 in #757
- Move almost all [ComputeShaderDescriptor] diagnostics to analyzers by @Sergio0694 in #758
- Update NuGet packages and PIX to latest stable by @Sergio0694 in #761
- Avoid unnecessary QueryInterface for DX12 swapchain by @Sergio0694 in #762
- Update code style to fix build errors by @Sergio0694 in #766
- Update NuGet packages to latest stable by @Sergio0694 in #767
- Update NuGet packages to latest stable and fix code style by @Sergio0694 in #777
- Update all GitHub actions to latest stable by @Sergio0694 in #778
- Add 'faceforward' HLSL intrinsic by @Sergio0694 in #772
- Update NuGet packages to latest stable by @Sergio0694 in #789
- Update NuGet packages to latest stable by @Sergio0694 in #795
- Update NuGet packages to latest stable by @Sergio0694 in #798
- Rename 'CanvasEffect' APIs by @Sergio0694 in #796
- Remove unnecessary casts by @Sergio0694 in #803
- Remove unnecessary 'Unsafe.AsRef' calls by @Sergio0694 in #802
- Update NuGet packages to latest stable by @Sergio0694 in #801
- Always emit 'asfloat' for float literals in D2D shaders by @Sergio0694 in #805
- Don't rewrite 'ConstantBuffer.Length' by @Sergio0694 in #806
- Ensure padding data in D2D constant buffer is always zero-ed by @Sergio0694 in #809
- Minor tweaks to generated code by @Sergio0694 in #810
- Rework linking analyzer, remove generator heuristic, change D2D compile options by @Sergio0694 in #811
- Update all analyzer .targets files for 4.9 by @Sergio0694 in #812
Full Changelog: v2.1.0...v3.0.0