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-09-05 17:47:31 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-09-05 18:49:14 +0300
commit9764d3e4dc10d0fda0bfbdbb68f291ff1af76845 (patch)
tree14cfb633fbe03e2fc455f180ec2b592a0b240397 /source/blender/gpu
parent71872e3809fda6a18f76e0a6e5cb6b268dcbf0fa (diff)
GLDebug: Trim NVidia debug output
These buffer detailed infos are not needed unless going deep into perf. profiling, in which case you can still disable this compile option. This makes user report log much more readable.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/opengl/gl_debug.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/gpu/opengl/gl_debug.cc b/source/blender/gpu/opengl/gl_debug.cc
index 1b0d36d331e..5915b3ea226 100644
--- a/source/blender/gpu/opengl/gl_debug.cc
+++ b/source/blender/gpu/opengl/gl_debug.cc
@@ -30,6 +30,8 @@
#include "BKE_global.h"
+#include "GPU_platform.h"
+
#include "glew-mx.h"
#include "gl_context.hh"
@@ -39,6 +41,9 @@
#include <stdio.h>
+/* Avoid too much NVidia buffer info in the output log. */
+#define TRIM_NVIDIA_BUFFER_INFO 1
+
namespace blender::gpu::debug {
/* -------------------------------------------------------------------- */
@@ -67,6 +72,13 @@ static void APIENTRY debug_callback(GLenum UNUSED(source),
{
const char format[] = "GPUDebug: %s%s\033[0m\n";
+ 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. */
+ return;
+ }
+
if (ELEM(severity, GL_DEBUG_SEVERITY_LOW, GL_DEBUG_SEVERITY_NOTIFICATION)) {
if (VERBOSE) {
fprintf(stderr, format, "\033[2m", message);