main
noah metz 2024-10-29 13:21:57 -06:00
parent edf2e4b3c9
commit e2ffed91e2
2 changed files with 34 additions and 35 deletions

@ -109,8 +109,6 @@ VkResult draw_frame(
frame->transfer_count = 0; frame->transfer_count = 0;
frame->transfer_written = 0; frame->transfer_written = 0;
}
VkCommandBuffer compute_commands = frame->compute_commands; VkCommandBuffer compute_commands = frame->compute_commands;
VK_RESULT(vkResetCommandBuffer(compute_commands, 0)); VK_RESULT(vkResetCommandBuffer(compute_commands, 0));
VK_RESULT(vkBeginCommandBuffer(compute_commands, &begin_info)); VK_RESULT(vkBeginCommandBuffer(compute_commands, &begin_info));
@ -144,6 +142,7 @@ VkResult draw_frame(
.pNext = &compute_timeline, .pNext = &compute_timeline,
}; };
VK_RESULT(vkQueueSubmit(context->transfer_queue.handle, 1, &compute_submit, VK_NULL_HANDLE)); VK_RESULT(vkQueueSubmit(context->transfer_queue.handle, 1, &compute_submit, VK_NULL_HANDLE));
}
uint32_t image_index; uint32_t image_index;
VK_RESULT(vkAcquireNextImageKHR(context->device, context->swapchain, UINT64_MAX, frame->image, VK_NULL_HANDLE, &image_index)); VK_RESULT(vkAcquireNextImageKHR(context->device, context->swapchain, UINT64_MAX, frame->image, VK_NULL_HANDLE, &image_index));

@ -189,7 +189,7 @@ VkResult main_thread(ClientContext* context) {
// //
double last_draw = 0; double last_draw = 0;
double draw_interval = 0.5; double draw_interval = 0.1;
double frame_count = 0; double frame_count = 0;
uint32_t* mapped_codes = context->ui.containers[0].layers[0].codes_buffer; uint32_t* mapped_codes = context->ui.containers[0].layers[0].codes_buffer;
GPUString* mapped_string = context->ui.containers[0].layers[0].strings_buffer; GPUString* mapped_string = context->ui.containers[0].layers[0].strings_buffer;
@ -204,7 +204,7 @@ VkResult main_thread(ClientContext* context) {
double frame_time = glfwGetTime(); double frame_time = glfwGetTime();
// //
if(frame_time - last_draw > draw_interval) { if(frame_time - last_draw > draw_interval && context->render.current_frame == 1) {
test = (test + 1) % 7; test = (test + 1) % 7;
mapped_string->length = test; mapped_string->length = test;