adding shaders compilation in makefile

This commit is contained in:
Kbz-8
2024-09-22 21:39:20 +02:00
parent c718915927
commit cf773b586e
27 changed files with 415 additions and 241 deletions

View File

@@ -59,6 +59,13 @@ namespace mlx
{
MLX_PROFILE_FUNCTION();
kvfWaitForFence(RenderCore::Get().GetDevice(), m_cmd_fences[m_current_frame_index]);
static bool first_run = true;
if(!first_run)
{
m_descriptor_pool_manager.ResetPoolsFromFrameIndex(m_current_frame_index);
EventBus::SendBroadcast(Internal::DescriptorPoolResetEventBroadcast{});
}
first_run = false;
VkResult result = RenderCore::Get().vkAcquireNextImageKHR(RenderCore::Get().GetDevice(), m_swapchain, UINT64_MAX, m_image_available_semaphores[m_current_frame_index], VK_NULL_HANDLE, &m_swapchain_image_index);
if(result == VK_ERROR_OUT_OF_DATE_KHR)
{
@@ -92,8 +99,6 @@ namespace mlx
EventBus::SendBroadcast(Internal::ResizeEventBroadcast{});
}
m_current_frame_index = (m_current_frame_index + 1) % MAX_FRAMES_IN_FLIGHT;
kvfResetDeviceDescriptorPools(RenderCore::Get().GetDevice());
EventBus::SendBroadcast(Internal::DescriptorPoolResetEventBroadcast{});
}
void Renderer::CreateSwapchain()
@@ -145,6 +150,7 @@ namespace mlx
DebugLog("Vulkan : fence destroyed");
}
m_descriptor_pool_manager.Destroy();
DestroySwapchain();
RenderCore::Get().vkDestroySurfaceKHR(RenderCore::Get().GetInstance(), m_surface, nullptr);
DebugLog("Vulkan : surface destroyed");