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";
126 <<
" vk_create_command_buffer (user_context: " << user_context <<
", "
127 <<
"allocator: " << (
void *)allocator <<
", "
128 <<
"command_pool: " << (
void *)command_pool <<
")\n";
130 if (allocator ==
nullptr) {
131 error(user_context) <<
"Vulkan: Failed to create command buffer ... invalid allocator pointer!\n";
146 error(user_context) <<
"Vulkan: Failed to allocate command buffers!\n";
155 <<
" vk_destroy_command_buffer (user_context: " << user_context <<
", "
156 <<
"allocator: " << (
void *)allocator <<
", "
157 <<
"command_pool: " << (
void *)command_pool <<
", "
160 if (allocator ==
nullptr) {
161 error(user_context) <<
"Vulkan: Failed to destroy command buffer ... invalid allocator pointer!\n";
180 <<
" vk_fill_command_buffer_with_dispatch_call (user_context: " << user_context <<
", "
181 <<
"device: " << (
void *)device <<
", "
183 <<
"pipeline_layout: " << (
void *)pipeline_layout <<
", "
184 <<
"descriptor_set: " << (
void *)descriptor_set <<
", "
198 error(user_context) <<
"vkBeginCommandBuffer returned " <<
vk_get_error_name(result) <<
"\n";
209 error(user_context) <<
"vkEndCommandBuffer returned " <<
vk_get_error_name(result) <<
"\n";
219 <<
" vk_submit_command_buffer (user_context: " << user_context <<
", "
220 <<
"queue: " << (
void *)queue <<
", "
239 error(user_context) <<
"Vulkan: vkQueueSubmit returned " <<
vk_get_error_name(result) <<
"\n";
276 return bindings_count;
288 <<
" vk_create_descriptor_pool (user_context: " << user_context <<
", "
289 <<
"allocator: " << (
void *)allocator <<
", "
290 <<
"uniform_buffer_count: " << (
uint32_t)uniform_buffer_count <<
", "
291 <<
"storage_buffer_count: " << (
uint32_t)storage_buffer_count <<
")\n";
293 if (allocator ==
nullptr) {
294 error(user_context) <<
"Vulkan: Failed to create descriptor pool ... invalid allocator pointer!\n";
300 pool_config.minimum_capacity = (uniform_buffer_count ? 1 : 0) + (storage_buffer_count ? 1 : 0);
304 if (uniform_buffer_count > 0) {
312 if (storage_buffer_count > 0) {
331 error(user_context) <<
"Vulkan: Failed to create descriptor pool! vkCreateDescriptorPool returned " <<
vk_get_error_name(result) <<
"\n";
342 <<
" vk_destroy_descriptor_pool (user_context: " << user_context <<
", "
343 <<
"allocator: " << (
void *)allocator <<
", "
344 <<
"descriptor_pool: " << (
void *)descriptor_pool <<
")\n";
346 if (allocator ==
nullptr) {
347 error(user_context) <<
"Vulkan: Failed to destroy descriptor pool ... invalid allocator pointer!\n";
364 <<
" vk_create_descriptor_set_layout (user_context: " << user_context <<
", "
365 <<
"allocator: " << (
void *)allocator <<
", "
366 <<
"uniform_buffer_count: " << uniform_buffer_count <<
", "
367 <<
"storage_buffer_count: " << storage_buffer_count <<
", "
368 <<
"layout: " << (
void *)layout <<
")\n";
370 if (allocator ==
nullptr) {
371 error(user_context) <<
"Vulkan: Failed to create descriptor set layout ... invalid allocator pointer!\n";
377 layout_config.minimum_capacity = uniform_buffer_count + storage_buffer_count;
381 for (
uint32_t n = 0;
n < uniform_buffer_count; ++
n) {
399 for (
uint32_t n = 0;
n < storage_buffer_count; ++
n) {
429 error(user_context) <<
"vkCreateDescriptorSetLayout returned " <<
vk_get_error_name(result) <<
"\n";
442 <<
" vk_destroy_descriptor_set_layout (user_context: " << user_context <<
", "
443 <<
"allocator: " << (
void *)allocator <<
", "
446 if (allocator ==
nullptr) {
447 error(user_context) <<
"Vulkan: Failed to destroy descriptor set layout ... invalid allocator pointer!\n";
463 <<
" vk_create_descriptor_set (user_context: " << user_context <<
", "
464 <<
"allocator: " << (
void *)allocator <<
", "
466 <<
"descriptor_pool: " << (
void *)descriptor_pool <<
")\n";
468 if (allocator ==
nullptr) {
469 error(user_context) <<
"Vulkan: Failed to create descriptor set ... invalid allocator pointer!\n";
484 error(user_context) <<
"Vulkan: vkAllocateDescriptorSets returned " <<
vk_get_error_name(result) <<
"\n";
494 size_t uniform_buffer_count,
495 size_t storage_buffer_count,
502 <<
" vk_update_descriptor_set (user_context: " << user_context <<
", "
503 <<
"allocator: " << (
void *)allocator <<
", "
505 <<
"uniform_buffer_count: " << (
uint32_t)uniform_buffer_count <<
", "
506 <<
"storage_buffer_count: " << (
uint32_t)storage_buffer_count <<
", "
507 <<
"descriptor_set: " << (
void *)descriptor_set <<
")\n";
509 if (allocator ==
nullptr) {
510 error(user_context) <<
"Vulkan: Failed to create descriptor set ... invalid allocator pointer!\n";
515 dbi_config.minimum_capacity = storage_buffer_count + uniform_buffer_count;
520 wds_config.minimum_capacity = storage_buffer_count + uniform_buffer_count;
538 <<
"offset=" << (
uint32_t)(0) <<
" "
539 <<
"size=VK_WHOLE_SIZE\n";
567 error(user_context) <<
"Vulkan: Failed to retrieve buffer for device memory!\n";
634 <<
" vk_create_scalar_uniform_buffer (user_context: " << user_context <<
", "
635 <<
"allocator: " << (
void *)allocator <<
", "
639 if (allocator ==
nullptr) {
640 error(user_context) <<
"Vulkan: Failed to create scalar uniform buffer ... invalid allocator pointer!\n";
652 if ((region ==
nullptr) || (region->
handle ==
nullptr)) {
653 error(user_context) <<
"Vulkan: Failed to create scalar uniform buffer ... unable to allocate device memory!\n";
670 <<
" vk_update_scalar_uniform_buffer (user_context: " << user_context <<
", "
671 <<
"region: " << (
void *)region <<
")\n";
674 if (allocator ==
nullptr) {
675 error(user_context) <<
"Vulkan: Failed to update scalar uniform buffer ... invalid allocator pointer!\n";
679 if ((region ==
nullptr) || (region->
handle ==
nullptr)) {
680 error(user_context) <<
"Vulkan: Failed to update scalar uniform buffer ... invalid memory region!\n";
687 error(user_context) <<
"Vulkan: Failed to update scalar uniform buffer ... unable to map host pointer to device memory!\n";
701 allocator->
unmap(user_context, region);
710 <<
" vk_destroy_scalar_uniform_buffer (user_context: " << user_context <<
", "
711 <<
"allocator: " << (
void *)allocator <<
", "
714 if (allocator ==
nullptr) {
715 error(user_context) <<
"Vulkan: Failed to destroy scalar uniform buffer ... invalid allocator pointer!\n";
742 <<
" vk_create_pipeline_layout (user_context: " << user_context <<
", "
743 <<
"allocator: " << (
void *)allocator <<
", "
745 <<
"descriptor_set_layouts: " << (
void *)descriptor_set_layouts <<
", "
746 <<
"pipeline_layout: " << (
void *)pipeline_layout <<
")\n";
748 if (allocator ==
nullptr) {
749 error(user_context) <<
"Vulkan: Failed to create pipeline layout ... invalid allocator pointer!\n";
758 descriptor_set_layouts,
765 error(user_context) <<
"Vulkan: vkCreatePipelineLayout returned " <<
vk_get_error_name(result) <<
"\n";
777 <<
" vk_destroy_pipeline_layout (user_context: " << user_context <<
", "
778 <<
"allocator: " << (
void *)allocator <<
", "
779 <<
"pipeline_layout: " << (
void *)pipeline_layout <<
")\n";
782 if (allocator ==
nullptr) {
783 error(user_context) <<
"Vulkan: Failed to destroy pipeline layout ... invalid allocator pointer!\n";
803 <<
" vk_create_compute_pipeline (user_context: " << user_context <<
", "
804 <<
"allocator: " << (
void *)allocator <<
", "
805 <<
"shader_module: " << (
void *)shader_module <<
", "
806 <<
"pipeline_layout: " << (
void *)pipeline_layout <<
")\n";
808 if (allocator ==
nullptr) {
809 error(user_context) <<
"Vulkan: Failed to create compute pipeline ... invalid allocator pointer!\n";
835 error(user_context) <<
"Vulkan: Failed to create compute pipeline! vkCreateComputePipelines returned " <<
vk_get_error_name(result) <<
"\n";
852 <<
" vk_setup_compute_pipeline (user_context: " << user_context <<
", "
854 <<
"allocator: " << (
void *)allocator <<
", "
855 <<
"shader_bindings: " << (
void *)shader_bindings <<
", "
856 <<
"dispatch_data: " << (
void *)dispatch_data <<
", "
857 <<
"shader_module: " << (
void *)shader_module <<
", "
858 <<
"pipeline_layout: " << (
void *)pipeline_layout <<
")\n";
861 if (allocator ==
nullptr) {
862 error(user_context) <<
"Vulkan: Failed to setup compute pipeline ... invalid allocator pointer!\n";
866 if (shader_bindings ==
nullptr) {
867 error(user_context) <<
"Vulkan: Failed to setup compute pipeline ... invalid shader bindings!\n";
871 if (shader_bindings ==
nullptr) {
872 error(user_context) <<
"Vulkan: Failed to setup compute pipeline ... invalid dispatch data!\n";
878 if (entry_point_name ==
nullptr) {
879 error(user_context) <<
"Vulkan: Failed to setup compute pipeline ... missing entry point name!\n";
902 error(user_context) <<
"Vulkan: Multiple dynamic shared memory allocations found! Only one is suported!!\n";
912 debug(user_context) <<
" dispatch requests " << dispatch_data->
shared_mem_bytes <<
" bytes of shared memory\n";
930 for (
uint32_t dim = 0; dim < 3; dim++) {
951 error(user_context) <<
"Vulkan: Failed to locate dispatch constant index for shader binding!\n";
958 error(user_context) <<
"Vulkan: Failed to decode shader bindings! " <<
vk_get_error_name(result) <<
"\n";
986 error(user_context) <<
"Vulkan: Failed to destroy compute pipeline!\n";
994 error(user_context) <<
"Vulkan: Failed to create compute pipeline!\n";
1004 error(user_context) <<
"Vulkan: Failed to create compute pipeline!\n";
1018 <<
" vk_destroy_compute_pipeline (user_context: " << user_context <<
", "
1019 <<
"allocator: " << (
void *)allocator <<
", "
1021 <<
"compute_pipeline: " << (
void *)compute_pipeline <<
")\n";
1023 if (allocator ==
nullptr) {
1024 error(user_context) <<
"Vulkan: Failed to destroy compute pipeline ... invalid allocator pointer!\n";
1037 <<
" vk_decode_shader_bindings (user_context: " << user_context <<
", "
1038 <<
"allocator: " << (
void *)allocator <<
", "
1039 <<
"module_ptr: " << (
void *)
module_ptr <<
", "
1045 if (allocator ==
nullptr) {
1046 error(user_context) <<
"Vulkan: Failed to decode shader bindings ... invalid allocator pointer!\n";
1051 error(user_context) <<
"Vulkan: Failed to decode shader bindings ... invalid module buffer!\n";
1098 if (shader_count < 1) {
1099 error(user_context) <<
"Vulkan: Failed to decode shader bindings ... no descriptors found!\n";
1107 if (shader_bindings ==
nullptr) {
1108 error(user_context) <<
"Vulkan: Failed to allocate shader_bindings! Out of memory!\n";
1121 const char *entry_point_name = (
const char *)(
module_ptr + idx);
1135 if (specialization_constants_count > 0) {
1140 if (specialization_constants ==
nullptr) {
1141 error(user_context) <<
"Vulkan: Failed to allocate specialization_constants! Out of memory!\n";
1147 for (
uint32_t sc = 0;
sc < specialization_constants_count;
sc++) {
1154 const char *constant_name = (
const char *)(
module_ptr + idx);
1155 specialization_constants[
sc].constant_name = constant_name;
1159 specialization_constants[
sc].constant_id =
module_ptr[idx++];
1162 specialization_constants[
sc].type_size =
module_ptr[idx++];
1171 if (shared_memory_allocations_count > 0) {
1176 if (shared_memory_allocations ==
nullptr) {
1177 error(user_context) <<
"Vulkan: Failed to allocate shared_memory_allocations! Out of memory!\n";
1190 const char *variable_name = (
const char *)(
module_ptr + idx);
1191 shared_memory_allocations[
sm].variable_name = variable_name;
1195 shared_memory_allocations[
sm].constant_id =
module_ptr[idx++];
1198 shared_memory_allocations[
sm].type_size =
module_ptr[idx++];
1201 shared_memory_allocations[
sm].array_size =
module_ptr[idx++];
1208 shader_bindings[
n].dispatch_data.local_size_binding.constant_id[dim] =
module_ptr[idx++];
1213 debug(user_context) <<
" [" <<
n <<
"] '" << (
const char *)entry_point_name <<
"'\n";
1215 debug(user_context) <<
" uniform_buffer_count=" << uniform_buffer_count <<
"\n"
1216 <<
" storage_buffer_count=" << storage_buffer_count <<
"\n";
1218 debug(user_context) <<
" specialization_constants_count=" << specialization_constants_count <<
"\n";
1219 for (
uint32_t sc = 0;
sc < specialization_constants_count;
sc++) {
1220 debug(user_context) <<
" [" <<
sc <<
"] "
1221 <<
"constant_name='" << (
const char *)specialization_constants[
sc].constant_name <<
"' "
1222 <<
"constant_id=" << specialization_constants[
sc].constant_id <<
" "
1223 <<
"type_size=" << specialization_constants[
sc].type_size <<
"\n";
1226 debug(user_context) <<
" shared_memory_allocations_count=" << shared_memory_allocations_count <<
"\n";
1227 for (
uint32_t sm = 0;
sm < shared_memory_allocations_count;
sm++) {
1228 debug(user_context) <<
" [" <<
sm <<
"] "
1229 <<
"variable_name='" << (
const char *)shared_memory_allocations[
sm].variable_name <<
"' "
1230 <<
"constant_id=" << shared_memory_allocations[
sm].constant_id <<
" "
1231 <<
"type_size=" << shared_memory_allocations[
sm].type_size <<
" "
1232 <<
"array_size=" << shared_memory_allocations[
sm].array_size <<
"\n";
1234 debug(user_context) <<
" local_size_binding=[";
1236 debug(user_context) << shader_bindings[
n].dispatch_data.local_size_binding.
constant_id[dim] <<
" ";
1238 debug(user_context) <<
"]\n";
1240 shader_bindings[
n].entry_point_name = entry_point_name;
1241 shader_bindings[
n].uniform_buffer_count = uniform_buffer_count;
1242 shader_bindings[
n].storage_buffer_count = storage_buffer_count;
1243 shader_bindings[
n].specialization_constants_count = specialization_constants_count;
1244 shader_bindings[
n].specialization_constants = specialization_constants;
1245 shader_bindings[
n].shared_memory_allocations_count = shared_memory_allocations_count;
1246 shader_bindings[
n].shared_memory_allocations = shared_memory_allocations;
1251 debug(user_context) <<
" Time: " << (
t_after -
t_before) / 1.0e6 <<
" ms\n";
1254 return shader_bindings;
1258 const char *ptr,
int size) {
1261 <<
" vk_compile_shader_module (user_context: " << user_context <<
", "
1262 <<
"allocator: " << (
void *)allocator <<
", "
1264 <<
"module: " << (
void *)ptr <<
", "
1265 <<
"size: " << size <<
")\n";
1270 if (allocator ==
nullptr) {
1271 error(user_context) <<
"Vulkan: Failed to compile shader modules ... invalid allocator pointer!\n";
1275 if ((ptr ==
nullptr) || (size <= 0)) {
1276 error(user_context) <<
"Vulkan: Failed to compile shader modules ... invalid program source buffer!\n";
1295 debug(user_context) <<
"Vulkan: Decoding module ("
1296 <<
"module_ptr: " << (
void *)
module_ptr <<
", "
1299 <<
"binar_ptr: " << (
void *)
binary_ptr <<
", "
1314 error(user_context) <<
"Vulkan: Failed to allocate compilation cache entry! Out of memory!\n";
1322 error(user_context) <<
"Vulkan: Failed to decode shader bindings!\n";
1332 error(user_context) <<
"Vulkan: vkCreateShaderModule Failed! Error returned: " <<
vk_get_error_name(result) <<
"\n";
1341 if (
cache_entry->descriptor_set_layouts ==
nullptr) {
1342 error(user_context) <<
"Vulkan: Failed to allocate descriptor set layouts for cache entry! Out of memory!\n";
1350 debug(user_context) <<
" Time: " << (
t_after -
t_before) / 1.0e6 <<
" ms\n";
1360 <<
" vk_destroy_shader_modules (user_context: " << user_context <<
", "
1361 <<
"allocator: " << (
void *)allocator <<
", "
1367 if (allocator ==
nullptr) {
1368 error(user_context) <<
"Vulkan: Failed to destroy shader modules ... invalid allocator pointer!\n";
1374 void *user_context =
nullptr;
1378 : user_context(ctx), allocator(allocator) {
1382 if (cache_entry !=
nullptr) {
1393 debug(user_context) <<
" destroying pipeline layout " << (
void *)cache_entry->
pipeline_layout <<
"\n";
1394 vk_destroy_pipeline_layout(user_context, allocator, cache_entry->
pipeline_layout);
1425 debug(user_context) <<
" . destroying shader module " << (
void *)cache_entry->
shader_module <<
"\n";
1430 vk_host_free(user_context, cache_entry, allocator->
callbacks());
1431 cache_entry =
nullptr;
1441 debug(user_context) <<
" Time: " << (
t_after -
t_before) / 1.0e6 <<
" ms\n";
1466 error(user_context) <<
"Vulkan: Failed to retrieve buffer for device memory!\n";
1504 error(user_context) <<
"Vulkan: Failed to acquire context!\n";
1513 error(user_context) <<
"Vulkan: Invalid offset for device crop!\n";
1520 error(user_context) <<
"Vulkan: Failed to crop region! Invalide device region!\n";
1527 error(user_context) <<
"Vulkan: Failed to crop region! Unable to create memory region!\n";
1537 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_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
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 void VKAPI_CALL vkDestroyCommandPool(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks *pAllocator)
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.
Expr cast(Expr a)
Cast an expression to the halide type corresponding to the C++ type T.
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]
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.