Skip to content

Commit

Permalink
Use PIX to implement debug markers
Browse files Browse the repository at this point in the history
  • Loading branch information
RobDangerous committed Sep 29, 2024
1 parent 21c80df commit 6a989b9
Show file tree
Hide file tree
Showing 12 changed files with 4,086 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@

#include <assert.h>

#ifdef KOPE_PIX
#include <WinPixEventRuntime/pix3.h>
#endif

void kope_d3d12_command_list_begin_render_pass(kope_g5_command_list *list, const kope_g5_render_pass_parameters *parameters) {
list->d3d12.compute_pipeline_set = false;

Expand Down Expand Up @@ -641,10 +645,20 @@ void kope_d3d12_command_list_set_name(kope_g5_command_list *list, const char *na
list->d3d12.list->SetName(wstr);
}

void kope_d3d12_command_list_push_debug_group(kope_g5_command_list *list, const char *name) {}
void kope_d3d12_command_list_push_debug_group(kope_g5_command_list *list, const char *name) {
#ifdef KOPE_PIX
PIXBeginEvent(list->d3d12.list, 0, "%s", name);
#endif
}

void kope_d3d12_command_list_pop_debug_group(kope_g5_command_list *list) {}
void kope_d3d12_command_list_pop_debug_group(kope_g5_command_list *list) {
#ifdef KOPE_PIX
PIXEndEvent(list->d3d12.list);
#endif
}

void kope_d3d12_command_list_insert_debug_marker(kope_g5_command_list *list, const char *name) {
// PIXSetMarker();
#ifdef KOPE_PIX
PIXSetMarker(list->d3d12.list, 0, "%s", name);
#endif
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
#define NOCLIPBOARD
#define NOCOLOR
#define NOCOMM
#ifndef KOPE_PIX
#define NOCTLMGR
#endif
#define NODEFERWINDOWPOS
#define NODRAWTEXT
#define NOGDI
Expand All @@ -34,15 +36,19 @@
#define NORASTEROPS
#define NOSCROLL
#define NOSERVICE
#ifndef KOPE_PIX
#define NOSHOWWINDOW
#endif
#define NOSOUND
#define NOSYSCOMMANDS
#define NOSYSMETRICS
#define NOTEXTMETRIC
// #define NOUSER
#define NOVIRTUALKEYCODES
#define NOWH
#ifndef KOPE_PIX
#define NOWINMESSAGES
#endif
#define NOWINOFFSETS
#define NOWINSTYLES
#define WIN32_LEAN_AND_MEAN
Expand Down
Loading

0 comments on commit 6a989b9

Please sign in to comment.