1#ifndef HALIDE_RUNTIME_VULKAN_RESOURCES_H
2#define HALIDE_RUNTIME_VULKAN_RESOURCES_H
86 <<
" vk_create_command_pool (user_context: " <<
user_context <<
", "
87 <<
"allocator: " << (
void *)
allocator <<
", "
92 error(
user_context) <<
"Vulkan: Failed to create command pool ... invalid allocator pointer!\n";
106 error(
user_context) <<
"Vulkan: Failed to create command pool!\n";
115 <<
" vk_destroy_command_pool (user_context: " <<
user_context <<
", "
116 <<
"allocator: " << (
void *)
allocator <<
", "
120 error(
user_context) <<
"Vulkan: Failed to destroy command pool ... invalid allocator pointer!\n";
133 <<
" vk_create_command_buffer (user_context: " <<
user_context <<
", "
134 <<
"allocator: " << (
void *)
allocator <<
", "
138 error(
user_context) <<
"Vulkan: Failed to create command buffer ... invalid allocator pointer!\n";
153 error(
user_context) <<
"Vulkan: Failed to allocate command buffers!\n";
162 <<
" vk_destroy_command_buffer (user_context: " <<
user_context <<
", "
163 <<
"allocator: " << (
void *)
allocator <<
", "
168 error(
user_context) <<
"Vulkan: Failed to destroy command buffer ... invalid allocator pointer!\n";
177struct ScopedVulkanCommandBufferAndPool {
184 ScopedVulkanCommandBufferAndPool(
void *
uc, VulkanMemoryAllocator *
vma,
uint32_t queue_family_index)
216 <<
" vk_fill_command_buffer_with_dispatch_call (user_context: " <<
user_context <<
", "
217 <<
"device: " << (
void *)device <<
", "
219 <<
"pipeline_layout: " << (
void *)pipeline_layout <<
", "
220 <<
"descriptor_set: " << (
void *)descriptor_set <<
", "
255 <<
" vk_submit_command_buffer (user_context: " <<
user_context <<
", "
256 <<
"queue: " << (
void *)queue <<
", "
312 return bindings_count;
324 <<
" vk_create_descriptor_pool (user_context: " <<
user_context <<
", "
325 <<
"allocator: " << (
void *)
allocator <<
", "
326 <<
"uniform_buffer_count: " << (
uint32_t)uniform_buffer_count <<
", "
327 <<
"storage_buffer_count: " << (
uint32_t)storage_buffer_count <<
")\n";
330 error(
user_context) <<
"Vulkan: Failed to create descriptor pool ... invalid allocator pointer!\n";
336 pool_config.minimum_capacity = (uniform_buffer_count ? 1 : 0) + (storage_buffer_count ? 1 : 0);
340 if (uniform_buffer_count > 0) {
348 if (storage_buffer_count > 0) {
378 <<
" vk_destroy_descriptor_pool (user_context: " <<
user_context <<
", "
379 <<
"allocator: " << (
void *)
allocator <<
", "
380 <<
"descriptor_pool: " << (
void *)descriptor_pool <<
")\n";
383 error(
user_context) <<
"Vulkan: Failed to destroy descriptor pool ... invalid allocator pointer!\n";
400 <<
" vk_create_descriptor_set_layout (user_context: " <<
user_context <<
", "
401 <<
"allocator: " << (
void *)
allocator <<
", "
402 <<
"uniform_buffer_count: " << uniform_buffer_count <<
", "
403 <<
"storage_buffer_count: " << storage_buffer_count <<
", "
404 <<
"layout: " << (
void *)layout <<
")\n";
407 error(
user_context) <<
"Vulkan: Failed to create descriptor set layout ... invalid allocator pointer!\n";
413 layout_config.minimum_capacity = uniform_buffer_count + storage_buffer_count;
417 for (
uint32_t n = 0;
n < uniform_buffer_count; ++
n) {
435 for (
uint32_t n = 0;
n < storage_buffer_count; ++
n) {
478 <<
" vk_destroy_descriptor_set_layout (user_context: " <<
user_context <<
", "
479 <<
"allocator: " << (
void *)
allocator <<
", "
483 error(
user_context) <<
"Vulkan: Failed to destroy descriptor set layout ... invalid allocator pointer!\n";
499 <<
" vk_create_descriptor_set (user_context: " <<
user_context <<
", "
500 <<
"allocator: " << (
void *)
allocator <<
", "
502 <<
"descriptor_pool: " << (
void *)descriptor_pool <<
")\n";
505 error(
user_context) <<
"Vulkan: Failed to create descriptor set ... invalid allocator pointer!\n";
530 size_t uniform_buffer_count,
531 size_t storage_buffer_count,
538 <<
" vk_update_descriptor_set (user_context: " <<
user_context <<
", "
539 <<
"allocator: " << (
void *)
allocator <<
", "
541 <<
"uniform_buffer_count: " << (
uint32_t)uniform_buffer_count <<
", "
542 <<
"storage_buffer_count: " << (
uint32_t)storage_buffer_count <<
", "
543 <<
"descriptor_set: " << (
void *)descriptor_set <<
")\n";
546 error(
user_context) <<
"Vulkan: Failed to create descriptor set ... invalid allocator pointer!\n";
551 dbi_config.minimum_capacity = storage_buffer_count + uniform_buffer_count;
556 wds_config.minimum_capacity = storage_buffer_count + uniform_buffer_count;
574 <<
"offset=" << (
uint32_t)(0) <<
" "
575 <<
"size=VK_WHOLE_SIZE\n";
603 error(
user_context) <<
"Vulkan: Failed to retrieve buffer for device memory!\n";
670 <<
" vk_create_scalar_uniform_buffer (user_context: " <<
user_context <<
", "
671 <<
"allocator: " << (
void *)
allocator <<
", "
676 error(
user_context) <<
"Vulkan: Failed to create scalar uniform buffer ... invalid allocator pointer!\n";
688 if ((region ==
nullptr) || (region->
handle ==
nullptr)) {
689 error(
user_context) <<
"Vulkan: Failed to create scalar uniform buffer ... unable to allocate device memory!\n";
706 <<
" vk_update_scalar_uniform_buffer (user_context: " <<
user_context <<
", "
707 <<
"region: " << (
void *)region <<
")\n";
711 error(
user_context) <<
"Vulkan: Failed to update scalar uniform buffer ... invalid allocator pointer!\n";
715 if ((region ==
nullptr) || (region->
handle ==
nullptr)) {
716 error(
user_context) <<
"Vulkan: Failed to update scalar uniform buffer ... invalid memory region!\n";
723 error(
user_context) <<
"Vulkan: Failed to update scalar uniform buffer ... unable to map host pointer to device memory!\n";
746 <<
" vk_destroy_scalar_uniform_buffer (user_context: " <<
user_context <<
", "
747 <<
"allocator: " << (
void *)
allocator <<
", "
751 error(
user_context) <<
"Vulkan: Failed to destroy scalar uniform buffer ... invalid allocator pointer!\n";
778 <<
" vk_create_pipeline_layout (user_context: " <<
user_context <<
", "
779 <<
"allocator: " << (
void *)
allocator <<
", "
781 <<
"descriptor_set_layouts: " << (
void *)descriptor_set_layouts <<
", "
782 <<
"pipeline_layout: " << (
void *)pipeline_layout <<
")\n";
785 error(
user_context) <<
"Vulkan: Failed to create pipeline layout ... invalid allocator pointer!\n";
792 error(
user_context) <<
"Vulkan: Number of descriptor sets for pipeline layout exceeds the number that can be bound by device!\n"
804 descriptor_set_layouts,
823 <<
" vk_destroy_pipeline_layout (user_context: " <<
user_context <<
", "
824 <<
"allocator: " << (
void *)
allocator <<
", "
825 <<
"pipeline_layout: " << (
void *)pipeline_layout <<
")\n";
829 error(
user_context) <<
"Vulkan: Failed to destroy pipeline layout ... invalid allocator pointer!\n";
849 <<
" vk_create_compute_pipeline (user_context: " <<
user_context <<
", "
850 <<
"allocator: " << (
void *)
allocator <<
", "
851 <<
"shader_module: " << (
void *)shader_module <<
", "
852 <<
"pipeline_layout: " << (
void *)pipeline_layout <<
")\n";
855 error(
user_context) <<
"Vulkan: Failed to create compute pipeline ... invalid allocator pointer!\n";
890 VulkanShaderBinding *shader_bindings,
891 VulkanDispatchData *dispatch_data,
898 <<
" vk_setup_compute_pipeline (user_context: " <<
user_context <<
", "
899 <<
"entry_point_name: '" << shader_bindings->entry_point_name <<
"', "
900 <<
"allocator: " << (
void *)
allocator <<
", "
901 <<
"shader_bindings: " << (
void *)shader_bindings <<
", "
902 <<
"dispatch_data: " << (
void *)dispatch_data <<
", "
903 <<
"shader_module: " << (
void *)shader_module <<
", "
904 <<
"pipeline_layout: " << (
void *)pipeline_layout <<
")\n";
908 error(
user_context) <<
"Vulkan: Failed to setup compute pipeline ... invalid allocator pointer!\n";
912 if (shader_bindings ==
nullptr) {
913 error(
user_context) <<
"Vulkan: Failed to setup compute pipeline ... invalid shader bindings!\n";
917 if (shader_bindings ==
nullptr) {
918 error(
user_context) <<
"Vulkan: Failed to setup compute pipeline ... invalid dispatch data!\n";
923 const char *entry_point_name = shader_bindings->entry_point_name;
924 if (entry_point_name ==
nullptr) {
925 error(
user_context) <<
"Vulkan: Failed to setup compute pipeline ... missing entry point name!\n";
934 if (shader_bindings->shared_memory_allocations_count && dispatch_data->shared_mem_bytes) {
940 for (
uint32_t sm = 0;
sm < shader_bindings->shared_memory_allocations_count;
sm++) {
941 VulkanSharedMemoryAllocation *
allocation = &(shader_bindings->shared_memory_allocations[
sm]);
948 error(
user_context) <<
"Vulkan: Multiple dynamic shared memory allocations found! Only one is suported!!\n";
959 debug(
user_context) <<
" dispatch requests " << dispatch_data->shared_mem_bytes <<
" bytes of shared memory\n";
979 error(
user_context) <<
"Vulkan: Amount of static shared memory used exceeds device limit!\n"
985 error(
user_context) <<
"Vulkan: Amount of dynamic shared memory used exceeds device limit!\n"
986 <<
" requested: " << dispatch_data->shared_mem_bytes <<
" bytes,"
994 if (shader_bindings->dispatch_data.local_size_binding.constant_id[0] != 0) {
995 for (
uint32_t dim = 0; dim < 3; dim++) {
1006 for (
uint32_t sc = 0;
sc < shader_bindings->specialization_constants_count;
sc++) {
1010 <<
"'" << shader_bindings->specialization_constants[
sc].constant_name <<
"' "
1018 error(
user_context) <<
"Vulkan: Failed to locate dispatch constant index for shader binding!\n";
1050 if (shader_bindings->compute_pipeline) {
1053 error(
user_context) <<
"Vulkan: Failed to destroy compute pipeline!\n";
1061 error(
user_context) <<
"Vulkan: Failed to create compute pipeline!\n";
1071 error(
user_context) <<
"Vulkan: Failed to create compute pipeline!\n";
1085 <<
" vk_destroy_compute_pipeline (user_context: " <<
user_context <<
", "
1086 <<
"allocator: " << (
void *)
allocator <<
", "
1088 <<
"compute_pipeline: " << (
void *)compute_pipeline <<
")\n";
1091 error(
user_context) <<
"Vulkan: Failed to destroy compute pipeline ... invalid allocator pointer!\n";
1104 <<
" vk_decode_shader_bindings (user_context: " <<
user_context <<
", "
1105 <<
"allocator: " << (
void *)
allocator <<
", "
1106 <<
"module_ptr: " << (
void *)
module_ptr <<
", "
1113 error(
user_context) <<
"Vulkan: Failed to decode shader bindings ... invalid allocator pointer!\n";
1118 error(
user_context) <<
"Vulkan: Failed to decode shader bindings ... invalid module buffer!\n";
1165 if (shader_count < 1) {
1166 error(
user_context) <<
"Vulkan: Failed to decode shader bindings ... no descriptors found!\n";
1174 if (shader_bindings ==
nullptr) {
1175 error(
user_context) <<
"Vulkan: Failed to allocate shader_bindings! Out of memory!\n";
1188 const char *entry_point_name = (
const char *)(
module_ptr + idx);
1201 VulkanSpecializationConstant *specialization_constants =
nullptr;
1202 if (specialization_constants_count > 0) {
1207 if (specialization_constants ==
nullptr) {
1208 error(
user_context) <<
"Vulkan: Failed to allocate specialization_constants! Out of memory!\n";
1214 for (
uint32_t sc = 0;
sc < specialization_constants_count;
sc++) {
1221 const char *constant_name = (
const char *)(
module_ptr + idx);
1222 specialization_constants[
sc].constant_name = constant_name;
1226 specialization_constants[
sc].constant_id =
module_ptr[idx++];
1229 specialization_constants[
sc].type_size =
module_ptr[idx++];
1237 VulkanSharedMemoryAllocation *shared_memory_allocations =
nullptr;
1238 if (shared_memory_allocations_count > 0) {
1243 if (shared_memory_allocations ==
nullptr) {
1244 error(
user_context) <<
"Vulkan: Failed to allocate shared_memory_allocations! Out of memory!\n";
1257 const char *variable_name = (
const char *)(
module_ptr + idx);
1258 shared_memory_allocations[
sm].variable_name = variable_name;
1262 shared_memory_allocations[
sm].constant_id =
module_ptr[idx++];
1265 shared_memory_allocations[
sm].type_size =
module_ptr[idx++];
1268 shared_memory_allocations[
sm].array_size =
module_ptr[idx++];
1275 shader_bindings[
n].dispatch_data.local_size_binding.constant_id[dim] =
module_ptr[idx++];
1280 debug(
user_context) <<
" [" <<
n <<
"] '" << (
const char *)entry_point_name <<
"'\n";
1282 debug(
user_context) <<
" uniform_buffer_count=" << uniform_buffer_count <<
"\n"
1283 <<
" storage_buffer_count=" << storage_buffer_count <<
"\n";
1285 debug(
user_context) <<
" specialization_constants_count=" << specialization_constants_count <<
"\n";
1286 for (
uint32_t sc = 0;
sc < specialization_constants_count;
sc++) {
1288 <<
"constant_name='" << (
const char *)specialization_constants[
sc].constant_name <<
"' "
1289 <<
"constant_id=" << specialization_constants[
sc].constant_id <<
" "
1290 <<
"type_size=" << specialization_constants[
sc].type_size <<
"\n";
1293 debug(
user_context) <<
" shared_memory_allocations_count=" << shared_memory_allocations_count <<
"\n";
1294 for (
uint32_t sm = 0;
sm < shared_memory_allocations_count;
sm++) {
1296 <<
"variable_name='" << (
const char *)shared_memory_allocations[
sm].variable_name <<
"' "
1297 <<
"constant_id=" << shared_memory_allocations[
sm].constant_id <<
" "
1298 <<
"type_size=" << shared_memory_allocations[
sm].type_size <<
" "
1299 <<
"array_size=" << shared_memory_allocations[
sm].array_size <<
"\n";
1303 debug(
user_context) << shader_bindings[
n].dispatch_data.local_size_binding.constant_id[dim] <<
" ";
1307 shader_bindings[
n].entry_point_name = entry_point_name;
1308 shader_bindings[
n].uniform_buffer_count = uniform_buffer_count;
1309 shader_bindings[
n].storage_buffer_count = storage_buffer_count;
1310 shader_bindings[
n].specialization_constants_count = specialization_constants_count;
1311 shader_bindings[
n].specialization_constants = specialization_constants;
1312 shader_bindings[
n].shared_memory_allocations_count = shared_memory_allocations_count;
1313 shader_bindings[
n].shared_memory_allocations = shared_memory_allocations;
1321 return shader_bindings;
1325 const VulkanShaderBinding *shader_bindings,
uint32_t shader_count) {
1328 <<
" vk_validate_shader_for_device (user_context: " <<
user_context <<
", "
1329 <<
"allocator: " << (
void *)
allocator <<
", "
1330 <<
"shader_bindings: " << (
void *)shader_bindings <<
", "
1331 <<
"shader_count: " << shader_count <<
")\n";
1335 if (shader_bindings->shared_memory_allocations_count) {
1339 for (
uint32_t sm = 0;
sm < shader_bindings->shared_memory_allocations_count;
sm++) {
1340 VulkanSharedMemoryAllocation *
allocation = &(shader_bindings->shared_memory_allocations[
sm]);
1353 error(
user_context) <<
"Vulkan: Amount of static shared memory used exceeds device limit!\n"
1365 error(
user_context) <<
"Vulkan: Number of required descriptor sets exceeds the amount available for device!\n"
1366 <<
" requested: " << shader_count <<
","
1375 const char *ptr,
int size) {
1378 <<
" vk_compile_kernel_module (user_context: " <<
user_context <<
", "
1379 <<
"allocator: " << (
void *)
allocator <<
", "
1381 <<
"module: " << (
void *)ptr <<
", "
1382 <<
"size: " << size <<
")\n";
1388 debug(
user_context) <<
"Vulkan: Failed to compile kernel module ... invalid allocator pointer!\n";
1392 if ((ptr ==
nullptr) || (size <= 0)) {
1393 debug(
user_context) <<
"Vulkan: Failed to compile kernel module ... invalid module!\n";
1400 debug(
user_context) <<
"Vulkan: Failed to allocate compilation cache entry! Out of memory!\n";
1408 if ((
size_t)size <
sizeof(
uint32_t)) {
1409 debug(
user_context) <<
"Vulkan: Code module size is invalid!\n";
1420 debug(
user_context) <<
"Vulkan: Failed to allocate host memory!\n";
1429 debug(
user_context) <<
"Vulkan: Failed to allocate system memory!\n";
1463 debug(
user_context) <<
"Vulkan: Failed to compile shader module!\n";
1490 const char *ptr,
int size) {
1493 <<
" vk_compile_shader_module (user_context: " <<
user_context <<
", "
1494 <<
"allocator: " << (
void *)
allocator <<
", "
1496 <<
"module: " << (
void *)ptr <<
", "
1497 <<
"size: " << size <<
")\n";
1503 error(
user_context) <<
"Vulkan: Failed to compile shader modules ... invalid allocator pointer!\n";
1507 if ((ptr ==
nullptr) || (size <= 0)) {
1508 error(
user_context) <<
"Vulkan: Failed to compile shader modules ... invalid program source buffer!\n";
1528 <<
"module_ptr: " << (
void *)
module_ptr <<
", "
1531 <<
"binar_ptr: " << (
void *)
binary_ptr <<
", "
1546 error(
user_context) <<
"Vulkan: Failed to allocate compilation cache entry! Out of memory!\n";
1554 error(
user_context) <<
"Vulkan: Failed to decode shader bindings!\n";
1582 error(
user_context) <<
"Vulkan: Failed to allocate descriptor set layouts for cache entry! Out of memory!\n";
1600 <<
" vk_destroy_compiled_shader_module (shader_module: "
1601 << shader_module <<
", allocator: " <<
allocator <<
")\n";
1604 if (shader_module ==
nullptr) {
1612 if (shader_module->descriptor_set_layouts) {
1613 for (
uint32_t n = 0;
n < shader_module->shader_count;
n++) {
1614 debug(
user_context) <<
" destroying descriptor set layout [" <<
n <<
"] " << shader_module->shader_bindings[
n].entry_point_name <<
"\n";
1619 shader_module->descriptor_set_layouts =
nullptr;
1621 if (shader_module->pipeline_layout) {
1622 debug(
user_context) <<
" destroying pipeline layout " << (
void *)shader_module->pipeline_layout <<
"\n";
1627 if (shader_module->shader_bindings) {
1628 for (
uint32_t n = 0;
n < shader_module->shader_count;
n++) {
1629 if (shader_module->shader_bindings[
n].args_region) {
1631 shader_module->shader_bindings[
n].args_region =
nullptr;
1633 if (shader_module->shader_bindings[
n].descriptor_pool) {
1637 if (shader_module->shader_bindings[
n].specialization_constants) {
1639 shader_module->shader_bindings[
n].specialization_constants =
nullptr;
1641 if (shader_module->shader_bindings[
n].shared_memory_allocations) {
1643 shader_module->shader_bindings[
n].shared_memory_allocations =
nullptr;
1645 if (shader_module->shader_bindings[
n].compute_pipeline) {
1651 shader_module->shader_bindings =
nullptr;
1653 if (shader_module->shader_module) {
1654 debug(
user_context) <<
" . destroying shader module " << (
void *)shader_module->shader_module <<
"\n";
1658 shader_module->shader_count = 0;
1660 shader_module =
nullptr;
1666 <<
" vk_destroy_compilation_cache_entry (cache_entry: " <<
cache_entry <<
")\n";
1678 VulkanCompiledShaderModule *shader_module =
cache_entry->compiled_modules[
m];
1691 <<
" vk_destroy_shader_modules (user_context: " <<
user_context <<
")\n";
1727 error(
user_context) <<
"Vulkan: Failed to retrieve buffer for device memory!\n";
1765 error(
user_context) <<
"Vulkan: Failed to acquire context!\n";
1774 error(
user_context) <<
"Vulkan: Invalid offset for device crop!\n";
1781 error(
user_context) <<
"Vulkan: Failed to crop region! Invalide device region!\n";
1788 error(
user_context) <<
"Vulkan: Failed to crop region! Unable to create memory region!\n";
bool halide_can_reuse_device_allocations(void *user_context)
Determines whether on device_free the memory is returned immediately to the device API,...
halide_error_code_t
The error codes that may be returned by a Halide pipeline.
@ halide_error_code_incompatible_device_interface
An operation on a buffer required an allocation on a particular device interface, but a device alloca...
@ halide_error_code_internal_error
There is a bug in the Halide compiler.
@ halide_error_code_generic_error
An uncategorized error occurred.
@ halide_error_code_device_crop_failed
Cropping/slicing a buffer failed for some other reason.
@ halide_error_code_success
There was no error.
Vulkan Memory Allocator class interface for managing large memory requests stored as contiguous block...
int reclaim(void *user_context, MemoryRegion *region)
MemoryRegion * reserve(void *user_context, const MemoryRequest &request)
int release(void *user_context, MemoryRegion *region)
int unmap(void *user_context, MemoryRegion *region)
MemoryRegion * owner_of(void *user_context, MemoryRegion *region)
VkDevice current_device() const
VkPhysicalDeviceLimits current_physical_device_limits() const
const VkAllocationCallbacks * callbacks() const
void * map(void *user_context, MemoryRegion *region)
WEAK Halide::Internal::GPUCompilationCache< VkDevice, VulkanCompilationCacheEntry * > compilation_cache
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
@ Internal
Not visible externally, similar to 'static' linkage in C.
Internal::ConstantInterval cast(Type t, const Internal::ConstantInterval &a)
Cast operators for ConstantIntervals.
unsigned __INT64_TYPE__ uint64_t
signed __INT64_TYPE__ int64_t
#define halide_debug_assert(user_context, cond)
halide_debug_assert() is like halide_assert(), but only expands into a check when DEBUG_RUNTIME is de...
unsigned __INT8_TYPE__ uint8_t
void * memcpy(void *s1, const void *s2, size_t n)
void * memset(void *s, int val, size_t n)
unsigned __INT32_TYPE__ uint32_t
#define halide_abort_if_false(user_context, cond)
WEAK int64_t halide_current_time_ns(void *user_context)
signed __INT8_TYPE__ int8_t
VulkanCompiledShaderModule ** compiled_modules
VulkanMemoryAllocator * allocator
VkDescriptorSetLayout * descriptor_set_layouts
VkPipelineLayout pipeline_layout
VkShaderModule shader_module
VulkanShaderBinding * shader_bindings
uint32_t shared_mem_bytes
VulkanWorkgroupSizeBinding local_size_binding
VulkanSpecializationConstant * specialization_constants
VulkanSharedMemoryAllocation * shared_memory_allocations
uint32_t shared_memory_allocations_count
uint32_t storage_buffer_count
uint32_t uniform_buffer_count
VulkanDispatchData dispatch_data
VkDescriptorSet descriptor_set
uint32_t specialization_constants_count
VkPipeline compute_pipeline
VkDescriptorPool descriptor_pool
const char * entry_point_name
MemoryRegion * args_region
const char * variable_name
const char * constant_name
uint64_t src_stride_bytes[MAX_COPY_DIMS]
uint64_t extent[MAX_COPY_DIMS]
uint64_t dst_stride_bytes[MAX_COPY_DIMS]
The raw representation of an image passed around by generated Halide code.
uint64_t device
A device-handle for e.g.
const struct halide_device_interface_t * device_interface
The interface used to interpret the above handle.
VkCommandPool command_pool
VkCommandBuffer command_buffer
VulkanMemoryAllocator * allocator