Skip to content

Commit

Permalink
Implement set_name for lists
Browse files Browse the repository at this point in the history
  • Loading branch information
RobDangerous committed Sep 29, 2024
1 parent dab5731 commit 21c80df
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#include <kope/direct3d12/texture_functions.h>

#include <kinc/backend/SystemMicrosoft.h>

#include "pipeline_structs.h"

#include <assert.h>
Expand Down Expand Up @@ -632,3 +634,17 @@ void kope_d3d12_command_list_set_blend_constant(kope_g5_command_list *list, kope
void kope_d3d12_command_list_set_stencil_reference(kope_g5_command_list *list, uint32_t reference) {
list->d3d12.list->OMSetStencilRef(reference);
}

void kope_d3d12_command_list_set_name(kope_g5_command_list *list, const char *name) {
wchar_t wstr[1024];
kinc_microsoft_convert_string(wstr, name, 1024);
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_pop_debug_group(kope_g5_command_list *list) {}

void kope_d3d12_command_list_insert_debug_marker(kope_g5_command_list *list, const char *name) {
// PIXSetMarker();
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@ void kope_d3d12_command_list_set_ray_pipeline(kope_g5_command_list *list, kope_d

void kope_d3d12_command_list_trace_rays(kope_g5_command_list *list, uint32_t width, uint32_t height, uint32_t depth);

void kope_d3d12_command_list_set_name(kope_g5_command_list *list, const char *name);

void kope_d3d12_command_list_push_debug_group(kope_g5_command_list *list, const char *name);

void kope_d3d12_command_list_pop_debug_group(kope_g5_command_list *list);

void kope_d3d12_command_list_insert_debug_marker(kope_g5_command_list *list, const char *name);

#ifdef __cplusplus
}
#endif
Expand Down
16 changes: 16 additions & 0 deletions Sources/kope/graphics5/commandlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,19 @@ void kope_g5_command_list_set_blend_constant(kope_g5_command_list *list, kope_g5
void kope_g5_command_list_set_stencil_reference(kope_g5_command_list *list, uint32_t reference) {
KOPE_G5_CALL2(command_list_set_stencil_reference, list, reference);
}

void kope_g5_command_list_set_name(kope_g5_command_list *list, const char *name) {
KOPE_G5_CALL2(command_list_set_name, list, name);
}

void kope_g5_command_list_push_debug_group(kope_g5_command_list *list, const char *name) {
KOPE_G5_CALL2(command_list_push_debug_group, list, name);
}

void kope_g5_command_list_pop_debug_group(kope_g5_command_list *list) {
KOPE_G5_CALL1(command_list_pop_debug_group, list);
}

void kope_g5_command_list_insert_debug_marker(kope_g5_command_list *list, const char *name) {
KOPE_G5_CALL2(command_list_insert_debug_marker, list, name);
}

0 comments on commit 21c80df

Please sign in to comment.