diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-09-16 02:39:16 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-09-16 02:40:45 +0300 |
commit | 0dd44f46473d3706cc5343e0d01820d5ec56e962 (patch) | |
tree | c433428db8e01b8a0c71feaf3615300690479659 /source/blender | |
parent | 926b426073c20658f26c90641af5093ece142d49 (diff) |
GPU: Add debug groups inside selection code
This makes the debugging easier.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/gpu/intern/gpu_select_pick.c | 5 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_select_sample_query.cc | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_select_pick.c b/source/blender/gpu/intern/gpu_select_pick.c index c76ce0f1094..66748b4146a 100644 --- a/source/blender/gpu/intern/gpu_select_pick.c +++ b/source/blender/gpu/intern/gpu_select_pick.c @@ -27,6 +27,7 @@ #include <stdlib.h> #include <string.h> +#include "GPU_debug.h" #include "GPU_framebuffer.h" #include "GPU_immediate.h" #include "GPU_select.h" @@ -300,6 +301,8 @@ void gpu_select_pick_begin(uint (*buffer)[4], uint bufsize, const rcti *input, c printf("%s: mode=%d, use_cache=%d, is_cache=%d\n", __func__, mode, ps->use_cache, ps->is_cached); #endif + GPU_debug_group_begin("Selection Pick"); + ps->bufsize = bufsize; ps->buffer = buffer; ps->mode = mode; @@ -544,6 +547,8 @@ uint gpu_select_pick_end(void) GPU_viewport(UNPACK4(ps->viewport)); } + GPU_debug_group_end(); + /* assign but never free directly since it may be in cache */ DepthBufCache *rect_depth_final; diff --git a/source/blender/gpu/intern/gpu_select_sample_query.cc b/source/blender/gpu/intern/gpu_select_sample_query.cc index 1b54cbff5dd..5bbf3bd05d3 100644 --- a/source/blender/gpu/intern/gpu_select_sample_query.cc +++ b/source/blender/gpu/intern/gpu_select_sample_query.cc @@ -26,6 +26,7 @@ #include <stdlib.h> +#include "GPU_debug.h" #include "GPU_framebuffer.h" #include "GPU_select.h" #include "GPU_state.h" @@ -74,6 +75,8 @@ static GPUSelectQueryState g_query_state = {0}; void gpu_select_query_begin( uint (*buffer)[4], uint bufsize, const rcti *input, char mode, int oldhits) { + GPU_debug_group_begin("Selection Queries"); + g_query_state.query_issued = false; g_query_state.bufsize = bufsize; g_query_state.buffer = buffer; @@ -197,5 +200,7 @@ uint gpu_select_query_end(void) GPU_depth_test(g_query_state.depth_test); GPU_viewport(UNPACK4(g_query_state.viewport)); + GPU_debug_group_end(); + return hits; } |