Repository navigation
Mark all enum constants with their enumeration - #1587
Draft
NogginBops wants to merge 6 commits into
Draft
NogginBops wants to merge 6 commits into
NogginBops wants to merge 6 commits into
Conversation
|
|
Author
|
Also, during this work I've found the following issue (#1585) the made it hard to know where to group some enums. |
Contributor
|
I made a slightly different proposal along your lines here #1636, I think it will be slightly less intrusive on the header side right now. Thanks for this proposal, it was very helpful. |
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.
After many attempts at making enum group metadata available in
cl.xml(#779, #926, #1145), I've decided to give it a try too.In this PR I went with the original plan of marking the
<enums>-tags themselves with the enum groups the containing enums have, but also allow individual<enum>-tags be marked with additional enum groups that they are part of.This is similar to how this is handled in
gl.xmlwhere the group association is done directly on the enum entries themselves.Before marking this PR as not a draft I'll probably undo my excessive splitting of
<enums>-tags.My original goal was to only have
group=""attributes on the<enums>-tags and not on<enum>-tags but in hindsight this was not necessarily a good idea due to most entries not being grouped by enumeration.Personally I think I'm leaning towards #926 being the better approach as it is features and extensions themselves that define the typedefs for enum groups so the association between enum entry and type name seems more appropriate there.
The argument for doing the approach this PR does is that it matches how this data is described in
gl.xmland there this enum grouping has been very successful. Important to note is that the enum group situation in OpenGL seems to much more complicated than it is in OpenCL and I feel it should be possible to have very accurate enum groups incl.xml, with enough information the https://github.com/KhronosGroup/OpenCL-Docs/blob/main/man/static/enums.txt file could even be machine generated to always be kept up to date.