许多 OpenGL glDebugOutput Shader Stats / Shader Compiler / Other / notification severity messages with mesa radeon

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

我有一个 opengl 玩具代码,我用它来学习 ogl 和 3d 图形。我正在使用 glDebugMessageCallbackglDebugMessageControl 检查 OGL 错误,在 windows 上我没有收到任何消息。我现在正在 linux 上测试我的代码,我收到了很多这样的消息:

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

这是关于我的环境的更多信息

[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

我的问题是为什么我在 windows 中没有收到这些消息,为什么即使我从

更改回叫我仍然收到它们
glDebugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE , 0, nullptr, GL_TRUE);

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

?他们对我来说似乎是信息性的,按照这个速度,他们大多是噪音

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

调试消息完全implementation-specific。在最坏的情况下,您根本无法收到任何消息。不同驱动程序的冗长程度可能有很大差异,Linux 上的 mesa 开源驱动程序明显处于更冗长的一端。 Nvidia Win/Linux 在这方面也相当不错,但 AMD 和 INTel 在 windows 上可能会很缺乏。

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);

因为 glDebugMessageControl(..., GL_DEBUG_SEVERITY_HIGH_AMD, ..., GL_TRUE) 启用 SEVERITY_HIGH 消息(无论如何之前已启用),它不会禁用 SEVERITY_NOTIFICATION默认情况下仍然启用,如 GL_KHR_debug extension specification 中所述(调试输出扩展的其他变体,如 AMD 类似):

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.