Skip to content

Commit

Permalink
This is the Silk.NET December 2023 Update (v2.20.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
Perksey committed Dec 12, 2023
1 parent de39cbd commit 8c14e75
Show file tree
Hide file tree
Showing 103 changed files with 4,388 additions and 139 deletions.
Binary file modified build/cache/cl.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/openxr.json.gz
Binary file not shown.
Binary file modified build/cache/vulkan.json.gz
Binary file not shown.
15 changes: 8 additions & 7 deletions build/props/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,22 @@
<LangVersion>10</LangVersion>
<Authors>.NET Foundation and Contributors</Authors>
<PackageReleaseNotes>
Silk.NET November 2023 Update
Silk.NET December 2023 Update

- Updated to OpenXR 1.0.31
- Updated to Vulkan 1.3.270
- Updated to latest ImGui.NET, alleviating some incompatibilities introduced by the ImGui.NET team.
- Added support for UTF-8 file paths in GLFW and SDL windows (thanks @WinstonMao)
- Updated to OpenXR 1.0.32.1
- Updated to Vulkan 1.3.273
- Updated to latest OpenGL specifications
- Fixed OpenCL clCreateImage not functioning as expected with ImageDesc's ABI
- Fixed OpenAL throwing when loading an extension prefixed with ALC_ instead AL_
- Updated to latest OpenCL specifications
- Fixed Matrix2X2.GetDeterminant returning incorrect values
- Fixed ALC_SOFT_reopen_device being a non-context extension (thanks @okaniku, @doobah)
</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.19.0</VersionPrefix>
<VersionPrefix>2.20.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
2 changes: 1 addition & 1 deletion src/Maths/Silk.NET.Maths/Matrix2X2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ public readonly T GetDeterminant()
// | c d | = ad - bc

T a = M11, b = M12;
T d = M21, c = M22;
T c = M21, d = M22;

return Scalar.Subtract(Scalar.Multiply(a, d), Scalar.Multiply(b, c));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,10 @@ public enum KHR : int
Payload = 0x203C,
[NativeName("Name", "CL_SEMAPHORE_PAYLOAD_KHR")]
SemaphorePayloadKhr = 0x203C,
[NativeName("Name", "CL_SEMAPHORE_EXPORTABLE_KHR")]
Exportable = 0x2054,
[NativeName("Name", "CL_SEMAPHORE_EXPORTABLE_KHR")]
SemaphoreExportableKhr = 0x2054,
[NativeName("Name", "CL_SEMAPHORE_EXPORT_HANDLE_TYPES_KHR")]
ExportHandleTypes = 0x203F,
[NativeName("Name", "CL_SEMAPHORE_EXPORT_HANDLE_TYPES_KHR")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,7 @@ public enum SemaphoreInfo : int
Properties = 0x203B,
[NativeName("Name", "CL_SEMAPHORE_PAYLOAD_KHR")]
Payload = 0x203C,
[NativeName("Name", "CL_SEMAPHORE_EXPORTABLE_KHR")]
Exportable = 0x2054,
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.


using System;
using Silk.NET.Core.Attributes;

#pragma warning disable 1591

namespace Silk.NET.OpenCL.Extensions.KHR
{
[NativeName("Name", "cl_semaphore_reimport_properties_khr")]
public enum SemaphoreReimportProperties : ulong
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
using System.Text;
using Silk.NET.Core;
using Silk.NET.Core.Native;
using Silk.NET.Core.Attributes;
using Silk.NET.Core.Contexts;
using Silk.NET.Core.Loader;
using Silk.NET.OpenCL;
using Extension = Silk.NET.Core.Attributes.ExtensionAttribute;

#pragma warning disable 1591

namespace Silk.NET.OpenCL.Extensions.KHR
{
[Extension("KHR_external_semaphore_sync_fd")]
public unsafe partial class KhrExternalSemaphoreSyncFd : NativeExtension<CL>
{
public const string ExtensionName = "KHR_external_semaphore_sync_fd";
[NativeApi(EntryPoint = "clReImportSemaphoreSyncFdKHR", Convention = CallingConvention.Winapi)]
public unsafe partial int ReImportSemaphoreSyncF([Flow(Silk.NET.Core.Native.FlowDirection.In)] nint sema_object, [Flow(Silk.NET.Core.Native.FlowDirection.Out)] SemaphoreReimportProperties* reimport_props, [Flow(Silk.NET.Core.Native.FlowDirection.In)] int fd);

[NativeApi(EntryPoint = "clReImportSemaphoreSyncFdKHR", Convention = CallingConvention.Winapi)]
public partial int ReImportSemaphoreSyncF([Flow(Silk.NET.Core.Native.FlowDirection.In)] nint sema_object, [Flow(Silk.NET.Core.Native.FlowDirection.Out)] out SemaphoreReimportProperties reimport_props, [Flow(Silk.NET.Core.Native.FlowDirection.In)] int fd);

[Obsolete("The \"ungrouped\" enums (KHR) are deprecated in favour of the \"grouped\" enums (SemaphoreReimportProperties). Not only is this akin to how the original specification represents enums, it also ensures that the size of the enum is correct which is a guarantee the \"ungrouped\" enums do not provide. As such, we have made every attempt to prevent functions known to use these ungrouped enums problematically from compiling; but regardless of whether usage of these deprecated enums compiles please use the other enums to ensure that all functions will work as intended. ", true)]
[NativeApi(EntryPoint = "clReImportSemaphoreSyncFdKHR", Convention = CallingConvention.Winapi)]
public unsafe partial int ReImportSemaphoreSyncF([Flow(Silk.NET.Core.Native.FlowDirection.In)] nint sema_object, [Flow(Silk.NET.Core.Native.FlowDirection.Out)] KHR* reimport_props, [Flow(Silk.NET.Core.Native.FlowDirection.In)] int fd);

[Obsolete("The \"ungrouped\" enums (KHR) are deprecated in favour of the \"grouped\" enums (SemaphoreReimportProperties). Not only is this akin to how the original specification represents enums, it also ensures that the size of the enum is correct which is a guarantee the \"ungrouped\" enums do not provide. As such, we have made every attempt to prevent functions known to use these ungrouped enums problematically from compiling; but regardless of whether usage of these deprecated enums compiles please use the other enums to ensure that all functions will work as intended. ", true)]
[NativeApi(EntryPoint = "clReImportSemaphoreSyncFdKHR", Convention = CallingConvention.Winapi)]
public partial int ReImportSemaphoreSyncF([Flow(Silk.NET.Core.Native.FlowDirection.In)] nint sema_object, [Flow(Silk.NET.Core.Native.FlowDirection.Out)] out KHR reimport_props, [Flow(Silk.NET.Core.Native.FlowDirection.In)] int fd);

public KhrExternalSemaphoreSyncFd(INativeContext ctx)
: base(ctx)
{
}
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
using System.Text;
using Silk.NET.Core;
using Silk.NET.Core.Native;
using Silk.NET.Core.Attributes;
using Silk.NET.Core.Contexts;
using Silk.NET.Core.Loader;

#pragma warning disable 1591

namespace Silk.NET.OpenCL.Extensions.KHR
{
public static class KhrExternalSemaphoreSyncFdOverloads
{
public static unsafe int ReImportSemaphoreSyncF(this KhrExternalSemaphoreSyncFd thisApi, [Flow(Silk.NET.Core.Native.FlowDirection.In)] nint sema_object, [Flow(Silk.NET.Core.Native.FlowDirection.Out)] Span<SemaphoreReimportProperties> reimport_props, [Flow(Silk.NET.Core.Native.FlowDirection.In)] int fd)
{
// SpanOverloader
return thisApi.ReImportSemaphoreSyncF(sema_object, out reimport_props.GetPinnableReference(), fd);
}

[Obsolete("The \"ungrouped\" enums (KHR) are deprecated in favour of the \"grouped\" enums (SemaphoreReimportProperties). Not only is this akin to how the original specification represents enums, it also ensures that the size of the enum is correct which is a guarantee the \"ungrouped\" enums do not provide. As such, we have made every attempt to prevent functions known to use these ungrouped enums problematically from compiling; but regardless of whether usage of these deprecated enums compiles please use the other enums to ensure that all functions will work as intended. ", true)]
public static unsafe int ReImportSemaphoreSyncF(this KhrExternalSemaphoreSyncFd thisApi, [Flow(Silk.NET.Core.Native.FlowDirection.In)] nint sema_object, [Flow(Silk.NET.Core.Native.FlowDirection.Out)] Span<KHR> reimport_props, [Flow(Silk.NET.Core.Native.FlowDirection.In)] int fd)
{
// SpanOverloader
return thisApi.ReImportSemaphoreSyncF(sema_object, out reimport_props.GetPinnableReference(), fd);
}

}
}

Original file line number Diff line number Diff line change
Expand Up @@ -483,10 +483,10 @@ public unsafe partial class ArbVertexProgram : NativeExtension<GL>
public partial void VertexAttrib4N([Flow(Silk.NET.Core.Native.FlowDirection.In)] uint index, [Count(Count = 4), Flow(Silk.NET.Core.Native.FlowDirection.In)] in ushort v);

[NativeApi(EntryPoint = "glVertexAttribPointerARB", Convention = CallingConvention.Winapi)]
public unsafe partial void VertexAttribPointer([Flow(Silk.NET.Core.Native.FlowDirection.In)] uint index, [Flow(Silk.NET.Core.Native.FlowDirection.In)] int size, [Flow(Silk.NET.Core.Native.FlowDirection.In)] ARB type, [Flow(Silk.NET.Core.Native.FlowDirection.In)] bool normalized, [Flow(Silk.NET.Core.Native.FlowDirection.In)] uint stride, [Count(Computed = "size, type, stride"), Flow(Silk.NET.Core.Native.FlowDirection.In)] void* pointer);
public unsafe partial void VertexAttribPointer([Flow(Silk.NET.Core.Native.FlowDirection.In)] uint index, [Flow(Silk.NET.Core.Native.FlowDirection.In)] int size, [Flow(Silk.NET.Core.Native.FlowDirection.In)] ARB type, [Flow(Silk.NET.Core.Native.FlowDirection.In)] bool normalized, [Flow(Silk.NET.Core.Native.FlowDirection.In)] uint stride, [Flow(Silk.NET.Core.Native.FlowDirection.In)] void* pointer);

[NativeApi(EntryPoint = "glVertexAttribPointerARB", Convention = CallingConvention.Winapi)]
public unsafe partial void VertexAttribPointer([Flow(Silk.NET.Core.Native.FlowDirection.In)] uint index, [Flow(Silk.NET.Core.Native.FlowDirection.In)] int size, [Flow(Silk.NET.Core.Native.FlowDirection.In)] VertexAttribPointerType type, [Flow(Silk.NET.Core.Native.FlowDirection.In)] bool normalized, [Flow(Silk.NET.Core.Native.FlowDirection.In)] uint stride, [Count(Computed = "size, type, stride"), Flow(Silk.NET.Core.Native.FlowDirection.In)] void* pointer);
public unsafe partial void VertexAttribPointer([Flow(Silk.NET.Core.Native.FlowDirection.In)] uint index, [Flow(Silk.NET.Core.Native.FlowDirection.In)] int size, [Flow(Silk.NET.Core.Native.FlowDirection.In)] VertexAttribPointerType type, [Flow(Silk.NET.Core.Native.FlowDirection.In)] bool normalized, [Flow(Silk.NET.Core.Native.FlowDirection.In)] uint stride, [Flow(Silk.NET.Core.Native.FlowDirection.In)] void* pointer);

public unsafe void DeleteProgram([Count(Parameter = "n"), Flow(Silk.NET.Core.Native.FlowDirection.In)] uint programs)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,10 +420,10 @@ public unsafe partial class ArbVertexShader : NativeExtension<GL>
public partial void VertexAttrib4N([Flow(Silk.NET.Core.Native.FlowDirection.In)] uint index, [Count(Count = 4), Flow(Silk.NET.Core.Native.FlowDirection.In)] in uint v);

[NativeApi(EntryPoint = "glVertexAttribPointerARB", Convention = CallingConvention.Winapi)]
public unsafe partial void VertexAttribPointer([Flow(Silk.NET.Core.Native.FlowDirection.In)] uint index, [Flow(Silk.NET.Core.Native.FlowDirection.In)] int size, [Flow(Silk.NET.Core.Native.FlowDirection.In)] ARB type, [Flow(Silk.NET.Core.Native.FlowDirection.In)] bool normalized, [Flow(Silk.NET.Core.Native.FlowDirection.In)] uint stride, [Count(Computed = "size, type, stride"), Flow(Silk.NET.Core.Native.FlowDirection.In)] void* pointer);
public unsafe partial void VertexAttribPointer([Flow(Silk.NET.Core.Native.FlowDirection.In)] uint index, [Flow(Silk.NET.Core.Native.FlowDirection.In)] int size, [Flow(Silk.NET.Core.Native.FlowDirection.In)] ARB type, [Flow(Silk.NET.Core.Native.FlowDirection.In)] bool normalized, [Flow(Silk.NET.Core.Native.FlowDirection.In)] uint stride, [Flow(Silk.NET.Core.Native.FlowDirection.In)] void* pointer);

[NativeApi(EntryPoint = "glVertexAttribPointerARB", Convention = CallingConvention.Winapi)]
public unsafe partial void VertexAttribPointer([Flow(Silk.NET.Core.Native.FlowDirection.In)] uint index, [Flow(Silk.NET.Core.Native.FlowDirection.In)] int size, [Flow(Silk.NET.Core.Native.FlowDirection.In)] VertexAttribPointerType type, [Flow(Silk.NET.Core.Native.FlowDirection.In)] bool normalized, [Flow(Silk.NET.Core.Native.FlowDirection.In)] uint stride, [Count(Computed = "size, type, stride"), Flow(Silk.NET.Core.Native.FlowDirection.In)] void* pointer);
public unsafe partial void VertexAttribPointer([Flow(Silk.NET.Core.Native.FlowDirection.In)] uint index, [Flow(Silk.NET.Core.Native.FlowDirection.In)] int size, [Flow(Silk.NET.Core.Native.FlowDirection.In)] VertexAttribPointerType type, [Flow(Silk.NET.Core.Native.FlowDirection.In)] bool normalized, [Flow(Silk.NET.Core.Native.FlowDirection.In)] uint stride, [Flow(Silk.NET.Core.Native.FlowDirection.In)] void* pointer);

public unsafe void GetActiveAttrib([Flow(Silk.NET.Core.Native.FlowDirection.In)] uint programObj, [Flow(Silk.NET.Core.Native.FlowDirection.In)] uint index, [Count(Count = 1), Flow(Silk.NET.Core.Native.FlowDirection.Out)] uint* length, [Count(Count = 1), Flow(Silk.NET.Core.Native.FlowDirection.Out)] int* size, [Count(Count = 1), Flow(Silk.NET.Core.Native.FlowDirection.Out)] ARB* type, [Count(Parameter = "maxLength"), Flow(Silk.NET.Core.Native.FlowDirection.Out)] Span<byte> name)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,10 @@ public unsafe partial class ExtGpuShader4 : NativeExtension<GL>
public partial void VertexAttribI4([Flow(Silk.NET.Core.Native.FlowDirection.In)] uint index, [Count(Count = 4), Flow(Silk.NET.Core.Native.FlowDirection.In)] in ushort v);

[NativeApi(EntryPoint = "glVertexAttribIPointerEXT", Convention = CallingConvention.Winapi)]
public unsafe partial void VertexAttribIPointer([Flow(Silk.NET.Core.Native.FlowDirection.In)] uint index, [Flow(Silk.NET.Core.Native.FlowDirection.In)] int size, [Flow(Silk.NET.Core.Native.FlowDirection.In)] EXT type, [Flow(Silk.NET.Core.Native.FlowDirection.In)] uint stride, [Count(Computed = "size, type, stride"), Flow(Silk.NET.Core.Native.FlowDirection.In)] void* pointer);
public unsafe partial void VertexAttribIPointer([Flow(Silk.NET.Core.Native.FlowDirection.In)] uint index, [Flow(Silk.NET.Core.Native.FlowDirection.In)] int size, [Flow(Silk.NET.Core.Native.FlowDirection.In)] EXT type, [Flow(Silk.NET.Core.Native.FlowDirection.In)] uint stride, [Flow(Silk.NET.Core.Native.FlowDirection.In)] void* pointer);

[NativeApi(EntryPoint = "glVertexAttribIPointerEXT", Convention = CallingConvention.Winapi)]
public unsafe partial void VertexAttribIPointer([Flow(Silk.NET.Core.Native.FlowDirection.In)] uint index, [Flow(Silk.NET.Core.Native.FlowDirection.In)] int size, [Flow(Silk.NET.Core.Native.FlowDirection.In)] VertexAttribIType type, [Flow(Silk.NET.Core.Native.FlowDirection.In)] uint stride, [Count(Computed = "size, type, stride"), Flow(Silk.NET.Core.Native.FlowDirection.In)] void* pointer);
public unsafe partial void VertexAttribIPointer([Flow(Silk.NET.Core.Native.FlowDirection.In)] uint index, [Flow(Silk.NET.Core.Native.FlowDirection.In)] int size, [Flow(Silk.NET.Core.Native.FlowDirection.In)] VertexAttribIType type, [Flow(Silk.NET.Core.Native.FlowDirection.In)] uint stride, [Flow(Silk.NET.Core.Native.FlowDirection.In)] void* pointer);

public unsafe void Uniform1([Flow(Silk.NET.Core.Native.FlowDirection.In)] int ___location, [Count(Parameter = "count", Expression = "*1"), Flow(Silk.NET.Core.Native.FlowDirection.In)] ReadOnlySpan<uint> value)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ public unsafe partial class ExtVertexAttrib64bit : NativeExtension<GL>
public partial void VertexAttribL4([Flow(Silk.NET.Core.Native.FlowDirection.In)] uint index, [Count(Count = 4), Flow(Silk.NET.Core.Native.FlowDirection.In)] in double v);

[NativeApi(EntryPoint = "glVertexAttribLPointerEXT", Convention = CallingConvention.Winapi)]
public unsafe partial void VertexAttribLPointer([Flow(Silk.NET.Core.Native.FlowDirection.In)] uint index, [Flow(Silk.NET.Core.Native.FlowDirection.In)] int size, [Flow(Silk.NET.Core.Native.FlowDirection.In)] EXT type, [Flow(Silk.NET.Core.Native.FlowDirection.In)] uint stride, [Count(Parameter = "size"), Flow(Silk.NET.Core.Native.FlowDirection.In)] void* pointer);
public unsafe partial void VertexAttribLPointer([Flow(Silk.NET.Core.Native.FlowDirection.In)] uint index, [Flow(Silk.NET.Core.Native.FlowDirection.In)] int size, [Flow(Silk.NET.Core.Native.FlowDirection.In)] EXT type, [Flow(Silk.NET.Core.Native.FlowDirection.In)] uint stride, [Flow(Silk.NET.Core.Native.FlowDirection.In)] void* pointer);

[NativeApi(EntryPoint = "glVertexAttribLPointerEXT", Convention = CallingConvention.Winapi)]
public unsafe partial void VertexAttribLPointer([Flow(Silk.NET.Core.Native.FlowDirection.In)] uint index, [Flow(Silk.NET.Core.Native.FlowDirection.In)] int size, [Flow(Silk.NET.Core.Native.FlowDirection.In)] VertexAttribLType type, [Flow(Silk.NET.Core.Native.FlowDirection.In)] uint stride, [Count(Parameter = "size"), Flow(Silk.NET.Core.Native.FlowDirection.In)] void* pointer);
public unsafe partial void VertexAttribLPointer([Flow(Silk.NET.Core.Native.FlowDirection.In)] uint index, [Flow(Silk.NET.Core.Native.FlowDirection.In)] int size, [Flow(Silk.NET.Core.Native.FlowDirection.In)] VertexAttribLType type, [Flow(Silk.NET.Core.Native.FlowDirection.In)] uint stride, [Flow(Silk.NET.Core.Native.FlowDirection.In)] void* pointer);

public unsafe double GetVertexAttribL([Flow(Silk.NET.Core.Native.FlowDirection.In)] uint index, [Flow(Silk.NET.Core.Native.FlowDirection.In)] EXT pname)
{
Expand Down
Loading

0 comments on commit 8c14e75

Please sign in to comment.