Class VulkanModuleCommandPool
java.lang.Object
io.codetoil.curved_spacetime.vulkan.VulkanModuleCommandPool
A Vulkan command pool, from which command buffers for one queue family are allocated.
A pool is tied to the queue family it was created for, so buffers allocated from it can only be
submitted to queues in that family. Created with
VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT, so individual buffers can be reset and
re-recorded rather than the whole pool having to be reset at once.
-
Constructor Summary
ConstructorsConstructorDescriptionVulkanModuleCommandPool(VulkanModuleLogicalDevice vulkanModuleLogicalDevice, int queueFamilyIndex, Logger logger) Creates a command pool for one queue family. -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanup()Destroys the pool, freeing every command buffer allocated from it.longReturns the underlying Vulkan handle.Returns the device this pool was created on.
-
Constructor Details
-
VulkanModuleCommandPool
public VulkanModuleCommandPool(VulkanModuleLogicalDevice vulkanModuleLogicalDevice, int queueFamilyIndex, Logger logger) Creates a command pool for one queue family.- Parameters:
vulkanModuleLogicalDevice- the device to create the pool onqueueFamilyIndex- the queue family buffers from this pool may be submitted tologger- the logger to write pool diagnostics to- Throws:
AssertionError- if the pool cannot be created
-
-
Method Details
-
cleanup
public void cleanup()Destroys the pool, freeing every command buffer allocated from it. -
getVulkanLogicalDevice
Returns the device this pool was created on.- Returns:
- the owning logical device
-
getVkCommandPool
public long getVkCommandPool()Returns the underlying Vulkan handle.- Returns:
- the
VkCommandPoolhandle
-