GPU: Add debug groups inside selection code
This makes the debugging easier.
This commit is contained in:
parent
926b426073
commit
0dd44f4647
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue