-
-
Notifications
You must be signed in to change notification settings - Fork 444
[3.0] Implement name-related 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
Merged
Perksey
merged 341 commits into
dotnet:develop/3.0
from
Exanite:feature/vulkan-bindings-3.0-improvements
Jan 11, 2026
Merged
[3.0] Implement name-related improvements identified in previous Vulkan PR #2503
Perksey
merged 341 commits into
dotnet:develop/3.0
from
Exanite:feature/vulkan-bindings-3.0-improvements
Jan 11, 2026
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
f991aaa to
b4cdd0e
Compare
…nary The secondaries are never used so this doesn't affect anything and simplifies the code. I'm guessing the TODO comment implies that these were
… cased Lots of breaking changes and also a good amount of non-ideal changes. These non-ideal changes will be fixed later in this PR.
…y allocation by using an preallocated array
…et and refactor code
Note that running the generator with this commit unmodified will lead to to a crash in NameUtils.Prettify due to an empty string input. This is because of VkVendorId. You'll have to replace the exception in NameUtils.Prettify with a return statement (just return `ret`) to have the generator work.
It's not used and using it causes issues
…et OpenGL bindings to generate properly All 4 non-Microsoft APIs were regenerated in this commit.
…vulkan-bindings-3.0-improvements
… hacks used in MixKhronosData
These changes are expected because the default acronym threshold is now 2 and the suffixes are not declared as NameAffixes.
[3.0] Change acronym threshold to 2 for all bindings
[3.0] Heavily expand testing suite; Rewrite NameUtils.Prettify; Fix a lot of subtle naming bugs
Perksey
approved these changes
Jan 11, 2026
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 naming-related improvements identified in #2457.
Depending on the scope of the tasks, some of these tasks may be pushed to another PR.
This PR also contains the changes of multiple other PRs.
See each individual PR for more information.
Included PRs:
Important changes:
-HandleEXTinstead of-EXTHandle.AccelerationStructureHandleKHR-DelegateEXTinstead ofEXTDelegate.pfn struct BufferCallbackSOFTandpfn delegate BufferCallbackDelegateSOFTalGetSourcei64vDirectSOFTare now trimmed and prettified asGetSourcei64vDirectSOFTinstead ofGetSourcei64VDirectSOFT. Note the capitalization ofv. This is because affixes are added after prettification.TrimEnumMemberImpliedVendorstrims enum member vendor suffixes if it matches the enum type vendor suffix.INameTrimmer.Orderis used to order the trimmers instead of the version.List<string>?) have been made non-nullable. Most of these get allocated anyway and it makes the code more maintainable. If there is any performance issue (mainly concerning the Microsoft job), I will take the time to optimize it.NativeTypeName,NameAffix,TransformedRelated issues, Discord discussions, or proposals
Previous Vulkan PR (initial bindings generation): #2457
Discord thread: https://discord.com/channels/521092042781229087/1376331581198827520/1442651368207941643
This PR also contains the changes of multiple other PRs.
See each individual PR for more information.
Included PRs:
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.
These will also be part of a future PR.
SType)NativeNamefor resolving API profilesFuture PRs
SDL_MAX_SINT64generation on Linuxpublic const nint SDL_MAX_SINT64 = unchecked(0x7FFFFFFFFFFFFFFF);does not compileTransformFunctions.Silk.NET.SDL.ConditionHandle.gen.csinstead ofConditionHandle.gen.cswhen running multiple jobs at the same time.ExtractNestedTypingandTransformHandlesinto a new set ofExtract-mods.ExtractNestedTyping, but forTransformHandlesit is useful forAddApiProfilesto be executed after all types are extracted, but not yet transformed.AddApiProfileswork off ofNativeNameattributes.alSourceRewindvandalSourceRewind. ThedinRewindcan be mistaken as a data type suffix, so we add it to theEndingsNotToTrimregex. However, thedvinRewindvalso has the same problem.WordsNotToTrimIntothanEndingsNotToTrim.NativeNameattributes.StripAttributestoCleanupAttributesand adding an option in its config to optimizeNativeNameattributes.LenientUnderscoreand updating codebase to useNameSplitterIsProbablyABitmaskfunction based on BuildTool's IsProbablyABitmask for identifying flags enumsPerformanceCounterDescriptionArmNameshould bePerformanceCounterDescriptionARMNameINameTrimmer.Order/Versionissue (we don't want magic numbers) and consider removingINameTrimmerentirely.Done during later PRs:
OESbeing singularizing intoOinArrayParameterTransformer.TransformArrayParameterRewriter.glFeedbackBufferxOESTransformArrayParameterRewritercan singularize the base name instead of the full name.GLEnumtoGLenum. Same forALCenumandALenum.Completed Todos
Newest groups at the top. Order within a group is chronological.
Note that I also wrote a summary at the top. The summary is more comprehensive, but this section can be useful getting additional context. Also see my commit descriptions if more context is needed.
Prepare to merge.
Acronym threshold change and prettify improvements
Mat4X4case. The "X" should be lowercased.EGLasEglINameTrimmer.Order
INameTrimmer.INameTrimmer.Orderproperty and internalTrimmerOrderenum.Fix misc issues I noticed
VkVendorIdmembers are not trimmed properlyAttribMaskin OpenGL are not getting rewritten.fieldSymbol.ConstantValueis null, but why it is null is unclear. Maybe a Roslyn bug? Example member:DepthBufferBit = unchecked((uint)0x00000100). Note that similar expressions in Vulkan are fine, eg:unchecked((ulong)0x00000002UL). Maybe it is because the literal type and cast type are different.ParseTypeName(baseType)instead ofIdentifierName(baseType).Fix issues introduced by name affix system
MixKhronosDatacode removals to the currentdevelop/3.0branch and see what changes would be made. This is to ensure I don't accidentally remove functionality when deleting code.Name affix system
PFNVkDebugUtilsMessengerCallbackEXTandBufferTHandlePFNVkDebugUtilsMessengerCallbackEXTprefixPFNVkDebugUtilsMessengerCallbackDelegateEXTsuffixAccelerationStructureHandleKHRsuffixNameSuffixattributes.HandleEXTinstead ofEXTHandlefor readability.Name metadata
GLEnumand the other OpenGL enumsName prettification
Change naming convention to not capitalize acronyms (i.e., strictly pascal cased)See: https://discord.com/channels/521092042781229087/1376331581198827520/1395097379329282089Update generated method class names in the rsp files to be strictly pascal caseStdVideoEncodeH264SliceHeaderFlagsproperty names. They currently aren't getting prettified.Fix bugs from original PR
Handle struct improvements