Skip to content

Commit

Permalink
Refine some function names
Browse files Browse the repository at this point in the history
  • Loading branch information
RobDangerous committed Sep 2, 2024
1 parent 6b9858f commit e6610c8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ void kope_d3d12_device_create_texture(kope_g5_device *device, const kope_g5_text
create_texture_views(device, parameters, texture);
}

kope_g5_texture *kope_d3d12_device_get_framebuffer_texture(kope_g5_device *device) {
kope_g5_texture *kope_d3d12_device_get_framebuffer(kope_g5_device *device) {
return &device->d3d12.framebuffer_textures[device->d3d12.framebuffer_index];
}

Expand All @@ -393,9 +393,9 @@ static void wait_for_frame(kope_g5_device *device, uint64_t frame_index) {
wait_for_fence(device->d3d12.frame_fence, device->d3d12.frame_event, frame_index);
}

void kope_d3d12_device_submit_command_list(kope_g5_device *device, kope_g5_command_list *list) {
void kope_d3d12_device_execute_command_list(kope_g5_device *device, kope_g5_command_list *list) {
if (list->d3d12.presenting) {
kope_g5_texture *framebuffer = kope_d3d12_device_get_framebuffer_texture(device);
kope_g5_texture *framebuffer = kope_d3d12_device_get_framebuffer(device);
if (framebuffer->d3d12.resource_state != D3D12_RESOURCE_STATE_PRESENT) {
D3D12_RESOURCE_BARRIER barrier;
barrier.Transition.pResource = framebuffer->d3d12.resource;
Expand Down Expand Up @@ -432,7 +432,7 @@ void kope_d3d12_device_submit_command_list(kope_g5_device *device, kope_g5_comma
list->d3d12.list->Reset(list->d3d12.allocator[allocator_index], NULL);

if (list->d3d12.presenting) {
kope_g5_texture *framebuffer = kope_d3d12_device_get_framebuffer_texture(device);
kope_g5_texture *framebuffer = kope_d3d12_device_get_framebuffer(device);
framebuffer->d3d12.in_flight_frame_index = device->d3d12.current_frame_index;

kinc_microsoft_affirm(device->d3d12.swap_chain->Present(1, 0));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ void kope_d3d12_device_create_command_list(kope_g5_device *device, kope_g5_comma

void kope_d3d12_device_create_texture(kope_g5_device *device, const kope_g5_texture_parameters *parameters, kope_g5_texture *texture);

kope_g5_texture *kope_d3d12_device_get_framebuffer_texture(kope_g5_device *device);
kope_g5_texture *kope_d3d12_device_get_framebuffer(kope_g5_device *device);

void kope_d3d12_device_submit_command_list(kope_g5_device *device, kope_g5_command_list *list);
void kope_d3d12_device_execute_command_list(kope_g5_device *device, kope_g5_command_list *list);

#ifdef __cplusplus
}
Expand Down
8 changes: 4 additions & 4 deletions Sources/kope/graphics5/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ void kope_g5_device_create_texture(kope_g5_device *device, const kope_g5_texture
KOPE_G5_CALL3(device_create_texture, device, parameters, texture);
}

kope_g5_texture *kope_g5_device_get_framebuffer_texture(kope_g5_device *device) {
return KOPE_G5_CALL1(device_get_framebuffer_texture, device);
kope_g5_texture *kope_g5_device_get_framebuffer(kope_g5_device *device) {
return KOPE_G5_CALL1(device_get_framebuffer, device);
}

void kope_g5_device_submit_command_list(kope_g5_device *device, kope_g5_command_list *list) {
KOPE_G5_CALL2(device_submit_command_list, device, list);
void kope_g5_device_execute_command_list(kope_g5_device *device, kope_g5_command_list *list) {
KOPE_G5_CALL2(device_execute_command_list, device, list);
}

uint32_t kope_g5_texture_format_byte_size(kope_g5_texture_format format) {
Expand Down
4 changes: 2 additions & 2 deletions Sources/kope/graphics5/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,15 @@ typedef struct kope_g5_texture_parameters {

KOPE_FUNC void kope_g5_device_create_texture(kope_g5_device *device, const kope_g5_texture_parameters *parameters, kope_g5_texture *texture);

KOPE_FUNC kope_g5_texture *kope_g5_device_get_framebuffer_texture(kope_g5_device *device);
KOPE_FUNC kope_g5_texture *kope_g5_device_get_framebuffer(kope_g5_device *device);

KOPE_FUNC void kope_g5_device_create_sampler(void *descriptor);

KOPE_FUNC void kope_g5_device_create_command_list(kope_g5_device *device, kope_g5_command_list *list);

KOPE_FUNC void kope_g5_device_create_query_set(void *descriptor);

KOPE_FUNC void kope_g5_device_submit_command_list(kope_g5_device *device, kope_g5_command_list *list);
KOPE_FUNC void kope_g5_device_execute_command_list(kope_g5_device *device, kope_g5_command_list *list);

#ifdef __cplusplus
}
Expand Down

0 comments on commit e6610c8

Please sign in to comment.