From: Christophe Date: Wed, 1 Feb 2023 17:34:17 +0000 (+0100) Subject: Testing C.I. memory leak hypothesis X-Git-Tag: upstream/1.3.268~224 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=189762fa9383fc80f7a5eb48e9a158f18886ab92;p=platform%2Fupstream%2FVulkan-Loader.git Testing C.I. memory leak hypothesis --- diff --git a/loader/loader.c b/loader/loader.c index 37ae1805..7d39a048 100644 --- a/loader/loader.c +++ b/loader/loader.c @@ -4712,7 +4712,8 @@ VkResult loader_create_instance_chain(const VkInstanceCreateInfo *pCreateInfo, c if (pCreateInfo->enabledLayerCount > 0 && pCreateInfo->ppEnabledLayerNames != NULL) { inst->enabled_layer_count = pCreateInfo->enabledLayerCount; - + inst->enabled_layer_names = pCreateInfo->ppEnabledLayerNames; + /* inst->enabled_layer_names = (char **)loader_instance_heap_alloc(inst, sizeof(char *) * pCreateInfo->enabledLayerCount, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE); @@ -4722,6 +4723,7 @@ VkResult loader_create_instance_chain(const VkInstanceCreateInfo *pCreateInfo, c memset(inst->enabled_layer_names[i], '\0', sizeof(char) * size); strcpy(inst->enabled_layer_names[i], pCreateInfo->ppEnabledLayerNames[i]); } + */ } if (inst->expanded_activated_layer_list.count > 0) { @@ -5852,6 +5854,7 @@ VKAPI_ATTR void VKAPI_CALL terminator_DestroyInstance(VkInstance instance, const loader_free_dev_ext_table(ptr_instance); loader_free_phys_dev_ext_table(ptr_instance); +/* for (uint32_t i = 0, n = ptr_instance->enabled_layer_count; i < n; ++i) { loader_instance_heap_free(ptr_instance, ptr_instance->enabled_layer_names[i]); } @@ -5860,6 +5863,7 @@ VKAPI_ATTR void VKAPI_CALL terminator_DestroyInstance(VkInstance instance, const loader_instance_heap_free(ptr_instance, ptr_instance->enabled_layer_names); memset(&ptr_instance->enabled_layer_names, 0, sizeof(ptr_instance->enabled_layer_names)); } +*/ } VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCreateInfo, diff --git a/tests/loader_regression_tests.cpp b/tests/loader_regression_tests.cpp index 0f1d436f..6d3a02c5 100644 --- a/tests/loader_regression_tests.cpp +++ b/tests/loader_regression_tests.cpp @@ -1027,7 +1027,7 @@ TEST(CreateDevice, UnmatchInstanceAndDeviceLayers) { ASSERT_TRUE(log.find("loader_create_device_chain: Using deprecated and ignored 'ppEnabledLayerNames' member of 'VkDeviceCreateInfo' when creating a Vulkan device.")); } - +/* // Device layers are deprecated. // Ensure that when VkInstanceCreateInfo is deleted, the check of the instance layer lists is running correctly during VkDevice creation // https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#extendingvulkan-layers-devicelayerdeprecation @@ -1057,7 +1057,7 @@ TEST(CreateDevice, CheckCopyOfInstanceLayerNames) { dev.CheckCreate(phys_dev); } - +*/ TEST(CreateDevice, ConsecutiveCreate) { FrameworkEnvironment env{}; env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));