From 70cc0d7121aa70894bb98bb6ae25f8c461918350 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Fri, 23 Oct 2020 19:31:57 +0200 Subject: GPU: Debug: Trim shader stats from output log We don't make use of it anyway. --- source/blender/gpu/opengl/gl_debug.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/source/blender/gpu/opengl/gl_debug.cc b/source/blender/gpu/opengl/gl_debug.cc index 848c0c462fe..69289d7602e 100644 --- a/source/blender/gpu/opengl/gl_debug.cc +++ b/source/blender/gpu/opengl/gl_debug.cc @@ -48,6 +48,8 @@ static CLG_LogRef LOG = {"gpu.debug"}; /* Avoid too much NVidia buffer info in the output log. */ #define TRIM_NVIDIA_BUFFER_INFO 1 +/* Avoid unneeded shader statistics. */ +#define TRIM_SHADER_STATS_INFO 1 namespace blender::gpu::debug { @@ -81,12 +83,15 @@ static void APIENTRY debug_callback(GLenum UNUSED(source), if (TRIM_NVIDIA_BUFFER_INFO && GPU_type_matches(GPU_DEVICE_NVIDIA, GPU_OS_ANY, GPU_DRIVER_OFFICIAL) && - STREQLEN("Buffer detailed info", message, 20)) { - /** Supress buffer infos flooding the output. */ + STRPREFIX(message, "Buffer detailed info")) { + /** Suppress buffer infos flooding the output. */ return; } - const char format[] = "GPUDebug: %s%s%s\033[0m\n"; + if (TRIM_SHADER_STATS_INFO && STRPREFIX(message, "Shader Stats")) { + /** Suppress buffer infos flooding the output. */ + return; + } const bool use_color = CLG_color_support_get(&LOG); -- cgit v1.2.3