Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2020-10-23 20:31:57 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-10-23 20:33:51 +0300
commit70cc0d7121aa70894bb98bb6ae25f8c461918350 (patch)
tree7152f159ec985bf9f4ecf22697d00fbfe19aa3d7
parenta4f883268ba7f8506cd71eba42e8b734c128519d (diff)
GPU: Debug: Trim shader stats from output log
We don't make use of it anyway.
-rw-r--r--source/blender/gpu/opengl/gl_debug.cc11
1 files 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);