Skip to content

Commit

Permalink
Cleaning up the render thread a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
Honeybunch committed Sep 6, 2024
1 parent bee5e7b commit e7d63be
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 135 deletions.
10 changes: 10 additions & 0 deletions include/tb_profiling.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@ void TracyCVkCollect(TracyCGPUContext *ctx, VkCommandBuffer cmd_buf);
&TracyConcat(__tracy_source_location, TracyLine), TRACY_CALLSTACK, \
true);

#define TB_TRACY_SCOPEC(name, color) \
static const struct ___tracy_source_location_data TracyConcat( \
__tracy_source_location, TracyLine) = {name, __func__, TracyFile, \
(uint32_t)TracyLine, color}; \
__attribute__((cleanup(tb_tracy_zone_end))) TracyCZoneCtx ctx##__COUNTER__ = \
___tracy_emit_zone_begin_callstack( \
&TracyConcat(__tracy_source_location, TracyLine), TRACY_CALLSTACK, \
true);

#ifdef __cplusplus
}
#endif
Expand All @@ -105,6 +114,7 @@ typedef struct TracyCGPUScope TracyCGPUScope;
#define TracyCVkCollect(...)

#define TB_TRACY_SCOPE(...)
#define TB_TRACY_SCOPEC(...)

#endif

Expand Down
2 changes: 1 addition & 1 deletion include/tb_render_thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "tb_render_common.h"

#if !defined(TB_FINAL) && !defined(__ANDROID__)
#define VALIDATION
#define TB_VK_VALIDATION
#endif

typedef struct SDL_Window SDL_Window;
Expand Down
Loading

0 comments on commit e7d63be

Please sign in to comment.