[3.0] Add OpenCL and OpenXR bindings#2590
Draft
Exanite wants to merge 104 commits into
Draft
Conversation
Contributor
|
Minimum allowed coverage is Generated by 🐒 cobertura-action against 9395d21 |
f22575c to
d3c7136
Compare
Contributor
|
All native library builds modified in this PR shall attempt to be built by CI. |
5f35d7d to
9395d21
Compare
This is easier to work with since the names match the names given in the spec. Also, apparently TypeMap was always supposed to use the native name. The docs for TypeMap imply that it was. That said, I didn't realize until after I made the change.
…"extension_name.group.name"
*Still needs some additional cleanup to have proper vendor suffix identification, but that's a separate task.
…e instead of managed name
…he managed name I already made the change in ProcessAndGetNewAttributes in a previous PR, but apparently didn't do the same for the VisitEnumDeclaration method.
…for transformed OpenCL enum names
ed71cae to
ec2e58a
Compare
…_intel.2 with the non-2 version of the enum
Contributor
|
Some of the native library builds modified in this PR were not referenced in the PR description. Please ensure that the PR description contains |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary of the PR
This PR was originally going to be a mega-PR for all of the remaining Khronos-related bindings and Assimp.
However, I've changed the scope of this PR to focus primarily on OpenCL and OpenXR.
This PR is intended to get the bindings to a point where they exist, but not yet guaranteed to be usable. This is because I want to ensure that future changes are made taking into account all of the Khronos bindings that we plan to ship with.
As such, I do not plan on testing the bindings in this PR. I will be writing smoke-tests for the different bindings available in a separate PR.
Update: I've changed the scope of this PR to only include OpenCL and OpenXR. This PR also includes some improvements to the existing Khronos bindings.
Related issues, Discord discussions, or proposals
Discord thread for this PR: https://discord.com/channels/521092042781229087/1514735149915439274
Further Comments
Tasks
MetadataUtils.GetTypeDetailsto naively resolve symbols.Excludecl_boolfrom being generated? Question mark because I later realized that enums don't have any members. Figure out whethercl_boolis useful (contains members) and check if other similar APIs have a similar enum (I think OpenAL might).cl_boolsince Silk 2 has it and there is some use to keeping it, even if it's not much.contextbeing identified ascont + extwhereextis a vendor suffix.ErrorCodesprobably should be manually specified. Need to look in the headers for the correct type.GLenum/CLenum) that we can type map.cl_accelerator_info_intelis prettified asAcceleratorInfointelinstead ofAcceleratorInfoINTEL.Improve handling of "blocked" enums (for lack of a better term). Some enums have numbers at the end of their name (eg:cl_intel_advanced_motion_estimation.cl_motion_detect_desc_intel.2). We may want to combine these enums together.sas is.IntelAdvancedMotionEstimationClMotionDetectDescIntel2is the current name and contrasts withIntelAdvancedMotionEstimationClMotionDetectDescINTEL, which has the vendor suffix properly identified.Part of previous block?blockin the tasks here and SilkTouch source code is to be consistent with this comment. I was going to call these "sectioned" enums rather than "blocked" enums, but noticed that the spec calls the different sections "blocks".cl_intel_advanced_motion_estimation.cl_motion_detect_desc_intel.2with the non-2 version. The non-2 version focuses on direction while the 2 version focuses on weights/fractions, so it makes sense to keep them separate.typedef struct _Type* Typein the headers. I handled these the same wayGLsyncis handled in OpenGL since that type has the same pattern.AddOpaqueStructsfor these, but then realizedExtractHandlesworks on OpenCL. Not sure why it doesn't forOpenGL.Sync*withSyncHandle..gen.cs.csfiles do not get modified by SilkTouchdevelop/3.0Split into future PRs
Khronos vendor suffixes:
Remaining bindings I plan to work on:
MoltenVK would just be a native build. VMA is not on the tracking issue, but we already discussed that we want this to be in Silk 3 (and I want it for my personal projects as well).
develop/3.0