Constructor Function. Create VkCommandBuffer.
Create VkCommandBufferAllocateInfo struct.
Create commandbuffer and set it global.
Create VkCommandBufferAllocateInfo struct.
Create commandbuffer and set it global.
179 {
181
185 VkCommandBufferAllocateInfo allocInfo{};
186 allocInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO;
187 allocInfo.commandPool = vulkanState.m_GraphicCommandPool;
188 allocInfo.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY;
190
194 VK_CHECK(vkAllocateCommandBuffers(vulkanState.m_Device, &allocInfo, vulkanState.m_GraphicCommandBuffer.data()))
195
196 allocInfo.commandPool = vulkanState.m_ComputeCommandPool;
197 VK_CHECK(vkAllocateCommandBuffers(vulkanState.m_Device, &allocInfo, vulkanState.m_ComputeCommandBuffer.data()))
198
200 {
201 DEBUGUTILS_SETOBJECTNAME(VK_OBJECT_TYPE_COMMAND_BUFFER, reinterpret_cast<uint64_t>(vulkanState.m_GraphicCommandBuffer[i]), vulkanState.m_Device, "GraphicCommandBuffer")
202 DEBUGUTILS_SETOBJECTNAME(VK_OBJECT_TYPE_COMMAND_BUFFER, reinterpret_cast<uint64_t>(vulkanState.m_ComputeCommandBuffer[i]), vulkanState.m_Device, "ComputeCommandBuffer")
203
206 }
207 }
#define SPICES_PROFILE_ZONE
#define SPICES_PROFILE_VK_COLLECT(cmdbuf)
#define VK_CHECK(expr)
Vulkan Check macro. Verify Vulkan API Effectiveness.
VulkanObject(VulkanState &vulkanState)
Constructor Function. Init member variables.
constexpr uint32_t MaxFrameInFlight
Max In Flight Frame. 2 buffers are enough in this program.