Rename total_icd_count to icd_terms_count
authorCharles Giessen <charles@lunarg.com>
Mon, 18 Dec 2023 22:51:08 +0000 (15:51 -0700)
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>
Mon, 29 Apr 2024 16:53:33 +0000 (10:53 -0600)
loader/debug_utils.c
loader/loader.c
loader/loader_common.h
loader/wsi.c

index 341dbb1b4d76937ae0f9fd2f1bc9de59f63b130b..6656eb77c330c7e9b41618054e883e186c5593ca 100644 (file)
@@ -183,7 +183,7 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateDebugUtilsMessengerEXT(VkInstanc
     VkLayerDbgFunctionNode *new_dbg_func_node = NULL;
 
     icd_info = (VkDebugUtilsMessengerEXT *)loader_calloc_with_instance_fallback(
-        pAllocator, inst, inst->total_icd_count * sizeof(VkDebugUtilsMessengerEXT), VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
+        pAllocator, inst, inst->icd_terms_count * sizeof(VkDebugUtilsMessengerEXT), VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
 
     if (!icd_info) {
         res = VK_ERROR_OUT_OF_HOST_MEMORY;
@@ -439,7 +439,7 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateDebugReportCallbackEXT(VkInstanc
     VkLayerDbgFunctionNode *new_dbg_func_node = NULL;
 
     icd_info = ((VkDebugReportCallbackEXT *)loader_calloc_with_instance_fallback(
-        pAllocator, inst, inst->total_icd_count * sizeof(VkDebugReportCallbackEXT), VK_SYSTEM_ALLOCATION_SCOPE_OBJECT));
+        pAllocator, inst, inst->icd_terms_count * sizeof(VkDebugReportCallbackEXT), VK_SYSTEM_ALLOCATION_SCOPE_OBJECT));
     if (!icd_info) {
         res = VK_ERROR_OUT_OF_HOST_MEMORY;
         goto out;
index b000fedb7431d1074fa503d7e1baa008eee7d5aa..474a01ee7560178cecc6902db0d785d1f83ea135 100644 (file)
@@ -1311,7 +1311,7 @@ void loader_remove_logical_device(struct loader_icd_term *icd_term, struct loade
 
 void loader_icd_destroy(struct loader_instance *ptr_inst, struct loader_icd_term *icd_term,
                         const VkAllocationCallbacks *pAllocator) {
-    ptr_inst->total_icd_count--;
+    ptr_inst->icd_terms_count--;
     for (struct loader_device *dev = icd_term->logical_device_list; dev;) {
         struct loader_device *next_dev = dev->next;
         loader_destroy_logical_device(dev, pAllocator);
@@ -1335,7 +1335,7 @@ struct loader_icd_term *loader_icd_add(struct loader_instance *ptr_inst, const s
     // Prepend to the list
     icd_term->next = ptr_inst->icd_terms;
     ptr_inst->icd_terms = icd_term;
-    ptr_inst->total_icd_count++;
+    ptr_inst->icd_terms_count++;
 
     return icd_term;
 }
@@ -6152,7 +6152,7 @@ VkResult setup_loader_term_phys_devs(struct loader_instance *inst) {
     }
 #endif
 
-    icd_count = inst->total_icd_count;
+    icd_count = inst->icd_terms_count;
 
     // Allocate something to store the physical device characteristics that we read from each ICD.
     icd_phys_dev_array =
index 6c2b436826a6bd08d2eb2d16284ddd84433f8e24..53ee0f0dc340b438ab25aede46e5921f759166f9 100644 (file)
@@ -278,7 +278,7 @@ struct loader_instance {
 
     struct loader_instance *next;
 
-    uint32_t total_icd_count;
+    uint32_t icd_terms_count;
     struct loader_icd_term *icd_terms;
     struct loader_icd_tramp_list icd_tramp_list;
 
index 46c81b9ee0686abbf95bd775d2a3036622f9eff2..ad4d6b90538b06cb49071d132d1a4596e54c79e0 100644 (file)
@@ -561,7 +561,7 @@ VkIcdSurface *AllocateIcdSurfaceStruct(struct loader_instance *instance, size_t
         pIcdSurface->non_platform_offset = (uint32_t)((uint8_t *)(&pIcdSurface->base_size) - (uint8_t *)pIcdSurface);
         pIcdSurface->entire_size = sizeof(VkIcdSurface);
 
-        pIcdSurface->real_icd_surfaces = loader_instance_heap_calloc(instance, sizeof(VkSurfaceKHR) * instance->total_icd_count,
+        pIcdSurface->real_icd_surfaces = loader_instance_heap_calloc(instance, sizeof(VkSurfaceKHR) * instance->icd_terms_count,
                                                                      VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
         if (pIcdSurface->real_icd_surfaces == NULL) {
             loader_instance_heap_free(instance, pIcdSurface);