| 307 | return res; |
| 308 | } |
| 309 | VkResult createCommandPool(VkGPU* vkGPU) { |
| 310 | //create a place, command buffer memory is allocated from |
| 311 | VkResult res = VK_SUCCESS; |
| 312 | VkCommandPoolCreateInfo commandPoolCreateInfo = { VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO }; |
| 313 | commandPoolCreateInfo.flags = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT; |
| 314 | commandPoolCreateInfo.queueFamilyIndex = (uint32_t)vkGPU->queueFamilyIndex; |
| 315 | res = vkCreateCommandPool(vkGPU->device, &commandPoolCreateInfo, NULL, &vkGPU->commandPool); |
| 316 | return res; |
| 317 | } |
| 318 | |
| 319 | VkFFTResult findMemoryType(VkGPU* vkGPU, uint64_t memoryTypeBits, uint64_t memorySize, VkMemoryPropertyFlags properties, uint32_t* memoryTypeIndex) { |
| 320 | VkPhysicalDeviceMemoryProperties memoryProperties = { 0 }; |