diff --git a/vulkan.d b/vulkan.d index 558eb2f..323fadf 100644 --- a/vulkan.d +++ b/vulkan.d @@ -419,8 +419,6 @@ enum DescType : VkDescriptorType DynamicUniform = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, Storage = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, DynamicStorage = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, - - Max, } alias DT = DescType; @@ -2376,11 +2374,9 @@ CreateSampler(Descriptor* desc, MipmapMode mode) VkCheckA("vkCreateSampler failure", result); } -bool +void CreateDrawImages() { - bool success = true; - Format draw_format = cast(Format)GetDrawImageFormat(); Format depth_format = cast(Format)VK_FORMAT_D32_SFLOAT; @@ -2389,15 +2385,13 @@ CreateDrawImages() CreateDescriptor(&g_vk.draw_image, DescInfo(type: DT.StorageImage, format: draw_format, usage: IU.Draw, w: w, h: h, binding: 0)); CreateDescriptor(&g_vk.depth_image, DescInfo(type: DT.Image, format: depth_format, usage: IU.Depth, w: w, h: h, binding: 0)); - - return success; } bool CreateSwapchain() { bool success = true; - Arena* arena = &g_vk.frame_arenas[0]; + Arena* arena = g_vk.FrameArena(); VkSurfaceCapabilitiesKHR cap; vkGetPhysicalDeviceSurfaceCapabilitiesKHR(g_vk.physical_device, g_vk.surface, &cap); @@ -3168,11 +3162,8 @@ Init(PlatformHandles platform_handles, u64 permanent_mem, u64 frame_mem) if(success) { - success = CreateDrawImages(); - } + CreateDrawImages(); - if(success) - { Arena* arena = &g_vk.frame_arenas[0]; VkSemaphoreCreateInfo sem_info = { sType: VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO };