Skip to content

Commit b9b56b6

Browse files
committed
Drop .net8.0 support and add .net10.0 support, update vulkan headers to official Vulkan SDK v1.4.341.0
1 parent 3203560 commit b9b56b6

71 files changed

Lines changed: 13633 additions & 9607 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ jobs:
1818

1919
steps:
2020
- name: Checkout
21-
uses: actions/checkout@v4
21+
uses: actions/checkout@v6
2222

2323
- name: Setup .NET SDK
24-
uses: actions/setup-dotnet@v4
24+
uses: actions/setup-dotnet@v5
2525
with:
2626
global-json-file: ./global.json
2727

2828
- name: Pack
29-
run: dotnet pack Vortice.Vulkan.sln --configuration Release
29+
run: dotnet pack Vortice.Vulkan.slnx --configuration Release
3030

3131
- name: Publish to NuGet
3232
if: github.event_name == 'push'

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<PropertyGroup>
1414
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
1515
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
16-
<LangVersion>12.0</LangVersion>
16+
<LangVersion>14.0</LangVersion>
1717
<ImplicitUsings>enable</ImplicitUsings>
1818
<Nullable>enable</Nullable>
1919
<UseArtifactsOutput>true</UseArtifactsOutput>

Directory.Packages.props

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
<Project>
33
<!-- https://learn.microsoft.com/nuget/consume-packages/central-package-management -->
44
<ItemGroup>
5-
<PackageVersion Include="CppAst" Version="0.23.1" />
5+
<PackageVersion Include="CppAst" Version="0.24.0" />
66

7-
<PackageVersion Include="Silk.NET.Shaderc.Native" Version="2.22.0" />
7+
<PackageVersion Include="Silk.NET.Shaderc.Native" Version="2.23.0" />
88

99
<!-- Samples -->
10-
<PackageVersion Include="ppy.SDL3-CS" Version="2025.828.0" />
10+
<PackageVersion Include="ppy.SDL3-CS" Version="2025.1205.0" />
1111

1212
<!-- Tests -->
13-
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
14-
<PackageVersion Include="NUnit" Version="4.3.2" />
15-
<PackageVersion Include="NUnit3TestAdapter" Version="5.0.0" />
13+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
14+
<PackageVersion Include="NUnit" Version="4.4.0" />
15+
<PackageVersion Include="NUnit3TestAdapter" Version="6.01.0" />
1616
</ItemGroup>
1717

1818
</Project>

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/amerkoleci/Vortice.Vulkan/blob/main/LICENSE)
44
[![Build status](https://github.com/amerkoleci/Vortice.Vulkan/workflows/Build/badge.svg)](https://github.com/amerkoleci/Vortice.Vulkan/actions)
5-
[![Vulkan](https://img.shields.io/badge/vulkan-1.4.327.0-brightgreen.svg)](https://www.khronos.org/vulkan/)
5+
[![Vulkan](https://img.shields.io/badge/vulkan-1.4.341.0-brightgreen.svg)](https://www.khronos.org/vulkan/)
66
[![NuGet](https://img.shields.io/nuget/v/Vortice.Vulkan.svg)](https://www.nuget.org/packages/Vortice.Vulkan)
77

8-
**Vortice.Vulkan** is **.NET 8** and **.NET 9** low-level bindings for [Vulkan](https://www.khronos.org/vulkan/), [VulkanMemoryAllocator](https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator), [SPIRV-Cross](https://github.com/KhronosGroup/SPIRV-Cross) and [shaderc](https://github.com/google/shaderc).
8+
**Vortice.Vulkan** is **.NET 9** and **.NET 10** low-level bindings for [Vulkan](https://www.khronos.org/vulkan/), [VulkanMemoryAllocator](https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator), [SPIRV-Cross](https://github.com/KhronosGroup/SPIRV-Cross) and [shaderc](https://github.com/google/shaderc).
99

1010
## Sponsors
1111
To further help development of these bindings library or other projects, please consider [SPONSOR](https://github.com/sponsors/amerkoleci) my profile in order to allow faster issue triaging and new features to be implemented.

Vortice.Vulkan.sln

Lines changed: 0 additions & 132 deletions
This file was deleted.

Vortice.Vulkan.slnx

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<Solution>
2+
<Folder Name="/build/">
3+
<File Path=".editorconfig" />
4+
<File Path=".gitignore" />
5+
<File Path="Directory.Build.props" />
6+
<File Path="Directory.Build.targets" />
7+
<File Path="Directory.Packages.props" />
8+
<File Path="global.json" />
9+
<File Path="LICENSE" />
10+
<File Path="NuGet.config" />
11+
<File Path="README.md" />
12+
</Folder>
13+
<Folder Name="/samples/">
14+
<File Path="LICENSE" />
15+
<Project Path="src/samples/01-ClearScreen/01-ClearScreen.csproj" />
16+
<Project Path="src/samples/02-DrawTriangle/02-DrawTriangle.csproj" />
17+
<Project Path="src/samples/03-DrawTriangleVma/03-DrawTriangleVma.csproj" />
18+
<Project Path="src/samples/Vortice.Vulkan.SampleFramework/Vortice.Vulkan.SampleFramework.csproj" />
19+
</Folder>
20+
<Folder Name="/tests/">
21+
<Project Path="tests/Vortice.ShaderCompiler.Test/Vortice.ShaderCompiler.Test.csproj" />
22+
<Project Path="tests/Vortice.SPIRV.Reflect.Tests/Vortice.SPIRV.Reflect.Tests.csproj" />
23+
<Project Path="tests/Vortice.SpirvCross.Test/Vortice.SpirvCross.Test.csproj" />
24+
</Folder>
25+
<Project Path="src/Generator/Generator.csproj" />
26+
<Project Path="src/Vortice.ShaderCompiler/Vortice.ShaderCompiler.csproj" />
27+
<Project Path="src/Vortice.SPIRV.Reflect/Vortice.SPIRV.Reflect.csproj" />
28+
<Project Path="src/Vortice.SPIRV/Vortice.SPIRV.csproj" />
29+
<Project Path="src/Vortice.SpirvCross/Vortice.SpirvCross.csproj" />
30+
<Project Path="src/Vortice.Vulkan/Vortice.Vulkan.csproj" />
31+
<Project Path="src/Vortice.VulkanMemoryAllocator/Vortice.VulkanMemoryAllocator.csproj" />
32+
</Solution>

global.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"sdk": {
3-
"version": "9.0.301",
3+
"version": "10.0.100",
44
"rollForward": "latestFeature",
55
"allowPrerelease": false
66
}
7-
}
7+
}

src/Generator/CodeWriter.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,12 @@ public sealed class CodeWriter : IDisposable
1212

1313
public int IndentLevel { get; private set; }
1414

15-
public CodeWriter(string fileName, bool enableNullable, string? @namespace, string[] usingNamespaces, string? codeBeforeNamespace = default)
15+
public CodeWriter(string fileName,
16+
bool enableNullable,
17+
string? @namespace,
18+
string[] usingNamespaces,
19+
string? codeBeforeNamespace = default,
20+
string[]? staticUsings = default)
1621
{
1722
_indentStrings = new string[10];
1823
for (int i = 0; i < _indentStrings.Length; i++)
@@ -42,6 +47,14 @@ public CodeWriter(string fileName, bool enableNullable, string? @namespace, stri
4247
_writer.WriteLine($"using {ns};");
4348
}
4449

50+
if (staticUsings != null)
51+
{
52+
foreach (string ns in staticUsings)
53+
{
54+
_writer.WriteLine($"using static {ns};");
55+
}
56+
}
57+
4558
if (usingNamespaces.Length > 0)
4659
{
4760
_writer.WriteLine();

src/Generator/CsCodeGenerator.Enum.cs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ partial class CsCodeGenerator
145145
{ "VK_DIRECT_DRIVER_LOADING_MODE_INCLUSIVE_LUNARG", "Include" },
146146

147147
// VkMemoryDecompressionMethodFlagBitsNV
148-
{ "VK_MEMORY_DECOMPRESSION_METHOD_GDEFLATE_1_0_BIT_NV", "GDeflate_1_0" },
148+
{ "VK_MEMORY_DECOMPRESSION_METHOD_GDEFLATE_1_0_BIT_EXT", "GDeflate_1_0_EXT" },
149+
{ "VK_MEMORY_DECOMPRESSION_METHOD_GDEFLATE_1_0_BIT_NV", "GDeflate_1_0_NV" },
149150

150151
// VkDisplacementMicromapFormatNV
151152
{ "VK_DISPLACEMENT_MICROMAP_FORMAT_64_TRIANGLES_64_BYTES_NV", "_64Triangles64Bytes" },
@@ -598,6 +599,12 @@ public void GenerateEnums(CppCompilation compilation)
598599
continue;
599600
}
600601

602+
// Already mapped with VkMemoryDecompressionMethodFlagBitsEXT
603+
if (typedef.Name == "VkMemoryDecompressionMethodFlagsEXT")
604+
{
605+
continue;
606+
}
607+
601608
if (typedef.Name.EndsWith("Flags", StringComparison.OrdinalIgnoreCase)
602609
|| typedef.Name.EndsWith("FlagsKHR", StringComparison.OrdinalIgnoreCase)
603610
|| typedef.Name.EndsWith("FlagsEXT", StringComparison.OrdinalIgnoreCase)
@@ -685,6 +692,10 @@ public void GenerateEnums(CppCompilation compilation)
685692
{
686693
fieldType = fieldType.Replace("FlagBits3KHR", "Flags3KHR");
687694
}
695+
else if (fieldType.EndsWith("FlagBitsEXT"))
696+
{
697+
fieldType = fieldType.Replace("FlagBitsEXT", "FlagsEXT");
698+
}
688699

689700
writer.WriteLine("[Flags]");
690701
writer.BeginBlock($"public enum {fieldType} : {baseType}");
@@ -792,6 +803,10 @@ public void GenerateEnums(CppCompilation compilation)
792803
{
793804
cleanEnumName = cleanEnumName.Replace("FlagBits3KHR", "Flags3KHR");
794805
}
806+
else if (cleanEnumName.EndsWith("FlagBitsEXT"))
807+
{
808+
cleanEnumName = cleanEnumName.Replace("FlagBitsEXT", "FlagsEXT");
809+
}
795810

796811
s_enumConstants.Add($"{cleanEnumName} {cppField.Name} = {cleanEnumName}.{csFieldName}");
797812
}

src/Generator/CsCodeGenerator.HelperCommands.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ partial class CsCodeGenerator
1818
"vkEnumerateDeviceLayerProperties",
1919

2020
"vkQueueSubmit",
21+
"vkQueueSubmit2",
2122
"vkFlushMappedMemoryRanges",
2223
"vkInvalidateMappedMemoryRanges",
2324

0 commit comments

Comments
 (0)