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

GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX #519

Closed
SunSerega opened this issue Jun 24, 2022 · 4 comments
Closed

GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX #519

SunSerega opened this issue Jun 24, 2022 · 4 comments

Comments

@SunSerega
Copy link
Contributor

SunSerega commented Jun 24, 2022

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:

INVALID_ENUM is generated if PixelTexGenSGIX parameter <mode> is not NONE,
ALPHA, RGB, or RGBA.

Accepted by the <mode> parameter of PixelTexGenSGIX:
PIXEL_TEX_GEN_Q_CEILING_SGIX
PIXEL_TEX_GEN_Q_FLOOR_SGIX
PIXEL_TEX_GEN_Q_ROUND_SGIX
PIXEL_TEX_GEN_ALPHA_LS_SGIX
PIXEL_TEX_GEN_ALPHA_MS_SGIX

@Perksey
Copy link
Contributor

Perksey commented Jun 25, 2022

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
Copy link
Contributor Author

SunSerega commented Jun 25, 2022

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
Copy link
Contributor Author

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:

  • PIXEL_TEX_GEN_Q_CEILING_SGIX = 0x8184
  • PIXEL_TEX_GEN_Q_ROUND_SGIX = 0x8185
  • PIXEL_TEX_GEN_Q_FLOOR_SGIX = 0x8186
  • PIXEL_TEX_GEN_ALPHA_LS_SGIX = 0x8189
  • PIXEL_TEX_GEN_ALPHA_MS_SGIX = 0x818A

But not:

  • PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX = 0x8187
  • PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX = 0x8188

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
Copy link
Contributor

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

@oddhack oddhack closed this as completed in b066d8b Jul 7, 2022
oddhack pushed a commit that referenced this issue Sep 29, 2022
* FramebufferFetchNoncoherent => GetPName,EnableCap

https://github.com/KhronosGroup/OpenGL-Registry/blob/237f076633e67d7396cbed15f112e515a7d85251/extensions/QCOM/QCOM_shader_framebuffer_fetch_noncoherent.txt#L61

* DrawBufferModeATI => DrawBufferMode

Renamed in <param> but not definition
db455e3#diff-e264a54745d72adc78ba865d49dfe4a83689d6307ed6ea03133096d211dc03c6L14360

* CheckFramebufferStatusTarget => FramebufferTarget

"CheckFramebufferStatusTarget" was removed from <param>, but then re-added as new group "FramebufferTarget" with same enums

* ContainerType: add to <param>

A single use for a group of single enum value:
https://github.com/KhronosGroup/OpenGL-Registry/blob/91aa993da3cc9e7ea1eecf3075de8c03d9a15d09/extensions/ARB/ARB_shader_objects.txt#L1768

* RegisterCombinerPname =+> TextureEnvParameter

https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glTexEnv.xml
Not all functions with TextureEnvParameter accept all enums from this group
But this change is mostly to show that these enums only belong to deprecated functions and can be ignored

* VertexBufferObjectParameter => X

#400
"VertexBufferObjectParameter" was removed from <param>, replaced by "BufferPNameARB"
But not from group definitions

* TextureFilterFuncSGIS => X

https://github.com/KhronosGroup/OpenGL-Registry/blob/main/extensions/SGIS/SGIS_texture_filter4.txt
GL_FILTER4_SGIS is only used in glTexParameter* and gl[Get]TexFilterFuncSGIS

* [Get]ColorTableParameterPName[SGI] => ColorTableParameterPName

These groups have same enums
And only *SGI variants were ever used

* [Get]ConvolutionParameter[EXT] => ConvolutionParameter

* GlslTypeToken => X

#401
"GlslTypeToken" wasn't removed after removing it's uses
Though "GL_UNSIGNED_INT_ATOMIC_COUNTER" is now groupless...
But I guess it can be neither attribute nor uniform, so this define is useless.

* LightEnvModeSGIX: add to <param>

* PointParameterNameSGIS =+> PointParameterNameARB,GetPName

* GetPixelMap => X

Same as PixelMap, but never used

* TransformFeedbackTokenNV: add to <param>

https://github.com/KhronosGroup/OpenGL-Registry/blob/main/extensions/ARB/ARB_transform_feedback3.txt#L693

* ColorMaterialFace,CullFaceMode,StencilFaceDirection => MaterialFace

Same enums, but:
ColorMaterialFace not used at all
CullFaceMode and StencilFaceDirection are barely used anywhere

cleanup after #355

* PixelTexGenMode =+> PixelTexGenModeSGIX

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

Also see:
#519

* ReplacementCodeSUN => TriangleListSUN

ReplacementCodeSUN isn't defined
Instead TriangleListSUN is expected

Also glReplacementCodeuivSUN was missing group
But I'm not adding it to glReplacementCodeusSUN and such, because they have different enum size

* TextureParameterName: add GL_TEXTURE_MEMORY_LAYOUT_INTEL

https://github.com/KhronosGroup/OpenGL-Registry/blob/91aa993da3cc9e7ea1eecf3075de8c03d9a15d09/extensions/INTEL/INTEL_map_texture.txt#L61-L63

* CommandOpcodesNV: add to <param>

* PerformanceQueryCapsMaskINTEL: add to <param>

* TraceMaskMESA => X

This group does not exist

* VertexHintsMaskPGI: add to <param>

* MaterialFace => TriangleFace

* Re-add TraceMaskMESA

* Remove tabs and resurrected PixelTexGenMode
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

No branches or pull requests

3 participants