Skip to content
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

[xml] Unused groups #360

Closed
SunSerega opened this issue Jan 27, 2020 · 8 comments · Fixed by #520
Closed

[xml] Unused groups #360

SunSerega opened this issue Jan 27, 2020 · 8 comments · Fixed by #520
Assignees

Comments

@SunSerega
Copy link
Contributor

Here is list of all groups, which are defined using group attribute on <enum> tag, but aren't used:

ContextFlagMask
ContextProfileMask
SubgroupSupportedFeatures
MapTextureFormatINTEL
TextureSwizzle
TextureCompareMode
PixelTexGenMode
TextureEnvMode
LightEnvModeSGIX
ColorMaterialFace
FeedBackToken
FogMode
GetPixelMap
TextureGenMode
TextureMagFilter
TextureMinFilter
TextureWrapMode
GetConvolutionParameter
ConvolutionBorderModeEXT
PointParameterNameSGIS
TextureFilterFuncSGIS
LightModelColorControl
PixelStoreResampleMode
PixelStoreSubsampleRate
CheckFramebufferStatusTarget
DrawBufferModeATI
FramebufferFetchNoncoherent

I didn't check anything other then group attributes of <proto> and <param> tags in <command> tag. But if i understand correctly - there is no other use for it. Please correct if i'm wrong.

@SunSerega
Copy link
Contributor Author

And now i actually used notepad++'s search - there is certainly no use of these groups, at least in .xml files.

@SunSerega
Copy link
Contributor Author

But still, some more investigation needed...

For instance GetPixelMap is pretty weird. It's not used, but there are also glGetPixelMap{f,ui,us}v commands required in OpenGL1.0 <feature> tag, which it was probably used for. But there is no <command> tag linked to that in actual <commands> tag.
So here problem is probably in missing command, not unused group.

And this is just one randomly picked group, i didn't (yet) checked all. But now i see that at least commands need to be checked before that.

@oddhack
Copy link
Contributor

oddhack commented Jan 27, 2020

I'm not sure exactly what you're saying here. There are definitely GetPixelMap*iv <command> tags, and they are definitely referred to from the GL_VERSION_1_0 <feature> tag (and also from the core/compatibility bifurcation that happened later on, since they are compatibility profile interfaces).

It may be that some of the group definitions ended up being unreachable due to changes to the tagging over time that weren't reflected in the underlying definitions, and such unused groups should be removed.

@SunSerega
Copy link
Contributor Author

There are definitely GetPixelMap*iv tags, and they are definitely referred to from the GL_VERSION_1_0 tag

I'm talking about other <command> tag, the one containing <proto> and <param> tag. This one is missing.

If i understand right - for every <command> tag in <feature> tag - there should be <command> tag in <commands> tag. I don't see .pdf saying anything about this though.

@oddhack
Copy link
Contributor

oddhack commented Jan 27, 2020

There are definitely GetPixelMap*iv tags, and they are definitely referred to from the GL_VERSION_1_0 tag

I'm talking about other <command> tag, the one containing <proto> and <param> tag. This one is missing.

They should be present, starting at line 19170 of the current gl.xml - do you not see them in your view of the repo?

@SunSerega
Copy link
Contributor Author

Oh, now i see them... I was probably too sleepy when checked it. I also looked at search history in notepad - it was also there when i first checked.

@Perksey
Copy link
Contributor

Perksey commented Jan 27, 2020

With this regard, I intend to publicize our GLSpecTools which we've developed and used internally as part of our ongoing effort to help ensure group correctness, perhaps as a pull-request check idk I'll have to have a chat with oddhack about that at some point when I have a bit more time.

I'll try and get a conclusive list of unused groups, ungrouped enums, and functions not using group tags at some point in the near future.

@Perksey
Copy link
Contributor

Perksey commented Mar 6, 2020

More or less a duplicate of #361 as the same principle, but we should keep this one open.

This sadly won't be fixed as part of my upcoming PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants