KhronosGroup / OpenGL-Registry

OpenGL, OpenGL ES, and OpenGL ES-SC API and Extension Registry
690 stars 276 forks source link

GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX #519

Closed SunSerega closed 2 years ago

SunSerega commented 2 years ago

GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX and GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX were added in the first commit of this repo. And they are contained in the PixelTexGenMode group, which is only used for glPixelTexGenSGIX, but I can't find any reason why these enums should be accepted.

Relevant spec I found: https://github.com/KhronosGroup/OpenGL-Registry/blob/91aa993da3cc9e7ea1eecf3075de8c03d9a15d09/extensions/SGIX/SGIX_pixel_texture.txt#L130-L131 https://github.com/KhronosGroup/OpenGL-Registry/blob/91aa993da3cc9e7ea1eecf3075de8c03d9a15d09/extensions/SGIX/SGIX_impact_pixel_texture.txt#L41-L47

Perksey commented 2 years ago

Group note: To be completely honest I really don't like that group names contain extension vendor names, as in pretty much every instance they have been reused elsewhere in the spec, often by a different vendor or in the core spec itself which makes the vendor suffix confusing at best (e.g. see BufferTargetARB which is a cornerstone of modern OpenGL)

SunSerega commented 2 years ago

I really don't like that group names contain extension vendor names

Same. I finally changed my code-generators a few days ago to remove them, mostly because of ProgramPropertyARB and such. And what I've then got in logs:

WARNING: Groups [ConvolutionTargetEXT] had different enums from [ConvolutionTarget]
WARNING: Groups [SeparableTargetEXT] had different enums from [SeparableTarget]
WARNING: Groups [HistogramTargetEXT] had different enums from [HistogramTarget]
WARNING: Groups [MinmaxTargetEXT] had different enums from [MinmaxTarget]
WARNING: Groups [SamplePatternEXT] had different enums from [SamplePattern]
WARNING: Groups [ColorTableTargetSGI] had different enums from [ColorTableTarget]
WARNING: Groups [VertexArrayPNameAPPLE] had different enums from [VertexArrayPName]
WARNING: Groups [VertexAttribEnumNV] had different enums from [VertexAttribEnum]
WARNING: Groups [ShadingRateQCOM] had different enums from [ShadingRate]
WARNING: Groups [HintTargetPGI] had different enums from [HintTarget]

This is the next thing I want to look into. But only after #520, because I already noticed that changes of #521 are painfully incompatible with #520 because they both add groups to the same enums in multiple places...


Though PixelTexGenMode (the only relevant here group) doesn't have the vendor name at the end, so I'm not sure why are you writing it here...

P.S. Ah nevermind, I see now, I merged PixelTexGenMode into PixelTexGenModeSGIX in that pull...

SunSerega commented 2 years ago

https://opensource.apple.com/source/X11libs/X11libs-60/mesa/Mesa-7.8.2/src/glx/apple/specs/enumext.spec.auto.html Note Extension #126.

Extension #126 is this: https://www.khronos.org/registry/OpenGL/extensions/SGIX/SGIX_impact_pixel_texture.txt

This is the extension text I used when in this commit of #520. And it has:

But not:

I guess that means these 2 enums were defined in some sort of draft, but then removed from extension while forgetting the registry?

pdaniell-nv commented 2 years ago

Sounds plausible. Please feel free to post a PR to fix this.