Skip to content

Commit

Permalink
This is the April 2021 Update (v2.3.0) & #443
Browse files Browse the repository at this point in the history
* Remove SDL mirror

* Add the real SDL, fix generator paths

* Regenerate D3D9 and SDL for 64-bit (build will probably fail)

* Fix build errors

* Fix fusion reactor not respecting desired names

* Update Windows and Linux binary

* Update libsilkdroid

* Update macOS binary

* Update iOS binary

* This is the April 2021 Update (v2.3.0)
  • Loading branch information
Perksey committed Apr 2, 2021
1 parent 1c90cfe commit 23f9bd4
Show file tree
Hide file tree
Showing 122 changed files with 9,430 additions and 6,218 deletions.
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "build/submodules/SDL-mirror"]
path = build/submodules/SDL-mirror
url = https://github.com/spurious/SDL-mirror
[submodule "build/submodules/SDL"]
path = build/submodules/SDL
url = https://github.com/libsdl-org/SDL
15 changes: 0 additions & 15 deletions Silk.NET.sln
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "iOS", "iOS", "{488775D1-32C
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Silk.NET.NUKE", "build\nuke\Silk.NET.NUKE.csproj", "{B9A8D738-FE7D-4860-A446-4A03E3DDEB74}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Silk.NET.NUKE.SshAgent", "src\Core\Silk.NET.NUKE.SshAgent\Silk.NET.NUKE.SshAgent.csproj", "{5D2BCEBE-A163-47E2-9B56-2151D4EC30B9}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft", "Microsoft", "{F2CF5D32-4B41-425E-B229-8FFC48F88063}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Silk.NET.Direct3D11", "src\Microsoft\Silk.NET.Direct3D11\Silk.NET.Direct3D11.csproj", "{F3B7A9D6-5B15-45E8-925B-20B5BBD33428}"
Expand Down Expand Up @@ -2024,18 +2022,6 @@ Global
{B9A8D738-FE7D-4860-A446-4A03E3DDEB74}.Release|x64.Build.0 = Release|Any CPU
{B9A8D738-FE7D-4860-A446-4A03E3DDEB74}.Release|x86.ActiveCfg = Release|Any CPU
{B9A8D738-FE7D-4860-A446-4A03E3DDEB74}.Release|x86.Build.0 = Release|Any CPU
{5D2BCEBE-A163-47E2-9B56-2151D4EC30B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5D2BCEBE-A163-47E2-9B56-2151D4EC30B9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5D2BCEBE-A163-47E2-9B56-2151D4EC30B9}.Debug|x64.ActiveCfg = Debug|Any CPU
{5D2BCEBE-A163-47E2-9B56-2151D4EC30B9}.Debug|x64.Build.0 = Debug|Any CPU
{5D2BCEBE-A163-47E2-9B56-2151D4EC30B9}.Debug|x86.ActiveCfg = Debug|Any CPU
{5D2BCEBE-A163-47E2-9B56-2151D4EC30B9}.Debug|x86.Build.0 = Debug|Any CPU
{5D2BCEBE-A163-47E2-9B56-2151D4EC30B9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5D2BCEBE-A163-47E2-9B56-2151D4EC30B9}.Release|Any CPU.Build.0 = Release|Any CPU
{5D2BCEBE-A163-47E2-9B56-2151D4EC30B9}.Release|x64.ActiveCfg = Release|Any CPU
{5D2BCEBE-A163-47E2-9B56-2151D4EC30B9}.Release|x64.Build.0 = Release|Any CPU
{5D2BCEBE-A163-47E2-9B56-2151D4EC30B9}.Release|x86.ActiveCfg = Release|Any CPU
{5D2BCEBE-A163-47E2-9B56-2151D4EC30B9}.Release|x86.Build.0 = Release|Any CPU
{BD86AB4D-74FD-429D-9AEE-79B0C429BB3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BD86AB4D-74FD-429D-9AEE-79B0C429BB3A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BD86AB4D-74FD-429D-9AEE-79B0C429BB3A}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -2402,7 +2388,6 @@ Global
{603F28D1-E982-47C0-98D9-3E6DA1DD37E2} = {488775D1-32CC-46D7-8DD7-BB331EC659B9}
{488775D1-32CC-46D7-8DD7-BB331EC659B9} = {23324041-2076-477C-A4BF-B385B8066C6C}
{B9A8D738-FE7D-4860-A446-4A03E3DDEB74} = {0651C5EF-50AA-4598-8D9C-8F210ADD8490}
{5D2BCEBE-A163-47E2-9B56-2151D4EC30B9} = {0651C5EF-50AA-4598-8D9C-8F210ADD8490}
{F3B7A9D6-5B15-45E8-925B-20B5BBD33428} = {F2CF5D32-4B41-425E-B229-8FFC48F88063}
{A768A346-6388-4881-8FF6-15F0163B76E0} = {F2CF5D32-4B41-425E-B229-8FFC48F88063}
{2C3099EA-C01C-4639-8300-153A9BD79292} = {F2CF5D32-4B41-425E-B229-8FFC48F88063}
Expand Down
Binary file modified build/cache/d3d9.json.gz
Binary file not shown.
Binary file modified build/cache/gl.json.gz
Binary file not shown.
Binary file modified build/cache/glcore.json.gz
Binary file not shown.
Binary file modified build/cache/gles2.json.gz
Binary file not shown.
Binary file modified build/cache/sdl.json.gz
Binary file not shown.
Binary file modified build/cache/vulkan.json.gz
Binary file not shown.
6 changes: 3 additions & 3 deletions build/nuke/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -293,13 +293,13 @@ Solution ProcessedSolution
return default;
}
var sdlMirror = RootDirectory / "build" / "submodules" / "SDL-mirror";
var sdl = RootDirectory / "build" / "submodules" / "SDL";
var silkDroid = SourceDirectory / "Windowing" / "Android" / "SilkDroid";
var xcopy = new (string, string)[]
{
(sdlMirror / "android-project" / "app" / "src" / "main" / "java",
(sdl / "android-project" / "app" / "src" / "main" / "java",
silkDroid / "app" / "src" / "main" / "java"),
(sdlMirror, silkDroid / "app" / "jni" / "SDL2")
(sdl, silkDroid / "app" / "jni" / "SDL2")
};
foreach (var (from, to) in xcopy)
Expand Down
22 changes: 11 additions & 11 deletions build/props/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@
<LangVersion>preview</LangVersion>
<Authors>.NET Foundation and Contributors</Authors>
<PackageReleaseNotes>
Silk.NET March 2021 Update
- Add memory pooling for Input State Capture extensions
- Add Input State Capture stability and robustness improvements
- Update to Vulkan 1.2.171
- Update to latest OpenGL as of 22nd February 2021
- Update to latest OpenCL as of 2nd March 2021
- Fix window disposal/reset bugs
- Fix a build toolchain issue where packages released in Debug mode (#416)
- Fix a string marshalling issue and OpenAL regression (#414)
Silk.NET April 2021 Update

- Add a new Silk.NET.OpenGL.Extensions.ImGui package, a first-party ImGui integration for Silk.NET.OpenGL
- Add support for native method definitions across multiple partial classes
- Add improved SDL exception throwing, only throwing when a function indicates an error
- Updated metadata to reference .NET Foundation and dotnet following our .NET Foundation onboarding
- Update to SDL 2.0.14
- Update to GLFW 3.3.3
- Miscellaneous build system related fixes
- Miscellaneous SourceLink related fixes
</PackageReleaseNotes>
<PackageTags Condition="'$(PackageTags)' == ''">OpenCL;OpenGL;OpenAL;OpenGLES;GLES;Vulkan;Assimp;DirectX;GLFW;SDL;Windowing;Input;Gamepad;Joystick;Keyboard;Mouse;SilkTouch;Source;Generator;C#;F#;.NET;DotNet;Mono;Vector;Math;Maths;Numerics;Game;Graphics;Compute;Audio;Sound;Engine;Silk;Silk.NET;Slim.NET;ElgarTK;GPU;Sharp;Science;Scientific;Visualization;Visual;Audiovisual;Windows;macOS;Linux;Android;Bindings;OSX;Wrapper;Native</PackageTags>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageOutputPath>$(MSBuildThisFileDirectory)/../output_packages</PackageOutputPath>
<RepositoryUrl>https://github.com/dotnet/Silk.NET</RepositoryUrl>
<RepositoryType>Git</RepositoryType>
<VersionPrefix>2.2.0</VersionPrefix>
<VersionPrefix>2.3.0</VersionPrefix>
<VersionSuffix Condition="'$(VersionSuffix)' == ''"></VersionSuffix>
<Description Condition="'$(Description)' == ''">
Silk.NET is a high-speed, advanced library, providing bindings to popular low-level APIs such as OpenGL, OpenCL, OpenAL, OpenXR, GLFW, SDL, Vulkan, Assimp, and DirectX.
Expand Down
1 change: 1 addition & 0 deletions build/submodules/SDL
Submodule SDL added at 07ba13
1 change: 0 additions & 1 deletion build/submodules/SDL-mirror
Submodule SDL-mirror deleted from 863c4b
31 changes: 16 additions & 15 deletions generator.json
Original file line number Diff line number Diff line change
Expand Up @@ -573,24 +573,22 @@
{
"profileName": "SDL",
"sources": [
"build/submodules/SDL-mirror/include/SDL.h",
"build/submodules/SDL-mirror/include/SDL_vulkan.h"
"build/submodules/SDL/include/SDL.h",
"build/submodules/SDL/include/SDL_vulkan.h"
],
"mode": "Clang",
"cacheDir": "build/cache",
"cacheKey": "sdl",
"controlDescriptors": [
"convert-windows-only",
"no-convert",
"no-bind"
"convert-windows-only"
],
"converter": {},
"prefix": "sdl",
"clang": {
"args": [
"--language=c++",
"--std=c++17",
"-m32",
"-m64",
"-Wno-expansion-to-defined",
"-Wno-ignored-attributes",
"-Wno-ignored-pragma-intrinsic",
Expand All @@ -601,16 +599,16 @@
"-IC:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/ucrt",
"-IC:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.28.29333/include",
"-IC:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29333/include",
"-Ibuild/submodules/SDL-mirror/include",
"-Ibuild/submodules/SDL/include",
"-D__IPHONEOS__",
"-D__ANDROID__",
"-D__WIN32__",
"-D__WINRT__",
"-D__LINUX__"
],
"traverse": [
"!build/submodules/SDL-mirror/include/SDL_rwops.h",
"build/submodules/SDL-mirror/include/*.h"
"!build/submodules/SDL/include/SDL_rwops.h",
"build/submodules/SDL/include/*.h"
],
"classes": {
"SDL.h": "[Core]Sdl",
Expand All @@ -620,15 +618,17 @@
"exclude": [
"VkSurfaceKHR",
"VkInstance",
"ID3D11Device",
"SDL_main",
"SDL_SysWMmsg",
"SDL_Rect"
],
"rename": {
"__AnonymousEnum_SDL_shape_L80_C9": "WindowShapeModeVal",
"__AnonymousEnum_SDL_stdinc_L161_C9": "SdlBool",
"__AnonymousRecord_SDL_gamecontroller_L84_C5": "GameControllerBindValue",
"__AnonymousRecord_SDL_gamecontroller_L88_C9": "GameControllerHatValue",
"__AnonymousEnum_SDL_stdinc_L167_C9": "SdlBool",
"_comment_0": "Remove this in 3.0, use native names",
"__AnonymousRecord_SDL_gamecontroller_L87_C5": "GameControllerBindValue",
"__AnonymousRecord_SDL_gamecontroller_L91_C9": "GameControllerHatValue",
"_SDL_Haptic": "Haptic",
"_SDL_GameController": "GameController",
"_SDL_Joystick": "Joystick",
Expand Down Expand Up @@ -680,12 +680,13 @@
{
"$typemapPrecedesInjections": "true",
"WindowShapeMode": "WindowShapeModeVal",
"SDL_bool": "SdlBool",
"SDL_RWops": "RWops",
"VkInstance": "Silk.NET.Core.Native.VkHandle",
"VkSurfaceKHR": "Silk.NET.Core.Native.VkNonDispatchableHandle",
"SDL_SysWMmsg": "SysWMMsg",
"SDL_Rect": "Silk.NET.Maths.Rectangle<int>"
"SDL_Rect": "Silk.NET.Maths.Rectangle<int>",
"SDL_bool": "SdlBool",
"ID3D11Device": "Silk.NET.Core.Native.IUnknown"
},
{
"$include.commonTypeMap": "build/csharp_typemap.json"
Expand Down Expand Up @@ -1039,7 +1040,7 @@
"args": [
"--language=c++",
"--std=c++17",
"-m32",
"-m64",
"-Wno-expansion-to-defined",
"-Wno-ignored-attributes",
"-Wno-ignored-pragma-intrinsic",
Expand Down
41 changes: 25 additions & 16 deletions src/Core/Silk.NET.BuildTools/Cpp/Clang.cs
Original file line number Diff line number Diff line change
Expand Up @@ -941,24 +941,29 @@ IEnumerable<Field> ConvertAll(RecordDecl recordDecl, string? remappedNativeName)
}
);

if (firstNestedRecordField is null)
var renameNestedName = !task.RenamedNativeNames.ContainsKey(nestedName);
if (renameNestedName)
{
firstNestedRecordField = ret;
firstNestedRecord = nestedName;
task.RenamedNativeNames[nestedName] = $"{nestedNameMapped}Union";
}
else
{
if (!rejiggedFirstNestedRecordField && task.RenamedNativeNames[firstNestedRecord!] ==
$"{nestedNameMapped}Union")
if (firstNestedRecordField is null)
{
rejiggedFirstNestedRecordField = true;
firstNestedRecordField.Name = "Anonymous1";
task.RenamedNativeNames[firstNestedRecord!] = $"{nestedNameMapped}Union1";
firstNestedRecordField = ret;
firstNestedRecord = nestedName;
task.RenamedNativeNames[nestedName] = $"{nestedNameMapped}Union";
}
else
{
if (!rejiggedFirstNestedRecordField &&
task.RenamedNativeNames[firstNestedRecord!] ==
$"{nestedNameMapped}Union")
{
rejiggedFirstNestedRecordField = true;
firstNestedRecordField.Name = "Anonymous1";
task.RenamedNativeNames[firstNestedRecord!] = $"{nestedNameMapped}Union1";
}

task.RenamedNativeNames[nestedName] =
$"{nestedNameMapped}Union{nestedRecordFieldCount}";
task.RenamedNativeNames[nestedName] =
$"{nestedNameMapped}Union{nestedRecordFieldCount}";
}
}

var skip = false;
Expand All @@ -969,8 +974,12 @@ IEnumerable<Field> ConvertAll(RecordDecl recordDecl, string? remappedNativeName)
if (GetType(nestedFieldDecl.Type, out _, ref _f, out _).Name == ret.Type.Name)
{
skip = true;
task.RenamedNativeNames[nestedName] =
nestedNameMapped + nestedFieldDecl.Name.Pascalize();
if (renameNestedName)
{
task.RenamedNativeNames[nestedName] =
nestedNameMapped + nestedFieldDecl.Name.Pascalize();
}

break;
}
}
Expand Down
30 changes: 0 additions & 30 deletions src/Core/Silk.NET.NUKE.SshAgent/Configuration.cs

This file was deleted.

56 changes: 0 additions & 56 deletions src/Core/Silk.NET.NUKE.SshAgent/Program.cs

This file was deleted.

14 changes: 0 additions & 14 deletions src/Core/Silk.NET.NUKE.SshAgent/Silk.NET.NUKE.SshAgent.csproj

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

namespace Silk.NET.Direct3D9
{
[StructLayout(LayoutKind.Sequential, Pack = 4)]
[NativeName("Name", "_D3DADAPTER_IDENTIFIER9")]
public unsafe partial struct AdapterIdentifier9
{
Expand Down
1 change: 0 additions & 1 deletion src/Microsoft/Silk.NET.Direct3D9/Structs/AesCtrIV.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

namespace Silk.NET.Direct3D9
{
[StructLayout(LayoutKind.Sequential, Pack = 4)]
[NativeName("Name", "_D3DAES_CTR_IV")]
public unsafe partial struct AesCtrIV
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

namespace Silk.NET.Direct3D9
{
[StructLayout(LayoutKind.Sequential, Pack = 4)]
[NativeName("Name", "_D3DAUTHENTICATEDCHANNEL_QUERYOUTPUTID_OUTPUT")]
public unsafe partial struct AuthenticatedchannelQueryoutputidOutput
{
Expand Down
Loading

0 comments on commit 23f9bd4

Please sign in to comment.