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

GetDebugMessageLogAMD takes GLint* argument instead of GLenum* #516

Closed
NogginBops opened this issue Jun 17, 2022 · 6 comments · Fixed by #528
Closed

GetDebugMessageLogAMD takes GLint* argument instead of GLenum* #516

NogginBops opened this issue Jun 17, 2022 · 6 comments · Fixed by #528

Comments

@NogginBops
Copy link
Contributor

The function GetDebugMessageLogAMD from GL_AMD_debug_output is defined as follows:

uint GetDebugMessageLogAMD(uint count,
                               GLsizei bufsize,
                               GLenum* categories,
                               GLuint* severities,
                               GLuint* ids,
                               GLsizei* lengths, 
                               GLchar* message);

Shouldn't the severities argument be of type GLenum?
This would match every other definition of this function from other extensions.

As they are typedefed as the same type is it possible to change this?

@rpatlega
Copy link

This function will return the following severity levels to parameter GLuint* severities.
#define GL_DEBUG_SEVERITY_HIGH_AMD 0x9146
#define GL_DEBUG_SEVERITY_MEDIUM_AMD 0x9147
#define GL_DEBUG_SEVERITY_LOW_AMD 0x9148

Refer to specification for details -

The GLuint and GLenum are typecasted from unisigned int, so should not be any concerns of conversion from application side.
typedef unsigned int GLenum;
typedef unsigned int GLuint;

So application will get the Glenum as expected here. The IHV vendors will be returning severity levels as mentioned above.

@NogginBops
Copy link
Contributor Author

This is more of a issue is more in relation to #517.
I know how the function works and how it's not a problem in c.
But it's a problem in many bindings generators for other programming languages.

@oddhack
Copy link
Collaborator

oddhack commented Jul 10, 2022

I suggest trying to contact Jaakko Konttinen, who is listed as the extension contact. I believe they're still at AMD, 12 years on. I am fairly sure none of the other listed contributors to the extension are still at AMD but if you can't reach the contact, we can ask around inside Khronos to see if anyone at AMD feels ownership over this extension.

@rpatlega
Copy link

We have approved extension - GL_ARB_ debug_output.txt
https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_debug_output.txt

which has listed these parameters to enum* severities.
uint GetDebugMessageLogARB(uint count,
sizei bufSize,
enum* sources,
enum* types,
uint* ids,
enum* severities,
sizei* lengths,
char* messageLog);

We have discussed this in working group, and we dont have issues to keep it to GLuint * or change to GLenum* severities.

@pdaniell-nv
Copy link
Contributor

To be clear, the WG doesn't have an issue with the GL_AMD_debug_output extension changing from GLuit to GLenum if that's acceptable to AMD.

@rpatlega
Copy link

Yes, this is acceptable to AMD.

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