Skip to content

Commit 1409a8e

Browse files
authored
This is the July 2021 Update (v2.6.0 - #535)
1 parent 48554d8 commit 1409a8e

File tree

52 files changed

+2093
-41
lines changed

Some content is hidden

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

52 files changed

+2093
-41
lines changed

build/cache/cl.json.gz

606 Bytes
Binary file not shown.

build/cache/vulkan.json.gz

2.75 KB
Binary file not shown.

build/props/common.props

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,23 @@
66
<LangVersion>preview</LangVersion>
77
<Authors>.NET Foundation and Contributors</Authors>
88
<PackageReleaseNotes>
9-
Silk.NET June 2021 Update
9+
Silk.NET July 2021 Update
1010

11-
- OpenXR bindings are now production-ready &amp; no longer experimental!
12-
- Add (optional) native binaries for OpenAL Soft
13-
- Add support for reversed-z projection matrices in Silk.NET.Maths
14-
- Add bindings for a number of missing Vulkan and OpenCL extensions
15-
- Add OpenGL-OpenXR interoperability helper APIs
16-
- Add more helper APIs in Silk.NET.Core and Silk.NET.Maths
17-
- Update to latest OpenGL and OpenGLES specifications
18-
- Update to OpenXR 1.0.16
19-
- Update to Vulkan 1.2.180
20-
- Fix SDL OpenGL context issues when not using OpenGL
21-
- Fix GLFW native window issues on 32-bit Windows
22-
- Fix OpenXR loading issues
23-
- Fix incorrect bindings in OpenXR
24-
- Miscellaneous windowing &amp; input bugfixes &amp; improvements
11+
- Add support for OpenAL Soft native libraries for ALContext
12+
- Update to Vulkan 1.2.183
13+
- Update to latest OpenCL specifications
14+
- Fix struct layout issues in DirectX and OpenXR bindings
15+
- Fix OpenCL library name resolution on Linux
16+
- Fix NU5127, NU5128, and NU1701 native package NuGet errors on .NET Framework
17+
- Improve FileNotFoundExceptions when native library loading fails
18+
- Improve GlobalMemory call chains by removing unnecessary usage of Span&lt;T&gt;
2519
</PackageReleaseNotes>
2620
<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>
2721
<GenerateDocumentationFile>true</GenerateDocumentationFile>
2822
<PackageOutputPath>$(MSBuildThisFileDirectory)/../output_packages</PackageOutputPath>
2923
<RepositoryUrl>https://github.com/dotnet/Silk.NET</RepositoryUrl>
3024
<RepositoryType>Git</RepositoryType>
31-
<VersionPrefix>2.5.0</VersionPrefix>
25+
<VersionPrefix>2.6.0</VersionPrefix>
3226
<VersionSuffix Condition="'$(VersionSuffix)' == ''"></VersionSuffix>
3327
<Description Condition="'$(Description)' == ''">
3428
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.

generator.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,10 @@
174174
"ID3D12Device*": "void*",
175175
"ID3D12Resource*": "void*",
176176
"ID3D12CommandQueue*": "void*",
177-
"IDirect3DSurface9*": "void*"
177+
"IDirect3DSurface9*": "void*",
178+
"DXGI_FORMAT": "uint",
179+
"VAImageFormat*": "void*",
180+
"D3DFORMAT": "uint"
178181
},
179182
{
180183
"cl_GLsync": "intptr_t",
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
using System;
4+
using System.Runtime.InteropServices;
5+
using System.Runtime.CompilerServices;
6+
using System.Text;
7+
using Silk.NET.Core;
8+
using Silk.NET.Core.Native;
9+
using Silk.NET.Core.Attributes;
10+
using Silk.NET.Core.Contexts;
11+
using Silk.NET.Core.Loader;
12+
using Silk.NET.OpenCL;
13+
using Extension = Silk.NET.Core.Attributes.ExtensionAttribute;
14+
15+
#pragma warning disable 1591
16+
17+
namespace Silk.NET.OpenCL.Extensions.INTEL
18+
{
19+
[Extension("INTEL_sharing_format_query_d3d10")]
20+
public unsafe partial class IntelSharingFormatQueryD3d10 : NativeExtension<CL>
21+
{
22+
public const string ExtensionName = "INTEL_sharing_format_query_d3d10";
23+
[NativeApi(EntryPoint = "clGetSupportedD3D10TextureFormatsINTEL")]
24+
public unsafe partial int GetSupportedD3D10TextureFormats([Flow(FlowDirection.In)] nint context, [Flow(FlowDirection.In)] INTEL flags, [Flow(FlowDirection.In)] uint image_type, [Flow(FlowDirection.In)] uint num_entries, [Flow(FlowDirection.Out)] uint* d3d10_formats, [Flow(FlowDirection.Out)] uint* num_texture_formats);
25+
26+
[NativeApi(EntryPoint = "clGetSupportedD3D10TextureFormatsINTEL")]
27+
public unsafe partial int GetSupportedD3D10TextureFormats([Flow(FlowDirection.In)] nint context, [Flow(FlowDirection.In)] INTEL flags, [Flow(FlowDirection.In)] uint image_type, [Flow(FlowDirection.In)] uint num_entries, [Flow(FlowDirection.Out)] uint* d3d10_formats, [Flow(FlowDirection.Out)] out uint num_texture_formats);
28+
29+
[NativeApi(EntryPoint = "clGetSupportedD3D10TextureFormatsINTEL")]
30+
public unsafe partial int GetSupportedD3D10TextureFormats([Flow(FlowDirection.In)] nint context, [Flow(FlowDirection.In)] INTEL flags, [Flow(FlowDirection.In)] uint image_type, [Flow(FlowDirection.In)] uint num_entries, [Flow(FlowDirection.Out)] out uint d3d10_formats, [Flow(FlowDirection.Out)] uint* num_texture_formats);
31+
32+
[NativeApi(EntryPoint = "clGetSupportedD3D10TextureFormatsINTEL")]
33+
public partial int GetSupportedD3D10TextureFormats([Flow(FlowDirection.In)] nint context, [Flow(FlowDirection.In)] INTEL flags, [Flow(FlowDirection.In)] uint image_type, [Flow(FlowDirection.In)] uint num_entries, [Flow(FlowDirection.Out)] out uint d3d10_formats, [Flow(FlowDirection.Out)] out uint num_texture_formats);
34+
35+
public IntelSharingFormatQueryD3d10(INativeContext ctx)
36+
: base(ctx)
37+
{
38+
}
39+
}
40+
}
41+
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
using System;
4+
using System.Runtime.InteropServices;
5+
using System.Runtime.CompilerServices;
6+
using System.Text;
7+
using Silk.NET.Core;
8+
using Silk.NET.Core.Native;
9+
using Silk.NET.Core.Attributes;
10+
using Silk.NET.Core.Contexts;
11+
using Silk.NET.Core.Loader;
12+
13+
#pragma warning disable 1591
14+
15+
namespace Silk.NET.OpenCL.Extensions.INTEL
16+
{
17+
public static class IntelSharingFormatQueryD3d10Overloads
18+
{
19+
public static unsafe int GetSupportedD3D10TextureFormats(this IntelSharingFormatQueryD3d10 thisApi, [Flow(FlowDirection.In)] nint context, [Flow(FlowDirection.In)] INTEL flags, [Flow(FlowDirection.In)] uint image_type, [Flow(FlowDirection.In)] uint num_entries, [Flow(FlowDirection.Out)] uint* d3d10_formats, [Flow(FlowDirection.Out)] Span<uint> num_texture_formats)
20+
{
21+
// SpanOverloader
22+
return thisApi.GetSupportedD3D10TextureFormats(context, flags, image_type, num_entries, d3d10_formats, out num_texture_formats.GetPinnableReference());
23+
}
24+
25+
public static unsafe int GetSupportedD3D10TextureFormats(this IntelSharingFormatQueryD3d10 thisApi, [Flow(FlowDirection.In)] nint context, [Flow(FlowDirection.In)] INTEL flags, [Flow(FlowDirection.In)] uint image_type, [Flow(FlowDirection.In)] uint num_entries, [Flow(FlowDirection.Out)] Span<uint> d3d10_formats, [Flow(FlowDirection.Out)] uint* num_texture_formats)
26+
{
27+
// SpanOverloader
28+
return thisApi.GetSupportedD3D10TextureFormats(context, flags, image_type, num_entries, out d3d10_formats.GetPinnableReference(), num_texture_formats);
29+
}
30+
31+
public static unsafe int GetSupportedD3D10TextureFormats(this IntelSharingFormatQueryD3d10 thisApi, [Flow(FlowDirection.In)] nint context, [Flow(FlowDirection.In)] INTEL flags, [Flow(FlowDirection.In)] uint image_type, [Flow(FlowDirection.In)] uint num_entries, [Flow(FlowDirection.Out)] Span<uint> d3d10_formats, [Flow(FlowDirection.Out)] Span<uint> num_texture_formats)
32+
{
33+
// SpanOverloader
34+
return thisApi.GetSupportedD3D10TextureFormats(context, flags, image_type, num_entries, out d3d10_formats.GetPinnableReference(), out num_texture_formats.GetPinnableReference());
35+
}
36+
37+
}
38+
}
39+
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
using System;
4+
using System.Runtime.InteropServices;
5+
using System.Runtime.CompilerServices;
6+
using System.Text;
7+
using Silk.NET.Core;
8+
using Silk.NET.Core.Native;
9+
using Silk.NET.Core.Attributes;
10+
using Silk.NET.Core.Contexts;
11+
using Silk.NET.Core.Loader;
12+
using Silk.NET.OpenCL;
13+
using Extension = Silk.NET.Core.Attributes.ExtensionAttribute;
14+
15+
#pragma warning disable 1591
16+
17+
namespace Silk.NET.OpenCL.Extensions.INTEL
18+
{
19+
[Extension("INTEL_sharing_format_query_d3d11")]
20+
public unsafe partial class IntelSharingFormatQueryD3d11 : NativeExtension<CL>
21+
{
22+
public const string ExtensionName = "INTEL_sharing_format_query_d3d11";
23+
[NativeApi(EntryPoint = "clGetSupportedD3D11TextureFormatsINTEL")]
24+
public unsafe partial int GetSupportedD3D11TextureFormats([Flow(FlowDirection.In)] nint context, [Flow(FlowDirection.In)] INTEL flags, [Flow(FlowDirection.In)] uint image_type, [Flow(FlowDirection.In)] uint plane, [Flow(FlowDirection.In)] uint num_entries, [Flow(FlowDirection.Out)] uint* d3d11_formats, [Flow(FlowDirection.Out)] uint* num_texture_formats);
25+
26+
[NativeApi(EntryPoint = "clGetSupportedD3D11TextureFormatsINTEL")]
27+
public unsafe partial int GetSupportedD3D11TextureFormats([Flow(FlowDirection.In)] nint context, [Flow(FlowDirection.In)] INTEL flags, [Flow(FlowDirection.In)] uint image_type, [Flow(FlowDirection.In)] uint plane, [Flow(FlowDirection.In)] uint num_entries, [Flow(FlowDirection.Out)] uint* d3d11_formats, [Flow(FlowDirection.Out)] out uint num_texture_formats);
28+
29+
[NativeApi(EntryPoint = "clGetSupportedD3D11TextureFormatsINTEL")]
30+
public unsafe partial int GetSupportedD3D11TextureFormats([Flow(FlowDirection.In)] nint context, [Flow(FlowDirection.In)] INTEL flags, [Flow(FlowDirection.In)] uint image_type, [Flow(FlowDirection.In)] uint plane, [Flow(FlowDirection.In)] uint num_entries, [Flow(FlowDirection.Out)] out uint d3d11_formats, [Flow(FlowDirection.Out)] uint* num_texture_formats);
31+
32+
[NativeApi(EntryPoint = "clGetSupportedD3D11TextureFormatsINTEL")]
33+
public partial int GetSupportedD3D11TextureFormats([Flow(FlowDirection.In)] nint context, [Flow(FlowDirection.In)] INTEL flags, [Flow(FlowDirection.In)] uint image_type, [Flow(FlowDirection.In)] uint plane, [Flow(FlowDirection.In)] uint num_entries, [Flow(FlowDirection.Out)] out uint d3d11_formats, [Flow(FlowDirection.Out)] out uint num_texture_formats);
34+
35+
public IntelSharingFormatQueryD3d11(INativeContext ctx)
36+
: base(ctx)
37+
{
38+
}
39+
}
40+
}
41+
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
using System;
4+
using System.Runtime.InteropServices;
5+
using System.Runtime.CompilerServices;
6+
using System.Text;
7+
using Silk.NET.Core;
8+
using Silk.NET.Core.Native;
9+
using Silk.NET.Core.Attributes;
10+
using Silk.NET.Core.Contexts;
11+
using Silk.NET.Core.Loader;
12+
13+
#pragma warning disable 1591
14+
15+
namespace Silk.NET.OpenCL.Extensions.INTEL
16+
{
17+
public static class IntelSharingFormatQueryD3d11Overloads
18+
{
19+
public static unsafe int GetSupportedD3D11TextureFormats(this IntelSharingFormatQueryD3d11 thisApi, [Flow(FlowDirection.In)] nint context, [Flow(FlowDirection.In)] INTEL flags, [Flow(FlowDirection.In)] uint image_type, [Flow(FlowDirection.In)] uint plane, [Flow(FlowDirection.In)] uint num_entries, [Flow(FlowDirection.Out)] uint* d3d11_formats, [Flow(FlowDirection.Out)] Span<uint> num_texture_formats)
20+
{
21+
// SpanOverloader
22+
return thisApi.GetSupportedD3D11TextureFormats(context, flags, image_type, plane, num_entries, d3d11_formats, out num_texture_formats.GetPinnableReference());
23+
}
24+
25+
public static unsafe int GetSupportedD3D11TextureFormats(this IntelSharingFormatQueryD3d11 thisApi, [Flow(FlowDirection.In)] nint context, [Flow(FlowDirection.In)] INTEL flags, [Flow(FlowDirection.In)] uint image_type, [Flow(FlowDirection.In)] uint plane, [Flow(FlowDirection.In)] uint num_entries, [Flow(FlowDirection.Out)] Span<uint> d3d11_formats, [Flow(FlowDirection.Out)] uint* num_texture_formats)
26+
{
27+
// SpanOverloader
28+
return thisApi.GetSupportedD3D11TextureFormats(context, flags, image_type, plane, num_entries, out d3d11_formats.GetPinnableReference(), num_texture_formats);
29+
}
30+
31+
public static unsafe int GetSupportedD3D11TextureFormats(this IntelSharingFormatQueryD3d11 thisApi, [Flow(FlowDirection.In)] nint context, [Flow(FlowDirection.In)] INTEL flags, [Flow(FlowDirection.In)] uint image_type, [Flow(FlowDirection.In)] uint plane, [Flow(FlowDirection.In)] uint num_entries, [Flow(FlowDirection.Out)] Span<uint> d3d11_formats, [Flow(FlowDirection.Out)] Span<uint> num_texture_formats)
32+
{
33+
// SpanOverloader
34+
return thisApi.GetSupportedD3D11TextureFormats(context, flags, image_type, plane, num_entries, out d3d11_formats.GetPinnableReference(), out num_texture_formats.GetPinnableReference());
35+
}
36+
37+
}
38+
}
39+
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
using System;
4+
using System.Runtime.InteropServices;
5+
using System.Runtime.CompilerServices;
6+
using System.Text;
7+
using Silk.NET.Core;
8+
using Silk.NET.Core.Native;
9+
using Silk.NET.Core.Attributes;
10+
using Silk.NET.Core.Contexts;
11+
using Silk.NET.Core.Loader;
12+
using Silk.NET.OpenCL;
13+
using Extension = Silk.NET.Core.Attributes.ExtensionAttribute;
14+
15+
#pragma warning disable 1591
16+
17+
namespace Silk.NET.OpenCL.Extensions.INTEL
18+
{
19+
[Extension("INTEL_sharing_format_query_dx9")]
20+
public unsafe partial class IntelSharingFormatQueryDx9 : NativeExtension<CL>
21+
{
22+
public const string ExtensionName = "INTEL_sharing_format_query_dx9";
23+
[NativeApi(EntryPoint = "clGetSupportedDX9MediaSurfaceFormatsINTEL")]
24+
public unsafe partial int GetSupportedDX9MediaSurfaceFormats([Flow(FlowDirection.In)] nint context, [Flow(FlowDirection.In)] INTEL flags, [Flow(FlowDirection.In)] uint image_type, [Flow(FlowDirection.In)] uint plane, [Flow(FlowDirection.In)] uint num_entries, [Flow(FlowDirection.Out)] uint* dx9_formats, [Flow(FlowDirection.Out)] uint* num_surface_formats);
25+
26+
[NativeApi(EntryPoint = "clGetSupportedDX9MediaSurfaceFormatsINTEL")]
27+
public unsafe partial int GetSupportedDX9MediaSurfaceFormats([Flow(FlowDirection.In)] nint context, [Flow(FlowDirection.In)] INTEL flags, [Flow(FlowDirection.In)] uint image_type, [Flow(FlowDirection.In)] uint plane, [Flow(FlowDirection.In)] uint num_entries, [Flow(FlowDirection.Out)] uint* dx9_formats, [Flow(FlowDirection.Out)] out uint num_surface_formats);
28+
29+
[NativeApi(EntryPoint = "clGetSupportedDX9MediaSurfaceFormatsINTEL")]
30+
public unsafe partial int GetSupportedDX9MediaSurfaceFormats([Flow(FlowDirection.In)] nint context, [Flow(FlowDirection.In)] INTEL flags, [Flow(FlowDirection.In)] uint image_type, [Flow(FlowDirection.In)] uint plane, [Flow(FlowDirection.In)] uint num_entries, [Flow(FlowDirection.Out)] out uint dx9_formats, [Flow(FlowDirection.Out)] uint* num_surface_formats);
31+
32+
[NativeApi(EntryPoint = "clGetSupportedDX9MediaSurfaceFormatsINTEL")]
33+
public partial int GetSupportedDX9MediaSurfaceFormats([Flow(FlowDirection.In)] nint context, [Flow(FlowDirection.In)] INTEL flags, [Flow(FlowDirection.In)] uint image_type, [Flow(FlowDirection.In)] uint plane, [Flow(FlowDirection.In)] uint num_entries, [Flow(FlowDirection.Out)] out uint dx9_formats, [Flow(FlowDirection.Out)] out uint num_surface_formats);
34+
35+
public IntelSharingFormatQueryDx9(INativeContext ctx)
36+
: base(ctx)
37+
{
38+
}
39+
}
40+
}
41+
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
using System;
4+
using System.Runtime.InteropServices;
5+
using System.Runtime.CompilerServices;
6+
using System.Text;
7+
using Silk.NET.Core;
8+
using Silk.NET.Core.Native;
9+
using Silk.NET.Core.Attributes;
10+
using Silk.NET.Core.Contexts;
11+
using Silk.NET.Core.Loader;
12+
13+
#pragma warning disable 1591
14+
15+
namespace Silk.NET.OpenCL.Extensions.INTEL
16+
{
17+
public static class IntelSharingFormatQueryDx9Overloads
18+
{
19+
public static unsafe int GetSupportedDX9MediaSurfaceFormats(this IntelSharingFormatQueryDx9 thisApi, [Flow(FlowDirection.In)] nint context, [Flow(FlowDirection.In)] INTEL flags, [Flow(FlowDirection.In)] uint image_type, [Flow(FlowDirection.In)] uint plane, [Flow(FlowDirection.In)] uint num_entries, [Flow(FlowDirection.Out)] uint* dx9_formats, [Flow(FlowDirection.Out)] Span<uint> num_surface_formats)
20+
{
21+
// SpanOverloader
22+
return thisApi.GetSupportedDX9MediaSurfaceFormats(context, flags, image_type, plane, num_entries, dx9_formats, out num_surface_formats.GetPinnableReference());
23+
}
24+
25+
public static unsafe int GetSupportedDX9MediaSurfaceFormats(this IntelSharingFormatQueryDx9 thisApi, [Flow(FlowDirection.In)] nint context, [Flow(FlowDirection.In)] INTEL flags, [Flow(FlowDirection.In)] uint image_type, [Flow(FlowDirection.In)] uint plane, [Flow(FlowDirection.In)] uint num_entries, [Flow(FlowDirection.Out)] Span<uint> dx9_formats, [Flow(FlowDirection.Out)] uint* num_surface_formats)
26+
{
27+
// SpanOverloader
28+
return thisApi.GetSupportedDX9MediaSurfaceFormats(context, flags, image_type, plane, num_entries, out dx9_formats.GetPinnableReference(), num_surface_formats);
29+
}
30+
31+
public static unsafe int GetSupportedDX9MediaSurfaceFormats(this IntelSharingFormatQueryDx9 thisApi, [Flow(FlowDirection.In)] nint context, [Flow(FlowDirection.In)] INTEL flags, [Flow(FlowDirection.In)] uint image_type, [Flow(FlowDirection.In)] uint plane, [Flow(FlowDirection.In)] uint num_entries, [Flow(FlowDirection.Out)] Span<uint> dx9_formats, [Flow(FlowDirection.Out)] Span<uint> num_surface_formats)
32+
{
33+
// SpanOverloader
34+
return thisApi.GetSupportedDX9MediaSurfaceFormats(context, flags, image_type, plane, num_entries, out dx9_formats.GetPinnableReference(), out num_surface_formats.GetPinnableReference());
35+
}
36+
37+
}
38+
}
39+

0 commit comments

Comments
 (0)