| 410 | } |
| 411 | |
| 412 | VkResult IBLLib::vkHelper::createCommandBuffer(VkCommandBuffer& _outCmdBuffer, VkCommandBufferLevel _level) const |
| 413 | { |
| 414 | if (m_commandPool == VK_NULL_HANDLE || m_logicalDevice == VK_NULL_HANDLE) |
| 415 | { |
| 416 | return VK_RESULT_MAX_ENUM; |
| 417 | } |
| 418 | |
| 419 | VkCommandBufferAllocateInfo allocInfo{}; |
| 420 | allocInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO; |
| 421 | allocInfo.commandPool = m_commandPool; |
| 422 | allocInfo.level = _level; |
| 423 | allocInfo.commandBufferCount = 1u; |
| 424 | |
| 425 | VkResult res = vkAllocateCommandBuffers(m_logicalDevice, &allocInfo, &_outCmdBuffer); |
| 426 | |
| 427 | if (res != VK_SUCCESS) |
| 428 | { |
| 429 | printf("Failed to allocate command buffers [%u]\n", res); |
| 430 | } |
| 431 | |
| 432 | return res; |
| 433 | } |
| 434 | |
| 435 | VkResult IBLLib::vkHelper::createCommandBuffers(std::vector<VkCommandBuffer>& _outCmdBuffers, uint32_t _count, VkCommandBufferLevel _level) const |
| 436 | { |
no outgoing calls
no test coverage detected