Skip to content

Commit 5f35d7d

Browse files
committed
Generate initial OpenXR bindings on Linux
1 parent 171c234 commit 5f35d7d

130 files changed

Lines changed: 48359 additions & 0 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.

.silktouch/opencl-clangsharp.stout

17.2 KB
Binary file not shown.

sources/OpenCL/OpenCL/Cl.gen.cs

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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+
// Ported from the OpenCL headers and corresponding dependencies.
4+
// Original source is Copyright 2013-2026 The Khronos Group Inc. Licensed under the Apache 2.0 license.
5+
using System;
6+
using System.Diagnostics.CodeAnalysis;
7+
using System.Reflection;
8+
using System.Runtime.CompilerServices;
9+
using System.Runtime.InteropServices;
10+
using Silk.NET.Core.Loader;
11+
12+
namespace Silk.NET.OpenCL;
13+
14+
partial class Cl(INativeContext nativeContext) : IDisposable
15+
{
16+
public partial class DllImport : ICl.Static
17+
{
18+
static DllImport() => LoaderInterface.RegisterHook(Assembly.GetExecutingAssembly());
19+
}
20+
21+
public partial class ThisThread : ICl.Static
22+
{
23+
public static ThreadLocal<ICl> Underlying { get; } = new();
24+
25+
public static partial void MakeCurrent(ICl ctx);
26+
}
27+
28+
private readonly unsafe void*[] _slots = new void*[114];
29+
30+
public static ICl Create(INativeContext ctx) => new Cl(ctx);
31+
32+
/// <inheritdoc/>
33+
public void Dispose() => nativeContext.Dispose();
34+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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+
// Ported from the OpenCL headers and corresponding dependencies.
4+
// Original source is Copyright 2013-2026 The Khronos Group Inc. Licensed under the Apache 2.0 license.
5+
using System;
6+
using System.Diagnostics.CodeAnalysis;
7+
using System.Runtime.CompilerServices;
8+
using System.Runtime.InteropServices;
9+
10+
namespace Silk.NET.OpenCL;
11+
12+
[NativeName("cl_accelerator_info_intel")]
13+
public enum AcceleratorInfoIntel : uint { }
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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+
// Ported from the OpenCL headers and corresponding dependencies.
4+
// Original source is Copyright 2013-2026 The Khronos Group Inc. Licensed under the Apache 2.0 license.
5+
using System;
6+
using System.Diagnostics.CodeAnalysis;
7+
using System.Runtime.CompilerServices;
8+
using System.Runtime.InteropServices;
9+
10+
namespace Silk.NET.OpenCL;
11+
12+
[NativeName("cl_accelerator_type_intel")]
13+
public enum AcceleratorTypeIntel : uint { }
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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+
// Ported from the OpenCL headers and corresponding dependencies.
4+
// Original source is Copyright 2013-2026 The Khronos Group Inc. Licensed under the Apache 2.0 license.
5+
using System;
6+
using System.Diagnostics.CodeAnalysis;
7+
using System.Runtime.CompilerServices;
8+
using System.Runtime.InteropServices;
9+
10+
namespace Silk.NET.OpenCL;
11+
12+
[NativeName("cl_addressing_mode")]
13+
public enum AddressingMode : uint
14+
{
15+
[NativeName("CL_ADDRESS_NONE")]
16+
None = 4400,
17+
18+
[NativeName("CL_ADDRESS_CLAMP_TO_EDGE")]
19+
ClampToEdge = 4401,
20+
21+
[NativeName("CL_ADDRESS_CLAMP")]
22+
Clamp = 4402,
23+
24+
[NativeName("CL_ADDRESS_REPEAT")]
25+
Repeat = 4403,
26+
27+
[NativeName("CL_ADDRESS_MIRRORED_REPEAT")]
28+
MirroredRepeat = 4404,
29+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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+
// Ported from the OpenCL headers and corresponding dependencies.
4+
// Original source is Copyright 2013-2026 The Khronos Group Inc. Licensed under the Apache 2.0 license.
5+
using System;
6+
using System.Diagnostics.CodeAnalysis;
7+
using System.Runtime.CompilerServices;
8+
using System.Runtime.InteropServices;
9+
10+
namespace Silk.NET.OpenCL;
11+
12+
[NativeName("cl_bool")]
13+
public enum Bool : uint
14+
{
15+
[NativeName("CL_FALSE")]
16+
False = 0,
17+
18+
[NativeName("CL_TRUE")]
19+
True = 1,
20+
21+
[NativeName("CL_BLOCKING")]
22+
Blocking = 1,
23+
24+
[NativeName("CL_NON_BLOCKING")]
25+
NonBlocking = 0,
26+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
// Ported from the OpenCL headers and corresponding dependencies.
4+
// Original source is Copyright 2013-2026 The Khronos Group Inc. Licensed under the Apache 2.0 license.
5+
using System;
6+
using System.Diagnostics.CodeAnalysis;
7+
using System.Runtime.CompilerServices;
8+
using System.Runtime.InteropServices;
9+
10+
namespace Silk.NET.OpenCL;
11+
12+
[NativeName("cl_buffer_create_type")]
13+
public enum BufferCreateType : uint
14+
{
15+
[NativeName("CL_BUFFER_CREATE_TYPE_REGION")]
16+
Region = 4640,
17+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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+
// Ported from the OpenCL headers and corresponding dependencies.
4+
// Original source is Copyright 2013-2026 The Khronos Group Inc. Licensed under the Apache 2.0 license.
5+
using System;
6+
using System.Diagnostics.CodeAnalysis;
7+
using System.Runtime.CompilerServices;
8+
using System.Runtime.InteropServices;
9+
10+
namespace Silk.NET.OpenCL;
11+
12+
[NativeName("cl_build_status")]
13+
public enum BuildStatus : int
14+
{
15+
[NativeName("CL_BUILD_SUCCESS")]
16+
Success = 0,
17+
18+
[NativeName("CL_BUILD_NONE")]
19+
None = -1,
20+
21+
[NativeName("CL_BUILD_ERROR")]
22+
Error = -2,
23+
24+
[NativeName("CL_BUILD_IN_PROGRESS")]
25+
InProgress = -3,
26+
}
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
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+
// Ported from the OpenCL headers and corresponding dependencies.
4+
// Original source is Copyright 2013-2026 The Khronos Group Inc. Licensed under the Apache 2.0 license.
5+
using System;
6+
using System.Diagnostics.CodeAnalysis;
7+
using System.Runtime.CompilerServices;
8+
using System.Runtime.InteropServices;
9+
10+
namespace Silk.NET.OpenCL;
11+
12+
[NativeName("cl_channel_order")]
13+
public enum ChannelOrder : uint
14+
{
15+
[NativeName("CL_R")]
16+
R = 4272,
17+
18+
[NativeName("CL_A")]
19+
A = 4273,
20+
21+
[NativeName("CL_RG")]
22+
Rg = 4274,
23+
24+
[NativeName("CL_RA")]
25+
Ra = 4275,
26+
27+
[NativeName("CL_RGB")]
28+
Rgb = 4276,
29+
30+
[NativeName("CL_RGBA")]
31+
Rgba = 4277,
32+
33+
[NativeName("CL_BGRA")]
34+
Bgra = 4278,
35+
36+
[NativeName("CL_ARGB")]
37+
Argb = 4279,
38+
39+
[NativeName("CL_INTENSITY")]
40+
Intensity = 4280,
41+
42+
[NativeName("CL_LUMINANCE")]
43+
Luminance = 4281,
44+
45+
[NativeName("CL_Rx")]
46+
Rx = 4282,
47+
48+
[NativeName("CL_RGx")]
49+
RGx = 4283,
50+
51+
[NativeName("CL_RGBx")]
52+
RGBx = 4284,
53+
54+
[NativeName("CL_DEPTH")]
55+
Depth = 4285,
56+
57+
[NativeName("CL_sRGB")]
58+
SRgb = 4287,
59+
60+
[NativeName("CL_sRGBx")]
61+
SRGBx = 4288,
62+
63+
[NativeName("CL_sRGBA")]
64+
SRgba = 4289,
65+
66+
[NativeName("CL_sBGRA")]
67+
SBgra = 4290,
68+
69+
[NativeName("CL_ABGR")]
70+
Abgr = 4291,
71+
}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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+
// Ported from the OpenCL headers and corresponding dependencies.
4+
// Original source is Copyright 2013-2026 The Khronos Group Inc. Licensed under the Apache 2.0 license.
5+
using System;
6+
using System.Diagnostics.CodeAnalysis;
7+
using System.Runtime.CompilerServices;
8+
using System.Runtime.InteropServices;
9+
10+
namespace Silk.NET.OpenCL;
11+
12+
[NativeName("cl_channel_type")]
13+
public enum ChannelType : uint
14+
{
15+
[NativeName("CL_SNORM_INT8")]
16+
SnormInt8 = 4304,
17+
18+
[NativeName("CL_SNORM_INT16")]
19+
SnormInt16 = 4305,
20+
21+
[NativeName("CL_UNORM_INT8")]
22+
UnormInt8 = 4306,
23+
24+
[NativeName("CL_UNORM_INT16")]
25+
UnormInt16 = 4307,
26+
27+
[NativeName("CL_UNORM_SHORT_565")]
28+
UnormShort565 = 4308,
29+
30+
[NativeName("CL_UNORM_SHORT_555")]
31+
UnormShort555 = 4309,
32+
33+
[NativeName("CL_UNORM_INT_101010")]
34+
UnormInt101010 = 4310,
35+
36+
[NativeName("CL_SIGNED_INT8")]
37+
SignedInt8 = 4311,
38+
39+
[NativeName("CL_SIGNED_INT16")]
40+
SignedInt16 = 4312,
41+
42+
[NativeName("CL_SIGNED_INT32")]
43+
SignedInt32 = 4313,
44+
45+
[NativeName("CL_UNSIGNED_INT8")]
46+
UnsignedInt8 = 4314,
47+
48+
[NativeName("CL_UNSIGNED_INT16")]
49+
UnsignedInt16 = 4315,
50+
51+
[NativeName("CL_UNSIGNED_INT32")]
52+
UnsignedInt32 = 4316,
53+
54+
[NativeName("CL_HALF_FLOAT")]
55+
HalfFloat = 4317,
56+
57+
[NativeName("CL_FLOAT")]
58+
Float = 4318,
59+
60+
[NativeName("CL_UNORM_INT_101010_2")]
61+
UnormInt101010x2 = 4320,
62+
}

0 commit comments

Comments
 (0)