-
Notifications
You must be signed in to change notification settings - Fork 471
[3.0] Add OpenCL and OpenXR bindings #2590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Exanite
wants to merge
169
commits into
develop/3.0
Choose a base branch
from
feature/khronos-bindings
base: develop/3.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
169 commits
Select commit
Hold shift + click to select a range
75ee80f
Start of khronos-bindings branch
Exanite c0ec96a
Add initial set of required submodules
Exanite 2b7e239
Explain that the API-Specific Notes sections may be empty
Exanite 39f5e07
Change OpenXR XML spec link in docs
Exanite c90d3ec
Set new submodules to use their latest tagged commit
Exanite 0c27aa5
Update existing Khronos submodules
Exanite 90e3292
Regenerate OpenAL on Linux after updating submodule
Exanite 214f330
Regenerate OpenGL on Linux after updating submodule
Exanite 799917a
Regenerate Vulkan on Linux after updating submodule
Exanite 8b050e2
Add prefix override for VkImageCreateFlags2KHR
Exanite 8cd91a0
Cleanup XML spec links in docs
Exanite a9f490b
Update Vulkan copyright year
Exanite 04edaf7
Regenerate Vulkan on Linux after updating header copyright year
Exanite d9dc9e4
Add OpenXR to API notes and reorganize so that Khronos-like bindings …
Exanite 126dd9e
Add initial OpenXR .rsp files
Exanite 8648911
Add OpenXR to generator.json
Exanite d048c9b
Add Initial Project Creation section to Using the Generator docs
Exanite 344bcf3
Create initial OpenXR .csproj file
Exanite 4f35e5e
Fix formatting of solution file (oops)
Exanite b43f072
Configure IdentifySharedPrefixes for OpenXR
Exanite 3cd7ebe
Configure TransformEnums for OpenXR
Exanite 437db8d
Add naive symbol resolution to MetadataUtils.GetTypeDetails to fix Op…
Exanite 5105bed
Update OpenXR API notes
Exanite 469abc4
Regenerate OpenXR on Linux to create initial bindings
Exanite 6e7fd33
Rename Khronos submodules so that they use the full name of the repo
Exanite 594080d
Add opencl-headers submodule
Exanite 4f2b751
Add section for OpenCL in API notes
Exanite 218207a
Add response files for OpenCL
Exanite 07a8db0
Create project for OpenCL
Exanite 954885b
Add OpenCL SilkTouch configuration
Exanite 103e5e2
Fix OpenCL include path
Exanite 9ca5baa
Change opencl-headers submodule to point to latest tag
Exanite c8d6473
Add information about CL_TARGET_OPENCL_VERSION warning to API notes
Exanite f37f390
Enable -Wno-invalid-constexpr for OpenCL
Exanite 4d50c8b
Regenerate OpenCL on Linux to create initial bindings
Exanite ce57a5d
Disable IdentifyFunctionDataTypes and IdentifyEnumTypeNonExclusiveVen…
Exanite 399c4b6
Update vendor suffix identification (but not preservation/prettificat…
Exanite e8cc43e
Regenerate OpenCL on Linux for vendor suffix identification fix (not …
Exanite cef0c36
Clarify that non `.gen.cs` files are not modified
Exanite 2281a07
Add ReapplyAffixesProcessor tests (indirect)
Exanite 06432f0
Add option to capitalize name affixes
Exanite 70fbcc2
Enable Capitalize for OpenCL KhronosVendor suffixes
Exanite 7019668
Regenerate OpenCL on Linux for capitalize KhronosVendor change
Exanite 9452f4c
Replace EndingsNotToTrim with EndingsToNotIdentifyInto
Exanite 743d87f
Update vendor suffix identification to use CanIdentifySuffix
Exanite 458f2d0
Regenerate OpenCL on Linux for ContEXT fix
Exanite 8d43965
Fix unwanted change in OpenGL bindings caused by EndingsToNotIdentify…
Exanite 543bc0d
Also include cl_ext.h
Exanite 6c76aa3
Regenerate OpenCL on Linux after including cl_ext.h
Exanite b9c7357
Add _cl as a global prefix hint for OpenCL
Exanite 09e05cd
Regenerate OpenCL on Linux after adding _cl as global prefix hint
Exanite b9d13f7
Rename variable to not collide with C# keyword
Exanite 5ebc2b4
Add typemappings for OpenCL enum base types
Exanite 602bb15
Rework how OpenCL enum type nodes are parsed
Exanite 8cd4aee
Fix issue where we were losing enum base type information for OpenCL
Exanite 83f8dae
Rename VendorFromString to VendorFromName and add docs
Exanite f364dce
Move FixupGroupNameForOpenCL out of ReadGroups
Exanite d6127c5
Add docs on ReadGroups helper methods
Exanite 5f06eb3
Edit doc comment wording for MixKhronosData ReadGroups helpers
Exanite e6513ec
Add base type for ErrorCodes enum
Exanite 873cf4d
Regenerate OpenCL on Linux for ErrorCodes change
Exanite bc9fa21
Manually add base types for all remaining OpenCL enums
Exanite bf5e04f
Add OpenCL to solution
Exanite 25760d4
Regenerate OpenCL on Linux after defining enum base types
Exanite 0b258d5
Typemap intptr_t to long for OpenCL (see commit description)
Exanite dad0bb3
Regenerate OpenCL on Linux for intptr_t change
Exanite 3dd831a
Trim whitespace from non-namespaced enum names to handle OpenCL enum …
Exanite 6c57b54
Expand OpenCL ErrorCodes handling to apply for all enums with block n…
Exanite 1b12b1f
Regenerate OpenCL on Linux for block number trimming change
Exanite 4f1fbdb
Add NativeName attribute to structs generated by AddOpaqueStructs
Exanite 6b52711
Regenerate OpenGL on Linux for AddOpaqueStructs change
Exanite 77a5751
Add AddOpaqueStructs to OpenCL config
Exanite dfc1156
Regenerate OpenCL on Linux for AddOpaqueStructs change
Exanite 1f340d4
Restore ErrorCodes block in FixupGroupNameForOpenCL since it's needed…
Exanite 34bd454
Add TransformHandles mod to OpenGL and OpenCL
Exanite 33f7de7
Regenerate OpenCL on Linux for TransformHandles change
Exanite 2ff8d92
Regenerate OpenGL on Linux for TransformHandles change
Exanite 83583e2
Fix TransformHandles overwriting existing attributes
Exanite a335738
Fix ExtractHandles not adding the NativeName attribute to generated s…
Exanite 825f61d
Change OpenCL to use ExtractHandles instead of AddOpaqueStructs
Exanite 4778525
Regenerate OpenCL on Linux due to handle type changes
Exanite 0e5d2bd
Exclude XR_NULL_HANDLE
Exanite 195b066
Regenerate OpenXR on Linux for XR_NULL_HANDLE change
Exanite d7749c9
Clarify MixKhronosData FlagsTypes remark comment
Exanite b812ae2
Add constants for the name affixes used by MixKhronosData
Exanite 236e5ae
Change NativeName for ErrorCodes to be "ErrorCodes" instead of "Error…
Exanite 9bcd801
Regenerate OpenCL on Linux for ErrorCodes NativeName change
Exanite d9a2461
Change GetMissingEnums to use the native name when typemapping
Exanite 60c0233
Potentially controversial: Cleanup OpenCL names that have the format …
Exanite cd6708e
Regenerate OpenCL on Linux after OpenCL enum name cleanup*
Exanite dde45c7
Add todo for changing the Groups dictionary to be keyed by native nam…
Exanite dbf8930
Change enum vendor suffix identification to consistently always use t…
Exanite ec2e58a
Regenerate OpenCL on Linux after fixing vendor suffix identification …
Exanite 4c8ff36
Undo the Vulkan header change since it makes review tedious
Exanite ccd32fe
Regenerate Vulkan on Linux for header change
Exanite 9b4be6d
Rename Khronos-like Bindings section to be just for Khronos Bindings
Exanite 0e3c0a6
Add doc section on how to run the generator
Exanite 5e05860
Fix extra space in SkipOption description
Exanite f3323db
Cleanup VendorFromEnumName
Exanite affe7e6
Don't merge cl_intel_advanced_motion_estimation.cl_motion_detect_desc…
Exanite c41ef07
Regenerate OpenCL on Linux for block merging change
Exanite f485f16
Change RewriterPhase1 to track native names instead of managed names
Exanite 42ae407
Add OpenCL and XR to the changelog
Exanite a4870cc
Update native binaries for 42ae407cff8630ac331877f9ccb6490e7ceb1e2f
dotnet-bot 8a863ee
Clarify comment for OpenCL group name processing
Exanite eb13ab1
Add info about nuget.config file to experimental feed docs
Exanite 2264796
Format Vk.cs (was written before I had CSharpier configured)
Exanite 3a45b31
Remove duplicate RegisterHook call in Vk (hack)
Exanite 78419a4
Implement Xr.cs
Exanite 6934dd8
Update opencl-docs submodule for trailing space fix
Exanite 8472b84
Regenerate OpenCL on Linux after trailing space fix and submodule update
Exanite 6d667ba
Improve document rename collision detection to account for casing dif…
Exanite 9915fd2
Edit path collision error message
Exanite d9e688d
Document ClangScraper handling of C long
Exanite 9d93bf8
Also link to ClangSharp's README in Using the Generator docs
Exanite 9195af6
Update opencl-docs submodule
Exanite 62ae9ed
Regenerate OpenCL on Linux after updating submodule
Exanite 8a521bd
Update ClangSharp.PInvokeGenerator
Exanite 482b793
Regenerate OpenCL on Linux after updating ClangSharp
Exanite 4a1cc34
Document why DllImport is used over LibraryImport
Exanite ff526d1
Implement Cl.cs
Exanite 967951c
Edit OpenCL AddVTables.ThisThread settings
Exanite 0ab7050
Regenerate OpenCL on Linux after modifying AddVTables settings
Exanite c16bb23
Update Cl.cs to work with new AddVTables settings
Exanite 02c317a
Remove duplicate RegisterHook call in OpenCL/XR
Exanite f81ce5c
Register alternative library names for OpenCL
Exanite a55d8f6
Add OpenCL.Tutorial001.SimpleKernel project
Exanite b370926
Fix index out of bounds error
Exanite cafb03a
Add ExtractNestedTypes and ExtractFunctionPointers to OpenCL mod order
Exanite 125ac02
Regenerate OpenCL on Linux after adding ExtractNestedTypes and Extrac…
Exanite a52e249
Remove resolved todos in OpenCL Tutorial001
Exanite 0576d64
Add the underscore back to extracted struct names
Exanite 9a246ad
Accept changes to OpenCL MixKhronosData snapshots
Exanite 916ef7a
Accept changes to Extract/TransformHandlesTests snapshots
Exanite 52d4be3
Fix IdentifiesNamespaceEnumPrefix test case by handling native and ma…
Exanite b416790
Document that we prefer the Flags version of the name for Flags/FlagB…
Exanite df6b0ad
Rework MixKhronosData to identify enums by native names and prefer Fl…
Exanite 5df8efa
Update MixKhronosData parsing test cases now that groups are keyed by…
Exanite c274ed3
Fix typo
Exanite 89d39b3
Add LocationTransformationTests and fix method group reference not ge…
Exanite 3c4ef0b
Add support for handling qualified referenced name affixes to NameAff…
Exanite 11ce725
Add support for qualified referenced affixes
Exanite 397a382
Add NameAffix referenced affixes for the extracted function pointer s…
Exanite c7d7887
Update name processing docs to reflect that qualified name affix refe…
Exanite ee4cb8f
Add FunctionPointerNameFallbackParent to ExtractFunctionPointers mod …
Exanite 4830f9b
Remove prefix trimming todos
Exanite 0775657
Fall back to DefaultNativeContext for loading OpenCL functions
Exanite fd27c00
Add todo about how ICl should be disposable
Exanite 18484c8
Add todo for potentially exposing INativeContext
Exanite f9ca5cb
Add todo for potentially returning the concrete API object type inste…
Exanite ffbc7e7
Silk 2 overrides DeviceInfo and ContextProperties, so this ports them…
Exanite e8b502e
Add a few more OpenCL headers to generation process
Exanite 08f7eef
Add todo for discussing INativeContext.LoadFunction
Exanite 7db48ef
Merge branch 'develop/3.0' into feature/khronos-bindings
Exanite 9540214
Regenerate all except Core/Microsoft on Windows
Exanite 0e4fe4c
Add ALTERA as OpenCL vendor suffix
Exanite 9b87bea
Regenerate OpenCL on Windows for ALTERA vendor suffix
Exanite 2df3f4a
Add prefix overrides for cl_context_properties and cl_device_integer_…
Exanite 6fb7882
Note that OpenXR is not usable yet
Exanite c46c76d
Fix bad grammar
Exanite 4bb176d
Remove todo
Exanite 8e50bd4
Disable ExtractEnumConstants for OpenXR and Vulkan
Exanite 1f18c07
Regenerate OpenXR, Vulkan bindings on Windows for ExtractEnumConstant…
Exanite 8830a7c
Remove recommendation about including all Extract- mods together
Exanite b1b0edd
Add prefix override for XrPerfSettingsNotificationLevelEXT
Exanite d4be857
Add prefix override for XrSceneMarkerQRCodeSymbolTypeMSFT
Exanite 485b0ab
Add prefix override for XrStructureType
Exanite 6049916
Manually add cast to Xr.gen.cs
Exanite 58b01a3
Add todo marking manual cast in Xr.gen.cs
Exanite File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't support 32 bit right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Silk.NET 2.X made an explicit choice that 32-bit support was on a "best effort" basis. We never tried to explicitly not support 32-bit, and indeed with .NET being as wonderful as it is there are seldom issues with doing so. But I think when we added Direct3D 9 bindings we made an explicit choice that 32-bit support would not be at any cost, we'd prioritise 64-bit if necessary. Regarding this specific issue, it is my expectation that the CLong type is used where possible, but I obviously recognise that can't be used for an enum's backing type. That being said, if you do
Constant<CLong, SomeEnum>, it should do the right thing. I can't remember whether there's anything in the generator currently that would stop that being possible.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. I'll add a task to my tracker to look over the bindings and update the bindings to use
CLongwhere possible.