c++linuxdebuggingopenglmesa

lots of OpenGL glDebugOutput Shader Stats / Shader Compiler / Other / notification severity messages with mesa radeon


I have an opengl toy code that I am using to learn ogl and 3d graphics. I am using glDebugMessageCallback and glDebugMessageControl to check for OGL errors and on windows I did not have any messages. I am now testing my code on linux and I am getting a lot of these message:

Debug message (1): Shader Stats: SGPRS: 16 VGPRS: 12 Code Size: 88 LDS: 0 Scratch: 0 Max Waves: 8 Spilled SGPRs: 0 Spilled VGPRs: 0 PrivMem VGPRs: 0 DivergentLoop: 0, InlineUniforms: 0, ParamExports: 2, (VS, W64)
Source: Shader Compiler
Type: Other
Severity: notification

Here is some more info on my environment

[OpenGL] OpenGL version loaded: 4.6
[OpenGL] Vendor: AMD
[OpenGL] Renderer: AMD Radeon RX 570 Series (polaris10, LLVM 13.0.1, DRM 3.44, 5.17.3-302.fc36.x86_64)
[OpenGL] Version: 4.6 (Compatibility Profile) Mesa 22.0.1
[OpenGL] Version GLSL: 4.60

My question is why do i not get these message in windows and why do I keep getting them even if i change my callback from

glDebugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE , 0, nullptr, GL_TRUE);

to

glDebugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DEBUG_SEVERITY_HIGH_AMD , 0, nullptr, GL_TRUE);

? they seem informational to me and at this rate they are mostly noise


Solution

  • My question is why do i not get these message in windows

    The debug messages are completely implementation-specific. In the worst case, you could not get any message at all. The verbosity of the different drivers can vary a lot, the mesa open source drivers on Linux are notably on the more verbose end of the spectrum. Nvidia Win/Linux is also quite good in that regard, but AMD and INtel on windows can be quite lacking.

    and why do I keep getting them even if i change my callback from [...] to

    glDebugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DEBUG_SEVERITY_HIGH_AMD , 0, nullptr, GL_TRUE);
    

    Because glDebugMessageControl(..., GL_DEBUG_SEVERITY_HIGH_AMD, ..., GL_TRUE) just enables the SEVERITY_HIGH messages (which were enabled before anyways), it does not disable the SEVERITY_NOTIFICATION which are still enabled by default, as stated in the GL_KHR_debug extension specification (the other variants of the debug output exstensions like the AMD one are similar):

    Messages can be either enabled or disabled. Messages that are disabled will not be generated. All messages are initially enabled unless their assigned severity is DEBUG_SEVERITY_LOW. The enabled state of messages can be changed using the command DebugMessageControl.