1#ifndef HALIDE_RUNTIME_VULKAN_RESOURCES_H
2#define HALIDE_RUNTIME_VULKAN_RESOURCES_H
79 <<
" vk_create_command_pool (user_context: " << user_context <<
", "
80 <<
"allocator: " << (
void *)allocator <<
", "
84 if (allocator ==
nullptr) {
85 error(user_context) <<
"Vulkan: Failed to create command pool ... invalid allocator pointer!\n";
99 error(user_context) <<
"Vulkan: Failed to create command pool!\n";
108 <<
" vk_destroy_command_pool (user_context: " << user_context <<
", "
109 <<
"allocator: " << (
void *)allocator <<
", "
110 <<
"command_pool: " << (
void *)command_pool <<
")\n";
112 if (allocator ==
nullptr) {
113 error(user_context) <<
"Vulkan: Failed to destroy command pool ... invalid allocator pointer!\n";
117 debug(user_context) <<
"Vulkan: Command pool already destroyed.\n";
130 <<
" vk_create_command_buffer (user_context: " << user_context <<
", "
131 <<
"allocator: " << (
void *)allocator <<
", "
132 <<
"command_pool: " << (
void *)command_pool <<
")\n";
134 if (allocator ==
nullptr) {
135 error(user_context) <<
"Vulkan: Failed to create command buffer ... invalid allocator pointer!\n";
150 error(user_context) <<
"Vulkan: Failed to allocate command buffers!\n";
159 <<
" vk_destroy_command_buffer (user_context: " << user_context <<
", "
160 <<
"allocator: " << (
void *)allocator <<
", "
161 <<
"command_pool: " << (
void *)command_pool <<
", "
164 if (allocator ==
nullptr) {
165 error(user_context) <<
"Vulkan: Failed to destroy command buffer ... invalid allocator pointer!\n";
184 <<
" vk_fill_command_buffer_with_dispatch_call (user_context: " << user_context <<
", "
185 <<
"device: " << (
void *)device <<
", "
187 <<
"pipeline_layout: " << (
void *)pipeline_layout <<
", "
188 <<
"descriptor_set: " << (
void *)descriptor_set <<
", "
202 error(user_context) <<
"vkBeginCommandBuffer returned " <<
vk_get_error_name(result) <<
"\n";
213 error(user_context) <<
"vkEndCommandBuffer returned " <<
vk_get_error_name(result) <<
"\n";
223 <<
" vk_submit_command_buffer (user_context: " << user_context <<
", "
224 <<
"queue: " << (
void *)queue <<
", "
243 error(user_context) <<
"Vulkan: vkQueueSubmit returned " <<
vk_get_error_name(result) <<
"\n";
280 return bindings_count;
292 <<
" vk_create_descriptor_pool (user_context: " << user_context <<
", "
293 <<
"allocator: " << (
void *)allocator <<
", "
294 <<
"uniform_buffer_count: " << (
uint32_t)uniform_buffer_count <<
", "
295 <<
"storage_buffer_count: " << (
uint32_t)storage_buffer_count <<
")\n";
297 if (allocator ==
nullptr) {
298 error(user_context) <<
"Vulkan: Failed to create descriptor pool ... invalid allocator pointer!\n";
304 pool_config.minimum_capacity = (uniform_buffer_count ? 1 : 0) + (storage_buffer_count ? 1 : 0);
308 if (uniform_buffer_count > 0) {
316 if (storage_buffer_count > 0) {
335 error(user_context) <<
"Vulkan: Failed to create descriptor pool! vkCreateDescriptorPool returned " <<
vk_get_error_name(result) <<
"\n";
346 <<
" vk_destroy_descriptor_pool (user_context: " << user_context <<
", "
347 <<
"allocator: " << (
void *)allocator <<
", "
348 <<
"descriptor_pool: " << (
void *)descriptor_pool <<
")\n";
350 if (allocator ==
nullptr) {
351 error(user_context) <<
"Vulkan: Failed to destroy descriptor pool ... invalid allocator pointer!\n";
368 <<
" vk_create_descriptor_set_layout (user_context: " << user_context <<
", "
369 <<
"allocator: " << (
void *)allocator <<
", "
370 <<
"uniform_buffer_count: " << uniform_buffer_count <<
", "
371 <<
"storage_buffer_count: " << storage_buffer_count <<
", "
372 <<
"layout: " << (
void *)layout <<
")\n";
374 if (allocator ==
nullptr) {
375 error(user_context) <<
"Vulkan: Failed to create descriptor set layout ... invalid allocator pointer!\n";
381 layout_config.minimum_capacity = uniform_buffer_count + storage_buffer_count;
385 for (
uint32_t n = 0;
n < uniform_buffer_count; ++
n) {
403 for (
uint32_t n = 0;
n < storage_buffer_count; ++
n) {
433 error(user_context) <<
"vkCreateDescriptorSetLayout returned " <<
vk_get_error_name(result) <<
"\n";
446 <<
" vk_destroy_descriptor_set_layout (user_context: " << user_context <<
", "
447 <<
"allocator: " << (
void *)allocator <<
", "
450 if (allocator ==
nullptr) {
451 error(user_context) <<
"Vulkan: Failed to destroy descriptor set layout ... invalid allocator pointer!\n";
467 <<
" vk_create_descriptor_set (user_context: " << user_context <<
", "
468 <<
"allocator: " << (
void *)allocator <<
", "
470 <<
"descriptor_pool: " << (
void *)descriptor_pool <<
")\n";
472 if (allocator ==
nullptr) {
473 error(user_context) <<
"Vulkan: Failed to create descriptor set ... invalid allocator pointer!\n";
488 error(user_context) <<
"Vulkan: vkAllocateDescriptorSets returned " <<
vk_get_error_name(result) <<
"\n";
498 size_t uniform_buffer_count,
499 size_t storage_buffer_count,
506 <<
" vk_update_descriptor_set (user_context: " << user_context <<
", "
507 <<
"allocator: " << (
void *)allocator <<
", "
509 <<
"uniform_buffer_count: " << (
uint32_t)uniform_buffer_count <<
", "
510 <<
"storage_buffer_count: " << (
uint32_t)storage_buffer_count <<
", "
511 <<
"descriptor_set: " << (
void *)descriptor_set <<
")\n";
513 if (allocator ==
nullptr) {
514 error(user_context) <<
"Vulkan: Failed to create descriptor set ... invalid allocator pointer!\n";
519 dbi_config.minimum_capacity = storage_buffer_count + uniform_buffer_count;
524 wds_config.minimum_capacity = storage_buffer_count + uniform_buffer_count;
542 <<
"offset=" << (
uint32_t)(0) <<
" "
543 <<
"size=VK_WHOLE_SIZE\n";
571 error(user_context) <<
"Vulkan: Failed to retrieve buffer for device memory!\n";
638 <<
" vk_create_scalar_uniform_buffer (user_context: " << user_context <<
", "
639 <<
"allocator: " << (
void *)allocator <<
", "
643 if (allocator ==
nullptr) {
644 error(user_context) <<
"Vulkan: Failed to create scalar uniform buffer ... invalid allocator pointer!\n";
656 if ((region ==
nullptr) || (region->
handle ==
nullptr)) {
657 error(user_context) <<
"Vulkan: Failed to create scalar uniform buffer ... unable to allocate device memory!\n";
674 <<
" vk_update_scalar_uniform_buffer (user_context: " << user_context <<
", "
675 <<
"region: " << (
void *)region <<
")\n";
678 if (allocator ==
nullptr) {
679 error(user_context) <<
"Vulkan: Failed to update scalar uniform buffer ... invalid allocator pointer!\n";
683 if ((region ==
nullptr) || (region->
handle ==
nullptr)) {
684 error(user_context) <<
"Vulkan: Failed to update scalar uniform buffer ... invalid memory region!\n";
691 error(user_context) <<
"Vulkan: Failed to update scalar uniform buffer ... unable to map host pointer to device memory!\n";
705 allocator->
unmap(user_context, region);
714 <<
" vk_destroy_scalar_uniform_buffer (user_context: " << user_context <<
", "
715 <<
"allocator: " << (
void *)allocator <<
", "
718 if (allocator ==
nullptr) {
719 error(user_context) <<
"Vulkan: Failed to destroy scalar uniform buffer ... invalid allocator pointer!\n";
746 <<
" vk_create_pipeline_layout (user_context: " << user_context <<
", "
747 <<
"allocator: " << (
void *)allocator <<
", "
749 <<
"descriptor_set_layouts: " << (
void *)descriptor_set_layouts <<
", "
750 <<
"pipeline_layout: " << (
void *)pipeline_layout <<
")\n";
752 if (allocator ==
nullptr) {
753 error(user_context) <<
"Vulkan: Failed to create pipeline layout ... invalid allocator pointer!\n";
760 error(user_context) <<
"Vulkan: Number of descriptor sets for pipeline layout exceeds the number that can be bound by device!\n"
772 descriptor_set_layouts,
779 error(user_context) <<
"Vulkan: vkCreatePipelineLayout returned " <<
vk_get_error_name(result) <<
"\n";
791 <<
" vk_destroy_pipeline_layout (user_context: " << user_context <<
", "
792 <<
"allocator: " << (
void *)allocator <<
", "
793 <<
"pipeline_layout: " << (
void *)pipeline_layout <<
")\n";
796 if (allocator ==
nullptr) {
797 error(user_context) <<
"Vulkan: Failed to destroy pipeline layout ... invalid allocator pointer!\n";
817 <<
" vk_create_compute_pipeline (user_context: " << user_context <<
", "
818 <<
"allocator: " << (
void *)allocator <<
", "
819 <<
"shader_module: " << (
void *)shader_module <<
", "
820 <<
"pipeline_layout: " << (
void *)pipeline_layout <<
")\n";
822 if (allocator ==
nullptr) {
823 error(user_context) <<
"Vulkan: Failed to create compute pipeline ... invalid allocator pointer!\n";
849 error(user_context) <<
"Vulkan: Failed to create compute pipeline! vkCreateComputePipelines returned " <<
vk_get_error_name(result) <<
"\n";
866 <<
" vk_setup_compute_pipeline (user_context: " << user_context <<
", "
868 <<
"allocator: " << (
void *)allocator <<
", "
869 <<
"shader_bindings: " << (
void *)shader_bindings <<
", "
870 <<
"dispatch_data: " << (
void *)dispatch_data <<
", "
871 <<
"shader_module: " << (
void *)shader_module <<
", "
872 <<
"pipeline_layout: " << (
void *)pipeline_layout <<
")\n";
875 if (allocator ==
nullptr) {
876 error(user_context) <<
"Vulkan: Failed to setup compute pipeline ... invalid allocator pointer!\n";
880 if (shader_bindings ==
nullptr) {
881 error(user_context) <<
"Vulkan: Failed to setup compute pipeline ... invalid shader bindings!\n";
885 if (shader_bindings ==
nullptr) {
886 error(user_context) <<
"Vulkan: Failed to setup compute pipeline ... invalid dispatch data!\n";
892 if (entry_point_name ==
nullptr) {
893 error(user_context) <<
"Vulkan: Failed to setup compute pipeline ... missing entry point name!\n";
916 error(user_context) <<
"Vulkan: Multiple dynamic shared memory allocations found! Only one is suported!!\n";
927 debug(user_context) <<
" dispatch requests " << dispatch_data->
shared_mem_bytes <<
" bytes of shared memory\n";
947 error(user_context) <<
"Vulkan: Amount of static shared memory used exceeds device limit!\n"
953 error(user_context) <<
"Vulkan: Amount of dynamic shared memory used exceeds device limit!\n"
963 for (
uint32_t dim = 0; dim < 3; dim++) {
986 error(user_context) <<
"Vulkan: Failed to locate dispatch constant index for shader binding!\n";
993 error(user_context) <<
"Vulkan: Failed to decode shader bindings! " <<
vk_get_error_name(result) <<
"\n";
1021 error(user_context) <<
"Vulkan: Failed to destroy compute pipeline!\n";
1029 error(user_context) <<
"Vulkan: Failed to create compute pipeline!\n";
1039 error(user_context) <<
"Vulkan: Failed to create compute pipeline!\n";
1053 <<
" vk_destroy_compute_pipeline (user_context: " << user_context <<
", "
1054 <<
"allocator: " << (
void *)allocator <<
", "
1056 <<
"compute_pipeline: " << (
void *)compute_pipeline <<
")\n";
1058 if (allocator ==
nullptr) {
1059 error(user_context) <<
"Vulkan: Failed to destroy compute pipeline ... invalid allocator pointer!\n";
1072 <<
" vk_decode_shader_bindings (user_context: " << user_context <<
", "
1073 <<
"allocator: " << (
void *)allocator <<
", "
1074 <<
"module_ptr: " << (
void *)
module_ptr <<
", "
1080 if (allocator ==
nullptr) {
1081 error(user_context) <<
"Vulkan: Failed to decode shader bindings ... invalid allocator pointer!\n";
1086 error(user_context) <<
"Vulkan: Failed to decode shader bindings ... invalid module buffer!\n";
1133 if (shader_count < 1) {
1134 error(user_context) <<
"Vulkan: Failed to decode shader bindings ... no descriptors found!\n";
1142 if (shader_bindings ==
nullptr) {
1143 error(user_context) <<
"Vulkan: Failed to allocate shader_bindings! Out of memory!\n";
1156 const char *entry_point_name = (
const char *)(
module_ptr + idx);
1170 if (specialization_constants_count > 0) {
1175 if (specialization_constants ==
nullptr) {
1176 error(user_context) <<
"Vulkan: Failed to allocate specialization_constants! Out of memory!\n";
1182 for (
uint32_t sc = 0;
sc < specialization_constants_count;
sc++) {
1189 const char *constant_name = (
const char *)(
module_ptr + idx);
1190 specialization_constants[
sc].constant_name = constant_name;
1194 specialization_constants[
sc].constant_id =
module_ptr[idx++];
1197 specialization_constants[
sc].type_size =
module_ptr[idx++];
1206 if (shared_memory_allocations_count > 0) {
1211 if (shared_memory_allocations ==
nullptr) {
1212 error(user_context) <<
"Vulkan: Failed to allocate shared_memory_allocations! Out of memory!\n";
1225 const char *variable_name = (
const char *)(
module_ptr + idx);
1226 shared_memory_allocations[
sm].variable_name = variable_name;
1230 shared_memory_allocations[
sm].constant_id =
module_ptr[idx++];
1233 shared_memory_allocations[
sm].type_size =
module_ptr[idx++];
1236 shared_memory_allocations[
sm].array_size =
module_ptr[idx++];
1243 shader_bindings[
n].dispatch_data.local_size_binding.constant_id[dim] =
module_ptr[idx++];
1248 debug(user_context) <<
" [" <<
n <<
"] '" << (
const char *)entry_point_name <<
"'\n";
1250 debug(user_context) <<
" uniform_buffer_count=" << uniform_buffer_count <<
"\n"
1251 <<
" storage_buffer_count=" << storage_buffer_count <<
"\n";
1253 debug(user_context) <<
" specialization_constants_count=" << specialization_constants_count <<
"\n";
1254 for (
uint32_t sc = 0;
sc < specialization_constants_count;
sc++) {
1255 debug(user_context) <<
" [" <<
sc <<
"] "
1256 <<
"constant_name='" << (
const char *)specialization_constants[
sc].constant_name <<
"' "
1257 <<
"constant_id=" << specialization_constants[
sc].constant_id <<
" "
1258 <<
"type_size=" << specialization_constants[
sc].type_size <<
"\n";
1261 debug(user_context) <<
" shared_memory_allocations_count=" << shared_memory_allocations_count <<
"\n";
1262 for (
uint32_t sm = 0;
sm < shared_memory_allocations_count;
sm++) {
1263 debug(user_context) <<
" [" <<
sm <<
"] "
1264 <<
"variable_name='" << (
const char *)shared_memory_allocations[
sm].variable_name <<
"' "
1265 <<
"constant_id=" << shared_memory_allocations[
sm].constant_id <<
" "
1266 <<
"type_size=" << shared_memory_allocations[
sm].type_size <<
" "
1267 <<
"array_size=" << shared_memory_allocations[
sm].array_size <<
"\n";
1269 debug(user_context) <<
" local_size_binding=[";
1271 debug(user_context) << shader_bindings[
n].dispatch_data.local_size_binding.
constant_id[dim] <<
" ";
1273 debug(user_context) <<
"]\n";
1275 shader_bindings[
n].entry_point_name = entry_point_name;
1276 shader_bindings[
n].uniform_buffer_count = uniform_buffer_count;
1277 shader_bindings[
n].storage_buffer_count = storage_buffer_count;
1278 shader_bindings[
n].specialization_constants_count = specialization_constants_count;
1279 shader_bindings[
n].specialization_constants = specialization_constants;
1280 shader_bindings[
n].shared_memory_allocations_count = shared_memory_allocations_count;
1281 shader_bindings[
n].shared_memory_allocations = shared_memory_allocations;
1286 debug(user_context) <<
" Time: " << (
t_after -
t_before) / 1.0e6 <<
" ms\n";
1289 return shader_bindings;
1296 <<
" vk_validate_shader_for_device (user_context: " << user_context <<
", "
1297 <<
"allocator: " << (
void *)allocator <<
", "
1298 <<
"shader_bindings: " << (
void *)shader_bindings <<
", "
1299 <<
"shader_count: " << shader_count <<
")\n";
1321 error(user_context) <<
"Vulkan: Amount of static shared memory used exceeds device limit!\n"
1333 error(user_context) <<
"Vulkan: Number of required descriptor sets exceeds the amount available for device!\n"
1334 <<
" requested: " << shader_count <<
","
1343 const char *ptr,
int size) {
1346 <<
" vk_compile_shader_module (user_context: " << user_context <<
", "
1347 <<
"allocator: " << (
void *)allocator <<
", "
1349 <<
"module: " << (
void *)ptr <<
", "
1350 <<
"size: " << size <<
")\n";
1355 if (allocator ==
nullptr) {
1356 error(user_context) <<
"Vulkan: Failed to compile shader modules ... invalid allocator pointer!\n";
1360 if ((ptr ==
nullptr) || (size <= 0)) {
1361 error(user_context) <<
"Vulkan: Failed to compile shader modules ... invalid program source buffer!\n";
1380 debug(user_context) <<
"Vulkan: Decoding module ("
1381 <<
"module_ptr: " << (
void *)
module_ptr <<
", "
1384 <<
"binar_ptr: " << (
void *)
binary_ptr <<
", "
1399 error(user_context) <<
"Vulkan: Failed to allocate compilation cache entry! Out of memory!\n";
1407 error(user_context) <<
"Vulkan: Failed to decode shader bindings!\n";
1425 error(user_context) <<
"Vulkan: vkCreateShaderModule Failed! Error returned: " <<
vk_get_error_name(result) <<
"\n";
1434 if (
cache_entry->descriptor_set_layouts ==
nullptr) {
1435 error(user_context) <<
"Vulkan: Failed to allocate descriptor set layouts for cache entry! Out of memory!\n";
1443 debug(user_context) <<
" Time: " << (
t_after -
t_before) / 1.0e6 <<
" ms\n";
1453 <<
" vk_destroy_shader_modules (user_context: " << user_context <<
", "
1454 <<
"allocator: " << (
void *)allocator <<
", "
1460 if (allocator ==
nullptr) {
1461 error(user_context) <<
"Vulkan: Failed to destroy shader modules ... invalid allocator pointer!\n";
1467 void *user_context =
nullptr;
1471 : user_context(ctx), allocator(allocator) {
1475 if (cache_entry !=
nullptr) {
1486 debug(user_context) <<
" destroying pipeline layout " << (
void *)cache_entry->
pipeline_layout <<
"\n";
1487 vk_destroy_pipeline_layout(user_context, allocator, cache_entry->
pipeline_layout);
1518 debug(user_context) <<
" . destroying shader module " << (
void *)cache_entry->
shader_module <<
"\n";
1523 vk_host_free(user_context, cache_entry, allocator->
callbacks());
1524 cache_entry =
nullptr;
1534 debug(user_context) <<
" Time: " << (
t_after -
t_before) / 1.0e6 <<
" ms\n";
1559 error(user_context) <<
"Vulkan: Failed to retrieve buffer for device memory!\n";
1597 error(user_context) <<
"Vulkan: Failed to acquire context!\n";
1606 error(user_context) <<
"Vulkan: Invalid offset for device crop!\n";
1613 error(user_context) <<
"Vulkan: Failed to crop region! Invalide device region!\n";
1620 error(user_context) <<
"Vulkan: Failed to crop region! Unable to create memory region!\n";
1630 debug(user_context) <<
" Time: " << (
t_after -
t_before) / 1.0e6 <<
" ms\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_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)
VKAPI_ATTR void VKAPI_CALL vkCmdDispatch(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ)
@ VK_COMMAND_BUFFER_LEVEL_PRIMARY
VKAPI_ATTR void VKAPI_CALL vkDestroyShaderModule(VkDevice device, VkShaderModule shaderModule, const VkAllocationCallbacks *pAllocator)
@ VK_SHADER_STAGE_COMPUTE_BIT
VKAPI_ATTR void VKAPI_CALL vkFreeCommandBuffers(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer *pCommandBuffers)
VKAPI_ATTR void VKAPI_CALL vkCmdBindPipeline(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline)
VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorPool(VkDevice device, const VkDescriptorPoolCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDescriptorPool *pDescriptorPool)
VKAPI_ATTR VkResult VKAPI_CALL vkAllocateDescriptorSets(VkDevice device, const VkDescriptorSetAllocateInfo *pAllocateInfo, VkDescriptorSet *pDescriptorSets)
VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorSetLayout(VkDevice device, const VkDescriptorSetLayoutCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDescriptorSetLayout *pSetLayout)
@ VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT
@ VK_PIPELINE_BIND_POINT_COMPUTE
VKAPI_ATTR void VKAPI_CALL vkCmdCopyBuffer(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferCopy *pRegions)
VKAPI_ATTR VkResult VKAPI_CALL vkResetCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags)
VKAPI_ATTR void VKAPI_CALL vkDestroyCommandPool(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks *pAllocator)
@ VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT
VKAPI_ATTR VkResult VKAPI_CALL vkCreateCommandPool(VkDevice device, const VkCommandPoolCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkCommandPool *pCommandPool)
VKAPI_ATTR void VKAPI_CALL vkDestroyPipeline(VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks *pAllocator)
VKAPI_ATTR VkResult VKAPI_CALL vkCreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkComputePipelineCreateInfo *pCreateInfos, const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines)
VKAPI_ATTR VkResult VKAPI_CALL vkQueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo *pSubmits, VkFence fence)
VKAPI_ATTR void VKAPI_CALL vkCmdBindDescriptorSets(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const VkDescriptorSet *pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t *pDynamicOffsets)
VKAPI_ATTR VkResult VKAPI_CALL vkAllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo *pAllocateInfo, VkCommandBuffer *pCommandBuffers)
@ VK_ERROR_INITIALIZATION_FAILED
@ VK_ERROR_TOO_MANY_OBJECTS
@ VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER
@ VK_DESCRIPTOR_TYPE_STORAGE_BUFFER
VKAPI_ATTR void VKAPI_CALL vkDestroyPipelineLayout(VkDevice device, VkPipelineLayout pipelineLayout, const VkAllocationCallbacks *pAllocator)
VKAPI_ATTR VkResult VKAPI_CALL vkCreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkShaderModule *pShaderModule)
VKAPI_ATTR void VKAPI_CALL vkUpdateDescriptorSets(VkDevice device, uint32_t descriptorWriteCount, const VkWriteDescriptorSet *pDescriptorWrites, uint32_t descriptorCopyCount, const VkCopyDescriptorSet *pDescriptorCopies)
@ VK_COMMAND_POOL_CREATE_TRANSIENT_BIT
VKAPI_ATTR VkResult VKAPI_CALL vkEndCommandBuffer(VkCommandBuffer commandBuffer)
VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, const VkAllocationCallbacks *pAllocator)
VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorSetLayout(VkDevice device, VkDescriptorSetLayout descriptorSetLayout, const VkAllocationCallbacks *pAllocator)
VKAPI_ATTR VkResult VKAPI_CALL vkCreatePipelineLayout(VkDevice device, const VkPipelineLayoutCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkPipelineLayout *pPipelineLayout)
@ VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO
@ VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO
@ VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO
@ VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO
@ VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET
@ VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO
@ VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO
@ VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO
@ VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO
@ VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO
@ VK_STRUCTURE_TYPE_SUBMIT_INFO
@ VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO
VKAPI_ATTR VkResult VKAPI_CALL vkBeginCommandBuffer(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo *pBeginInfo)
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
VkDescriptorSetLayout * descriptor_set_layouts
VulkanShaderBinding * shader_bindings
VkPipelineLayout pipeline_layout
VkShaderModule shader_module
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]
uint32_t maxPerStageDescriptorStorageBuffers
uint32_t maxBoundDescriptorSets
uint32_t maxComputeSharedMemorySize
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.