Skip to content

Conversation

@Exanite
Copy link
Member

@Exanite Exanite commented Jan 13, 2026

Summary of the PR

This fixes the interaction between Khronos vendor suffixes and the Singularize method, which led to cases like the following:

image

In order to fix this, this also exposes the NameAffix API, allowing mods to read NameAffix attributes and process the name without the affixes attached.

Related issues, Discord discussions, or proposals

Original Discord discussion: https://discord.com/channels/521092042781229087/1376331581198827520/1456785841753035005

Further Comments

Todo list:

  • Prevent OES and similar from being singularizing into O in ArrayParameterTransformer.TransformArrayParameterRewriter.
    • Eg: glFeedbackBufferxOES
    • Discussed solution is to expose the name affix API so that TransformArrayParameterRewriter can singularize the base name instead of the full name.
    • OES (incorrect version is OOES)
    • SGIS (incorrect version is SgiSGIS)
  • Allow mods to read NameAffix data.
  • Allow mods to strip a name of its affixes
  • Allow mods to re-apply a list of affixes to the name, but without allowing mods to deeply configure the process
    • Reasoning is that more involved transformations should be restricted to PrettifyNames.
    • This is because PrettifyNames can be configured by the generator user, while other mods must expose their own (possible duplicate) configuration.
  • Consider updating AddNameAffix API to use the new NameAffixType enum for consistency and simplicity

@Exanite Exanite changed the title [3.0] Fix OES/SGIS singularize issue and expose NameAffix API [3.0] Improve handling of affixed names when singularizing (OES/SGIS issue) and expose NameAffix API Jan 13, 2026
@Exanite Exanite force-pushed the fix/vendor-suffix-singularize-interaction branch from 6b7c293 to 589792e Compare January 13, 2026 08:14
… the AddNameAffix method instead of AddNameSuffix/Prefix separately
Copy link
Member Author

@Exanite Exanite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self review completed

@Exanite Exanite marked this pull request as ready for review January 15, 2026 01:10
@Exanite Exanite requested a review from a team as a code owner January 15, 2026 01:10
@Exanite Exanite enabled auto-merge January 22, 2026 13:03
@Exanite Exanite disabled auto-merge January 24, 2026 03:20
@Exanite Exanite enabled auto-merge (squash) January 24, 2026 16:57
@Exanite Exanite merged commit 84dd96f into dotnet:develop/3.0 Jan 24, 2026
11 checks passed
@Exanite Exanite deleted the fix/vendor-suffix-singularize-interaction branch January 24, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants