[Bf-blender-cvs] [bc0a33a8124] master: GPU: Debug: Trim shader stats from output log
Clément Foucault
noreply at git.blender.org
Sat Oct 24 20:07:18 CEST 2020
Commit: bc0a33a81243481e98e2df92a903da2393a16bbd
Author: Clément Foucault
Date: Fri Oct 23 19:31:57 2020 +0200
Branches: master
https://developer.blender.org/rBbc0a33a81243481e98e2df92a903da2393a16bbd
GPU: Debug: Trim shader stats from output log
We don't make use of it anyway.
===================================================================
M source/blender/gpu/opengl/gl_debug.cc
===================================================================
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);
More information about the Bf-blender-cvs
mailing list