-
-
Notifications
You must be signed in to change notification settings - Fork 442
[3.0] Implement improvements identified in previous Vulkan PR #2503
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
Draft
Exanite
wants to merge
49
commits into
dotnet:develop/3.0
Choose a base branch
from
Exanite:feature/vulkan-bindings-3.0-improvements
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.
Draft
[3.0] Implement improvements identified in previous Vulkan PR #2503
Exanite
wants to merge
49
commits into
dotnet:develop/3.0
from
Exanite:feature/vulkan-bindings-3.0-improvements
Conversation
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 looks like it's from some sort of built-in renamer. Don't think we'll ever use this since we have a custom renamer.
… work with native name attributes
Not sure why these were not being coerced when the Vulkan PR was merged, but they started getting coerced in this PR. This technically is a good thing since it means the coerce backing types code is now working as previously intended. However, the previously intended implementation missed an edge case, which this commit fixes.
This is because the structs were impossible to reasonably construct before.
VaListTagHandle is an extra handle struct that seems to generate on Linux (and not on Windows) and breaks global prefix determination.
OpenAL: ContextErrorCode seems to always be replaced with ErrorCode, even on Windows. Not sure why. This also happened during the last PR, but I didn't commit it.
…name trimmer code
Honestly, what I wrote is a complete guess, I'll likely revisit these once I understand them more.
The functionality this method contains seems heavily duplicated. I will likely update existing code in a later commit.
SDL is still erroring:
Sdl.gen.cs(60143,45): Error CS0266 : Cannot implicitly convert type 'long' to 'nint'. An explicit conversion exists (are you missing a cast?)
Sdl.gen.cs(60143,35): Error CS0133 : The expression being assigned to 'Sdl.MaxSint64' must be constant
[NativeTypeName("#define SDL_MAX_SINT64 SDL_SINT64_C(0x7FFFFFFFFFFFFFFF)")]
public const nint MaxSint64 = unchecked(0x7FFFFFFFFFFFFFFF);
At first glance, this might be a ClangSharp issue with how these defines are generated on Linux.
f991aaa to
b4cdd0e
Compare
… function pointer structs
… TransformEnums can rewrite member values now
These aren't fully accurate yet though.
… is more helpful when googling
…es to be after all types are extracted
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 focuses on implementing the improvements identified in #2457.
Depending on the scope of the tasks, some of these tasks may be pushed to another PR.
Related issues, Discord discussions, or proposals
Previous Vulkan PR (initial bindings generation): #2457
Discord thread: https://discord.com/channels/521092042781229087/1376331581198827520/1442651368207941643
Further Comments
Tasks not part of this PR
These are the tasks from my previous PR. These have been sorted and trimmed down to ensure that this PR remains focused. These may be added to this PR.
If you want to see the original, unmodified set of tasks, please see #2457.
SType)Future PRs
Name prettification
StdVideoEncodeH264SliceHeaderFlagsproperty names. They currently aren't getting prettified.New Tasks
SDL_MAX_SINT64generation on Linuxpublic const nint SDL_MAX_SINT64 = unchecked(0x7FFFFFFFFFFFFFFF);does not compileExtractNestedTypingandTransformHandlesinto a new set ofExtract-mods.ExtractNestedTyping, but forTransformHandles, it is useful forAddApiProfilesto be executed after all types are extracted, but not yet transformed.AddApiProfilesstrictly work off ofNativeNameattributes.Current Todos
Improve prefix and suffix handling during prettification.
PFNVkDebugUtilsMessengerCallbackEXTandBufferTHandlePFNVkDebugUtilsMessengerCallbackEXTprefixPFNVkDebugUtilsMessengerCallbackDelegateEXTsuffixAccelerationStructureHandleKHRsuffixNameSuffixattributes.HandleEXTinstead ofEXTHandlefor readability.Completed Todos
(Newest groups at the top. Order within a group is chronological.)
Fix bugs from original PR
Handle struct improvements
Things to watch for during review
I regenerated all of the bindings, but on Linux. I'll probably commit the Windows version before undrafting for consistency. Note that I only have access to Linux/Windows so when I say only on Linux/etc, I mean on Linux and not on Windows.