Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
75ee80f
Start of khronos-bindings branch
Exanite Jun 11, 2026
c0ec96a
Add initial set of required submodules
Exanite Jun 12, 2026
2b7e239
Explain that the API-Specific Notes sections may be empty
Exanite Jun 12, 2026
39f5e07
Change OpenXR XML spec link in docs
Exanite Jun 12, 2026
c90d3ec
Set new submodules to use their latest tagged commit
Exanite Jun 12, 2026
0c27aa5
Update existing Khronos submodules
Exanite Jun 12, 2026
90e3292
Regenerate OpenAL on Linux after updating submodule
Exanite Jun 12, 2026
214f330
Regenerate OpenGL on Linux after updating submodule
Exanite Jun 12, 2026
799917a
Regenerate Vulkan on Linux after updating submodule
Exanite Jun 12, 2026
8b050e2
Add prefix override for VkImageCreateFlags2KHR
Exanite Jun 12, 2026
8cd91a0
Cleanup XML spec links in docs
Exanite Jun 12, 2026
a9f490b
Update Vulkan copyright year
Exanite Jun 14, 2026
04edaf7
Regenerate Vulkan on Linux after updating header copyright year
Exanite Jun 14, 2026
d9dc9e4
Add OpenXR to API notes and reorganize so that Khronos-like bindings …
Exanite Jun 14, 2026
126dd9e
Add initial OpenXR .rsp files
Exanite Jun 14, 2026
8648911
Add OpenXR to generator.json
Exanite Jun 14, 2026
d048c9b
Add Initial Project Creation section to Using the Generator docs
Exanite Jun 14, 2026
344bcf3
Create initial OpenXR .csproj file
Exanite Jun 14, 2026
4f35e5e
Fix formatting of solution file (oops)
Exanite Jun 14, 2026
b43f072
Configure IdentifySharedPrefixes for OpenXR
Exanite Jun 14, 2026
3cd7ebe
Configure TransformEnums for OpenXR
Exanite Jun 14, 2026
437db8d
Add naive symbol resolution to MetadataUtils.GetTypeDetails to fix Op…
Exanite Jun 15, 2026
5105bed
Update OpenXR API notes
Exanite Jun 15, 2026
469abc4
Regenerate OpenXR on Linux to create initial bindings
Exanite Jun 15, 2026
6e7fd33
Rename Khronos submodules so that they use the full name of the repo
Exanite Jun 15, 2026
594080d
Add opencl-headers submodule
Exanite Jun 15, 2026
4f2b751
Add section for OpenCL in API notes
Exanite Jun 15, 2026
218207a
Add response files for OpenCL
Exanite Jun 15, 2026
07a8db0
Create project for OpenCL
Exanite Jun 15, 2026
954885b
Add OpenCL SilkTouch configuration
Exanite Jun 15, 2026
103e5e2
Fix OpenCL include path
Exanite Jun 15, 2026
9ca5baa
Change opencl-headers submodule to point to latest tag
Exanite Jun 15, 2026
c8d6473
Add information about CL_TARGET_OPENCL_VERSION warning to API notes
Exanite Jun 15, 2026
f37f390
Enable -Wno-invalid-constexpr for OpenCL
Exanite Jun 15, 2026
4d50c8b
Regenerate OpenCL on Linux to create initial bindings
Exanite Jun 15, 2026
ce57a5d
Disable IdentifyFunctionDataTypes and IdentifyEnumTypeNonExclusiveVen…
Exanite Jun 15, 2026
399c4b6
Update vendor suffix identification (but not preservation/prettificat…
Exanite Jun 15, 2026
e8cc43e
Regenerate OpenCL on Linux for vendor suffix identification fix (not …
Exanite Jun 15, 2026
cef0c36
Clarify that non `.gen.cs` files are not modified
Exanite Jun 17, 2026
2281a07
Add ReapplyAffixesProcessor tests (indirect)
Exanite Jun 17, 2026
06432f0
Add option to capitalize name affixes
Exanite Jun 17, 2026
70fbcc2
Enable Capitalize for OpenCL KhronosVendor suffixes
Exanite Jun 17, 2026
7019668
Regenerate OpenCL on Linux for capitalize KhronosVendor change
Exanite Jun 17, 2026
9452f4c
Replace EndingsNotToTrim with EndingsToNotIdentifyInto
Exanite Jun 18, 2026
743d87f
Update vendor suffix identification to use CanIdentifySuffix
Exanite Jun 18, 2026
458f2d0
Regenerate OpenCL on Linux for ContEXT fix
Exanite Jun 18, 2026
8d43965
Fix unwanted change in OpenGL bindings caused by EndingsToNotIdentify…
Exanite Jun 18, 2026
543bc0d
Also include cl_ext.h
Exanite Jun 18, 2026
6c76aa3
Regenerate OpenCL on Linux after including cl_ext.h
Exanite Jun 18, 2026
b9c7357
Add _cl as a global prefix hint for OpenCL
Exanite Jun 18, 2026
09e05cd
Regenerate OpenCL on Linux after adding _cl as global prefix hint
Exanite Jun 18, 2026
b9d13f7
Rename variable to not collide with C# keyword
Exanite Jun 19, 2026
5ebc2b4
Add typemappings for OpenCL enum base types
Exanite Jun 19, 2026
602bb15
Rework how OpenCL enum type nodes are parsed
Exanite Jun 19, 2026
8cd4aee
Fix issue where we were losing enum base type information for OpenCL
Exanite Jun 19, 2026
83f8dae
Rename VendorFromString to VendorFromName and add docs
Exanite Jun 19, 2026
f364dce
Move FixupGroupNameForOpenCL out of ReadGroups
Exanite Jun 19, 2026
d6127c5
Add docs on ReadGroups helper methods
Exanite Jun 19, 2026
5f06eb3
Edit doc comment wording for MixKhronosData ReadGroups helpers
Exanite Jun 20, 2026
e6513ec
Add base type for ErrorCodes enum
Exanite Jun 20, 2026
873cf4d
Regenerate OpenCL on Linux for ErrorCodes change
Exanite Jun 20, 2026
bc9fa21
Manually add base types for all remaining OpenCL enums
Exanite Jun 20, 2026
bf5e04f
Add OpenCL to solution
Exanite Jun 20, 2026
25760d4
Regenerate OpenCL on Linux after defining enum base types
Exanite Jun 20, 2026
0b258d5
Typemap intptr_t to long for OpenCL (see commit description)
Exanite Jun 20, 2026
dad0bb3
Regenerate OpenCL on Linux for intptr_t change
Exanite Jun 20, 2026
3dd831a
Trim whitespace from non-namespaced enum names to handle OpenCL enum …
Exanite Jun 20, 2026
6c57b54
Expand OpenCL ErrorCodes handling to apply for all enums with block n…
Exanite Jun 20, 2026
1b12b1f
Regenerate OpenCL on Linux for block number trimming change
Exanite Jun 20, 2026
4f1fbdb
Add NativeName attribute to structs generated by AddOpaqueStructs
Exanite Jun 20, 2026
6b52711
Regenerate OpenGL on Linux for AddOpaqueStructs change
Exanite Jun 20, 2026
77a5751
Add AddOpaqueStructs to OpenCL config
Exanite Jun 20, 2026
dfc1156
Regenerate OpenCL on Linux for AddOpaqueStructs change
Exanite Jun 20, 2026
1f340d4
Restore ErrorCodes block in FixupGroupNameForOpenCL since it's needed…
Exanite Jun 20, 2026
34bd454
Add TransformHandles mod to OpenGL and OpenCL
Exanite Jun 20, 2026
33f7de7
Regenerate OpenCL on Linux for TransformHandles change
Exanite Jun 20, 2026
2ff8d92
Regenerate OpenGL on Linux for TransformHandles change
Exanite Jun 20, 2026
83583e2
Fix TransformHandles overwriting existing attributes
Exanite Jun 20, 2026
a335738
Fix ExtractHandles not adding the NativeName attribute to generated s…
Exanite Jun 20, 2026
825f61d
Change OpenCL to use ExtractHandles instead of AddOpaqueStructs
Exanite Jun 20, 2026
4778525
Regenerate OpenCL on Linux due to handle type changes
Exanite Jun 20, 2026
0e5d2bd
Exclude XR_NULL_HANDLE
Exanite Jun 20, 2026
195b066
Regenerate OpenXR on Linux for XR_NULL_HANDLE change
Exanite Jun 20, 2026
d7749c9
Clarify MixKhronosData FlagsTypes remark comment
Exanite Jun 21, 2026
b812ae2
Add constants for the name affixes used by MixKhronosData
Exanite Jun 21, 2026
236e5ae
Change NativeName for ErrorCodes to be "ErrorCodes" instead of "Error…
Exanite Jun 21, 2026
9bcd801
Regenerate OpenCL on Linux for ErrorCodes NativeName change
Exanite Jun 21, 2026
d9a2461
Change GetMissingEnums to use the native name when typemapping
Exanite Jun 21, 2026
60c0233
Potentially controversial: Cleanup OpenCL names that have the format …
Exanite Jun 21, 2026
cd6708e
Regenerate OpenCL on Linux after OpenCL enum name cleanup*
Exanite Jun 21, 2026
dde45c7
Add todo for changing the Groups dictionary to be keyed by native nam…
Exanite Jun 21, 2026
dbf8930
Change enum vendor suffix identification to consistently always use t…
Exanite Jun 21, 2026
ec2e58a
Regenerate OpenCL on Linux after fixing vendor suffix identification …
Exanite Jun 21, 2026
4c8ff36
Undo the Vulkan header change since it makes review tedious
Exanite Jun 21, 2026
ccd32fe
Regenerate Vulkan on Linux for header change
Exanite Jun 21, 2026
9b4be6d
Rename Khronos-like Bindings section to be just for Khronos Bindings
Exanite Jun 21, 2026
0e3c0a6
Add doc section on how to run the generator
Exanite Jun 21, 2026
5e05860
Fix extra space in SkipOption description
Exanite Jun 21, 2026
f3323db
Cleanup VendorFromEnumName
Exanite Jun 21, 2026
affe7e6
Don't merge cl_intel_advanced_motion_estimation.cl_motion_detect_desc…
Exanite Jun 21, 2026
c41ef07
Regenerate OpenCL on Linux for block merging change
Exanite Jun 21, 2026
f485f16
Change RewriterPhase1 to track native names instead of managed names
Exanite Jun 21, 2026
42ae407
Add OpenCL and XR to the changelog
Exanite Jun 21, 2026
a4870cc
Update native binaries for 42ae407cff8630ac331877f9ccb6490e7ceb1e2f
dotnet-bot Jun 21, 2026
8a863ee
Clarify comment for OpenCL group name processing
Exanite Jun 23, 2026
eb13ab1
Add info about nuget.config file to experimental feed docs
Exanite Jun 23, 2026
2264796
Format Vk.cs (was written before I had CSharpier configured)
Exanite Jun 23, 2026
3a45b31
Remove duplicate RegisterHook call in Vk (hack)
Exanite Jun 23, 2026
78419a4
Implement Xr.cs
Exanite Jun 23, 2026
6934dd8
Update opencl-docs submodule for trailing space fix
Exanite Jun 24, 2026
8472b84
Regenerate OpenCL on Linux after trailing space fix and submodule update
Exanite Jun 24, 2026
6d667ba
Improve document rename collision detection to account for casing dif…
Exanite Jun 24, 2026
9915fd2
Edit path collision error message
Exanite Jun 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
48 changes: 42 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[submodule "submodules/terrafx.interop.windows"]
path = eng/submodules/terrafx.interop.windows
url = https://github.com/terrafx/terrafx.interop.windows
[submodule "eng/submodules/opengl"]
path = eng/submodules/opengl
[submodule "eng/submodules/opengl-registry"]
path = eng/submodules/opengl-registry
url = https://github.com/KhronosGroup/OpenGL-Registry.git
[submodule "eng/submodules/egl"]
path = eng/submodules/egl
[submodule "eng/submodules/egl-registry"]
path = eng/submodules/egl-registry
url = https://github.com/KhronosGroup/EGL-Registry/
[submodule "eng/submodules/sdl"]
path = eng/submodules/sdl
Expand All @@ -16,9 +16,45 @@
[submodule "eng/submodules/openal-soft"]
path = eng/submodules/openal-soft
url = https://github.com/kcat/openal-soft
[submodule "eng/submodules/vulkan"]
path = eng/submodules/vulkan
[submodule "eng/submodules/vulkan-docs"]
path = eng/submodules/vulkan-docs
url = https://github.com/KhronosGroup/Vulkan-Docs.git
[submodule "eng/submodules/vulkan-headers"]
path = eng/submodules/vulkan-headers
url = https://github.com/KhronosGroup/Vulkan-Headers.git
[submodule "eng/submodules/assimp"]
path = eng/submodules/assimp
url = https://github.com/assimp/assimp
[submodule "eng/submodules/spirv-tools"]
path = eng/submodules/spirv-tools
url = https://github.com/KhronosGroup/SPIRV-Tools
[submodule "eng/submodules/spirv-reflect"]
path = eng/submodules/spirv-reflect
url = https://github.com/KhronosGroup/SPIRV-Reflect.git
[submodule "eng/submodules/spirv-headers"]
path = eng/submodules/spirv-headers
url = https://github.com/KhronosGroup/SPIRV-Headers
[submodule "eng/submodules/spirv-cross"]
path = eng/submodules/spirv-cross
url = https://github.com/KhronosGroup/SPIRV-Cross
[submodule "eng/submodules/shaderc"]
path = eng/submodules/shaderc
url = https://github.com/google/shaderc
[submodule "eng/submodules/moltenvk"]
path = eng/submodules/moltenvk
url = https://github.com/KhronosGroup/MoltenVK
[submodule "eng/submodules/vulkan-memory-allocator"]
path = eng/submodules/vulkan-memory-allocator
url = https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
[submodule "eng/submodules/glslang"]
path = eng/submodules/glslang
url = https://github.com/KhronosGroup/glslang.git
[submodule "eng/submodules/openxr-sdk"]
path = eng/submodules/openxr-sdk
url = https://github.com/KhronosGroup/OpenXR-SDK.git
[submodule "eng/submodules/opencl-docs"]
path = eng/submodules/opencl-docs
url = https://github.com/KhronosGroup/OpenCL-Docs.git
[submodule "eng/submodules/opencl-headers"]
path = eng/submodules/opencl-headers
url = https://github.com/KhronosGroup/OpenCL-Headers.git
Binary file added .silktouch/opencl-clangsharp.stout
Binary file not shown.
Binary file added .silktouch/openxr-clangsharp.stout
Binary file not shown.
6 changes: 6 additions & 0 deletions Silk.NET.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,15 @@
<Project Path="sources/OpenAL/OpenAL/Silk.NET.OpenAL.csproj" />
<Project Path="sources/OpenAL/Soft.Native/Silk.NET.OpenAL.Soft.Native.csproj" />
</Folder>
<Folder Name="/sources/OpenCL/">
<Project Path="sources/OpenCL/OpenCL/Silk.NET.OpenCL.csproj" />
</Folder>
<Folder Name="/sources/OpenGL/">
<Project Path="sources/OpenGL/OpenGL/Silk.NET.OpenGL.csproj" />
</Folder>
<Folder Name="/sources/OpenXR/">
<Project Path="sources/OpenXR/OpenXR/Silk.NET.OpenXR.csproj" />
</Folder>
<Folder Name="/sources/SDL/">
<Project Path="sources/SDL/Native/Silk.NET.SDL.Native.csproj" />
<Project Path="sources/SDL/SDL/Silk.NET.SDL.csproj" />
Expand Down
2 changes: 2 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Silk.NET 3.0 Preview 1

- Added combined OpenGL bindings using the 3.0 bindings style.
- Added OpenAL bindings using the 3.0 bindings style.
- Added OpenCL bindings using the 3.0 bindings style.
- Added OpenXR bindings using the 3.0 bindings style.
- Added SDL3 bindings using the 3.0 bindings style.
- Added Vulkan bindings using the 3.0 bindings style.
- Improved the bindings style to be more accessible, IDE-friendly, and AOT-friendly. Learn more at **TODO ADD A LINK TO DOCUMENTATION HERE**.
Expand Down
57 changes: 50 additions & 7 deletions docs/for-contributors/Generator/api-specific-notes.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,66 @@
# API-Specific Notes

This document's purpose is to note down any decisions or quirks that are specific to a library that Silk is generating
bindings for.
bindings for. It is fine for a section to be empty if we do not have any notes specific to that library.

This is meant to be a living document. Please update this as new work is being done on the generator.

## OpenAL
Certain APIs are grouped together because they share similar characteristics.

Currently empty.
## C Bindings

These are APIs that can be categorized as being straightforward C APIs or are C APIs that simply do not share
characteristics with other bindings.

## OpenGL
### SDL

Currently empty.

## SDL
## Khronos Bindings

Currently empty.
These are APIs managed either by Khronos or APIs managed in a similar way to the official Khronos APIs.
These use the `MixKhronosData` mod and come with an XML spec.

Be aware that the XML spec links point to the latest version. Silk's repo may be using an older version of these XML
files.

### OpenAL

Spec file used: https://raw.githubusercontent.com/kcat/openal-soft/master/registry/xml/al.xml

### OpenCL

Spec file used: https://raw.githubusercontent.com/KhronosGroup/OpenCL-Docs/main/xml/cl.xml

The following warning is expected since we do not want to hardcode the version in our entrypoint header:

```
warning: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 310 (OpenCL 3.1) [-W#pragma-messages]
```

### OpenGL

Spec file used: https://raw.githubusercontent.com/KhronosGroup/OpenGL-Registry/main/xml/gl.xml

### OpenXR

Spec file used: https://raw.githubusercontent.com/KhronosGroup/OpenXR-SDK/main/specification/registry/xr.xml

There will be the following errors in the generation log. This is expected. These types are part of the XML
specification, but not part of the main `openxr.h` header.

API Constants shows up here, but not in Vulkan because OpenXR's XML lacks the `type="constants"` attribute that
Vulkan's XML has.

```
fail: Silk.NET.SilkTouch.Mods.MixKhronosData[0] Enum "API Constants" has no base type. Please add TypeMap entry to the configuration. This enum group will be skipped.
fail: Silk.NET.SilkTouch.Mods.MixKhronosData[0] Enum "XrAndroidThreadTypeKHR" has no base type. Please add TypeMap entry to the configuration. This enum group will be skipped.
fail: Silk.NET.SilkTouch.Mods.MixKhronosData[0] Enum "XrLoaderInterfaceStructs" has no base type. Please add TypeMap entry to the configuration. This enum group will be skipped.
```

### Vulkan

## Vulkan
Spec file used: https://raw.githubusercontent.com/KhronosGroup/Vulkan-Docs/main/xml/vk.xml

There will be the following errors in the generation log. This is expected. These types are part of the XML
specification, but not part of the main `vulkan.h` header.
Expand Down
12 changes: 6 additions & 6 deletions docs/for-contributors/Generator/generator-mods.md
Original file line number Diff line number Diff line change
Expand Up @@ -496,13 +496,13 @@ the mod.

Khronos-style XML specifications:

- OpenAL: https://raw.githubusercontent.com/kcat/openal-soft/refs/heads/master/registry/xml/al.xml
- OpenCL: https://raw.githubusercontent.com/KhronosGroup/OpenCL-Docs/refs/heads/main/xml/cl.xml
- OpenGL: https://raw.githubusercontent.com/KhronosGroup/OpenGL-Registry/refs/heads/main/xml/gl.xml
- OpenAL: https://raw.githubusercontent.com/kcat/openal-soft/master/registry/xml/al.xml
- OpenCL: https://raw.githubusercontent.com/KhronosGroup/OpenCL-Docs/main/xml/cl.xml
- OpenGL: https://raw.githubusercontent.com/KhronosGroup/OpenGL-Registry/main/xml/gl.xml
- OpenGL Windows: https://raw.githubusercontent.com/KhronosGroup/OpenGL-Registry/main/xml/wgl.xml
- OpenGL X11: https://github.com/KhronosGroup/OpenGL-Registry/blob/main/xml/glx.xml
- OpenXR: https://raw.githubusercontent.com/KhronosGroup/OpenXR-SDK-Source/main/specification/registry/xr.xml
- Vulkan: https://raw.githubusercontent.com/KhronosGroup/Vulkan-Docs/refs/heads/main/xml/vk.xml
- OpenGL X11: https://raw.githubusercontent.com/KhronosGroup/OpenGL-Registry/main/xml/glx.xml
- OpenXR: https://raw.githubusercontent.com/KhronosGroup/OpenXR-SDK/main/specification/registry/xr.xml
- Vulkan: https://raw.githubusercontent.com/KhronosGroup/Vulkan-Docs/main/xml/vk.xml

Be aware that these link to the latest version. Silk's repo may be using an older version of these XML files.

Expand Down
58 changes: 53 additions & 5 deletions docs/for-contributors/Generator/using-the-generator.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@ Metal.

## Generator Overview

There are two main things to configure:
There are three main things to configure:

1. Silk 3 - This is the [`generator.json`](https://github.com/dotnet/Silk.NET/blob/develop/3.0/generator.json) file.

2. ClangSharpPInvokeGenerator - This is the [`eng/silktouch`](https://github.com/dotnet/Silk.NET/tree/develop/3.0/eng/silktouch) folder.

3. C# Project File - This is your typical `.csproj` file and add it to your solution before running the SilkTouch
generator.

Both are organized by native API.

Note: For the average C API, SDL's generator configuration would be the best configuration to reference. Most options
Expand Down Expand Up @@ -63,7 +66,7 @@ Note that these files can be stored anywhere since the SilkTouch configuration l
generator looks for these response files.

> To read more about ClangSharpPInvokeGenerator's command line arguments, a good option is to install the tool directly
> and use `--help` to display its command line documentation.
> and use the `--help` option to display its command line documentation.
>
> ```sh
> dotnet tool install --global ClangSharpPInvokeGenerator
Expand Down Expand Up @@ -211,14 +214,59 @@ static Vk()
}
```

### Initial Project Creation

You must create the initial project for the generated bindings to go in. This also goes for the solution file.
SilkTouch does not modify either file.

The paths for these files correspond to the following options in the `generator.json` file:
- `Jobs.JOB_NAME.SourceProject`
- `Jobs.JOB_NAME.Solution`

(TODO: Does this apply to `Jobs.JOB_NAME.TestProject` as well?)

For the source project file, ensure that the project references the `Silk.NET.Core` project or package by using the
corresponding `ProjectReference` or `PackageReference`. Also ensure the `AllowUnsafeBlocks` property is set to true.

> Note: In Silk's repository, `AllowUnsafeBlocks` is set globally by
> [Directory.Build.props](https://github.com/dotnet/Silk.NET/blob/develop/3.0/Directory.Build.props).
>
> (TODO: Not sure if other properties are required.)

For the solution file, both `.sln` and `.slnx` file formats are supported. This is because we defer to Roslyn and
MSBuild under the hood.

### Running the Generator

The generator can be run directly from source using the following command:

```sh
dotnet run --project sources/SilkTouch/SilkTouch/Silk.NET.SilkTouch.csproj -c Release -- generator.json --only SDL
```

You may use the `--help` option to display additional information about available options.

```
dotnet run --project sources/SilkTouch/SilkTouch/Silk.NET.SilkTouch.csproj -c Release -- --help
```

Some notable options include the `--only` and `--skip` options. `--only` lets you specify the exact jobs to run.
`--skip` is the opposite and lets you specify the jobs to skip. If `--only` and `--skip` is specified for the same job,
`--skip` takes precedence.

Warning: There are currently some generator bugs associated with running multiple jobs in the same process. We recommend
that you use `--only` to ensure that only one job is executed per process. Running multiple processes in parallel is
fine.

### Generated Bindings Output

All generated binding will be output to the `Jobs.JOB_NAME.SourceProject` path defined in `generator.json`.

These generated files all have the `.gen.cs` suffix and most of them are partial type declarations.
This means by creating a similarly named `.cs` file and using the `partial` C# keyword, you can add to the type.
These generated files all have the `.gen.cs` suffix and most of them are partial type declarations. This means by
creating a similarly named `.cs` file and using the `partial` C# keyword, you can add to the type.

Do not modify the `.gen.cs` files since running the generator again will overwrite those changes.
Do not modify the `.gen.cs` files since running the generator again will overwrite those changes. Files without this
extension are left untouched by the generator.

### Packing the Generated Bindings

Expand Down
11 changes: 10 additions & 1 deletion docs/silk.net/experimental-feed.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@ In order to use the experimental feed, you must change this project file slightl
</PropertyGroup>
```

Optionally, create a `nuget.config` file next to your solution file with the following contents:
```xml
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="silk" value="https://dotnet.github.io/Silk.NET/nuget/experimental/index.json"/>
</packageSources>
</configuration>
```

## Install an experimental version

Now .NET has access to the experimental feed, it's time to install an experimental package. Check for the latest version on our [GitLab Package Registry](https://gitlab.com/silkdotnet/Silk.NET/-/packages).
Expand All @@ -57,7 +67,6 @@ At the time of writing, the latest version is `2.0.0-build97.0`. Now to install
</ItemGroup>
```


> [!WARNING]
> Experimental Feed builds may be deleted without warning at the Silk.NET team's discretion.

Expand Down
5 changes: 5 additions & 0 deletions eng/silktouch/opencl/header.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

// Ported from the OpenCL headers and corresponding dependencies.
// Original source is Copyright 2013-2026 The Khronos Group Inc. Licensed under the Apache 2.0 license.
17 changes: 17 additions & 0 deletions eng/silktouch/opencl/opencl/generate.rsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@../settings.rsp
@../remap.rsp
--additional
-Wno-invalid-constexpr
--file
opencl-opencl.h
--methodClassName
Cl
--namespace
Silk.NET.OpenCL
--output
../../../../sources/OpenCL/OpenCL
--test-output
../../../../tests/OpenCL/OpenCL
--traverse
../../../submodules/opencl-headers/CL/cl.h
../../../submodules/opencl-headers/CL/cl_ext.h
2 changes: 2 additions & 0 deletions eng/silktouch/opencl/opencl/opencl-opencl.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#include <CL/cl.h>
#include <CL/cl_ext.h>
11 changes: 11 additions & 0 deletions eng/silktouch/opencl/remap.rsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@../../remap-stdint.rsp
--remap
_cl_platform_id=cl_platform_id
_cl_device_id=cl_device_id
_cl_context=cl_context
_cl_command_queue=cl_command_queue
_cl_mem=cl_mem
_cl_program=cl_program
_cl_kernel=cl_kernel
_cl_event=cl_event
_cl_sampler=cl_sampler
11 changes: 11 additions & 0 deletions eng/silktouch/opencl/settings.rsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@../../common.rsp
--define-macro
TODO_DEFINE_MACROS=HERE
--headerFile
../header.txt
--include-directory
../../../submodules/opencl-headers
--with-callconv
*=Winapi
--with-librarypath
*=opencl
4 changes: 2 additions & 2 deletions eng/silktouch/opengl/settings.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ TODO_DEFINE_MACROS=HERE
--headerFile
../header.txt
--include-directory
../../../submodules/opengl/api
../../../submodules/egl/api
../../../submodules/opengl-registry/api
../../../submodules/egl-registry/api
../../../include
--with-callconv
*=Winapi
Expand Down
5 changes: 5 additions & 0 deletions eng/silktouch/openxr/header.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

// Ported from the OpenXR headers and corresponding dependencies.
// Original source is Copyright 2017-2026 The Khronos Group Inc. Licensed under the MIT license.
16 changes: 16 additions & 0 deletions eng/silktouch/openxr/openxr/generate.rsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@../settings.rsp
@../remap.rsp
--exclude
XR_NULL_HANDLE
--file
openxr-openxr.h
--methodClassName
Xr
--namespace
Silk.NET.OpenXR
--output
../../../../sources/OpenXR/OpenXR
--test-output
../../../../tests/OpenXR/OpenXR
--traverse
../../../submodules/openxr-sdk/include/openxr/openxr.h
1 change: 1 addition & 0 deletions eng/silktouch/openxr/openxr/openxr-openxr.h
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include <openxr/openxr.h>
1 change: 1 addition & 0 deletions eng/silktouch/openxr/remap.rsp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@../../remap-stdint.rsp
11 changes: 11 additions & 0 deletions eng/silktouch/openxr/settings.rsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@../../common.rsp
--define-macro
TODO_DEFINE_MACROS=HERE
--headerFile
../header.txt
--include-directory
../../../submodules/openxr-sdk/include
--with-callconv
*=Winapi
--with-librarypath
*=openxr_loader
1 change: 1 addition & 0 deletions eng/submodules/assimp
Submodule assimp added at 392a65
Loading
Loading