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-14 18:07:37 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-09-14 18:30:25 +0300
commita040e8df3669d6e1e6fe4a973cd78366c2cf70a9 (patch)
treeaa3c970aeebde7e209cf0886da0a9309335f21bf /source/blender/gpu/intern/gpu_context_private.hh
parentcfd9c0c199060732e61751708a07db44b1abe6c5 (diff)
GPU: Add debug groups
Debug groups makes it easier to view from where an error comes from. The backend can also implement its own callback to make it easier to follow the API call structure in frame debuggers.
Diffstat (limited to 'source/blender/gpu/intern/gpu_context_private.hh')
-rw-r--r--source/blender/gpu/intern/gpu_context_private.hh6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_context_private.hh b/source/blender/gpu/intern/gpu_context_private.hh
index 38f94b8dde9..bf34f20afe4 100644
--- a/source/blender/gpu/intern/gpu_context_private.hh
+++ b/source/blender/gpu/intern/gpu_context_private.hh
@@ -29,6 +29,7 @@
#include "GPU_context.h"
+#include "gpu_debug_private.hh"
#include "gpu_framebuffer_private.hh"
#include "gpu_immediate_private.hh"
#include "gpu_shader_private.hh"
@@ -61,6 +62,8 @@ class Context {
FrameBuffer *back_right = NULL;
FrameBuffer *front_right = NULL;
+ DebugStack debug_stack;
+
protected:
/** Thread on which this context is active. */
pthread_t thread_;
@@ -84,6 +87,9 @@ class Context {
virtual void memory_statistics_get(int *total_mem, int *free_mem) = 0;
+ virtual void debug_group_begin(const char *, int){};
+ virtual void debug_group_end(void){};
+
bool is_active_on_thread(void);
};