MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Tools / FreeCommandBuffers

Function FreeCommandBuffers

icd/generated/function_definitions.h:577–595  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

575 return VK_SUCCESS;
576}
577static VKAPI_ATTR void VKAPI_CALL FreeCommandBuffers(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount,
578 const VkCommandBuffer* pCommandBuffers) {
579 unique_lock_t lock(global_lock);
580 for (auto i = 0u; i < commandBufferCount; ++i) {
581 if (!pCommandBuffers[i]) {
582 continue;
583 }
584
585 for (auto& pair : command_pool_buffer_map) {
586 auto& cbs = pair.second;
587 auto it = std::find(cbs.begin(), cbs.end(), pCommandBuffers[i]);
588 if (it != cbs.end()) {
589 cbs.erase(it);
590 }
591 }
592
593 DestroyDispObjHandle((void*)pCommandBuffers[i]);
594 }
595}
596static VKAPI_ATTR VkResult VKAPI_CALL BeginCommandBuffer(VkCommandBuffer commandBuffer,
597 const VkCommandBufferBeginInfo* pBeginInfo) {
598 // Not a CREATE or DESTROY function

Callers

nothing calls this directly

Calls 1

DestroyDispObjHandleFunction · 0.85

Tested by

no test coverage detected