From 54c33aeb0e1bb523df5fa7fd1ab405c24c3eaf69 Mon Sep 17 00:00:00 2001 From: shegangbin Date: Tue, 10 Oct 2023 09:55:35 +0000 Subject: [PATCH] revert old interfaces Signed-off-by: shegangbin Change-Id: Ic9af498fac6f5da5d441c4732749ad5c59b07844 --- loader/generated/vk_dispatch_table_helper.h | 14 ----- loader/generated/vk_layer_dispatch_table.h | 6 --- loader/generated/vk_loader_extensions.c | 59 --------------------- 3 files changed, 79 deletions(-) diff --git a/loader/generated/vk_dispatch_table_helper.h b/loader/generated/vk_dispatch_table_helper.h index 35ef23d2..223147bd 100644 --- a/loader/generated/vk_dispatch_table_helper.h +++ b/loader/generated/vk_dispatch_table_helper.h @@ -380,12 +380,6 @@ static VKAPI_ATTR void VKAPI_CALL StubCmdOpticalFlowExecuteNV(VkCommandBuffer co static VKAPI_ATTR VkResult VKAPI_CALL StubGetFramebufferTilePropertiesQCOM(VkDevice device, VkFramebuffer framebuffer, uint32_t* pPropertiesCount, VkTilePropertiesQCOM* pProperties) { return VK_SUCCESS; } static VKAPI_ATTR VkResult VKAPI_CALL StubGetDynamicRenderingTilePropertiesQCOM(VkDevice device, const VkRenderingInfo* pRenderingInfo, VkTilePropertiesQCOM* pProperties) { return VK_SUCCESS; } #ifdef VK_USE_PLATFORM_OHOS -static VKAPI_ATTR VkResult VKAPI_CALL StubSetNativeFenceFdOpenHarmony(VkDevice device, int32_t nativeFenceFd, VkSemaphore semaphore, VkFence fence) { return VK_SUCCESS; } -#endif // VK_USE_PLATFORM_OHOS -#ifdef VK_USE_PLATFORM_OHOS -static VKAPI_ATTR VkResult VKAPI_CALL StubGetNativeFenceFdOpenHarmony(VkQueue queue, uint32_t waitSemaphoreCount, const VkSemaphore* pWaitSemaphores, VkImage image, int32_t* pNativeFenceFd) { return VK_SUCCESS; } -#endif // VK_USE_PLATFORM_OHOS -#ifdef VK_USE_PLATFORM_OHOS static VKAPI_ATTR VkResult VKAPI_CALL StubGetSwapchainGrallocUsageOHOS(VkDevice device, VkFormat format, VkImageUsageFlags imageUsage, uint64_t* grallocUsage) { return VK_SUCCESS; } #endif // VK_USE_PLATFORM_OHOS #ifdef VK_USE_PLATFORM_OHOS @@ -1259,14 +1253,6 @@ static inline void layer_init_device_dispatch_table(VkDevice device, VkLayerDisp if (table->GetFramebufferTilePropertiesQCOM == nullptr) { table->GetFramebufferTilePropertiesQCOM = (PFN_vkGetFramebufferTilePropertiesQCOM)StubGetFramebufferTilePropertiesQCOM; } table->GetDynamicRenderingTilePropertiesQCOM = (PFN_vkGetDynamicRenderingTilePropertiesQCOM) gpa(device, "vkGetDynamicRenderingTilePropertiesQCOM"); if (table->GetDynamicRenderingTilePropertiesQCOM == nullptr) { table->GetDynamicRenderingTilePropertiesQCOM = (PFN_vkGetDynamicRenderingTilePropertiesQCOM)StubGetDynamicRenderingTilePropertiesQCOM; } -#ifdef VK_USE_PLATFORM_OHOS - table->SetNativeFenceFdOpenHarmony = (PFN_vkSetNativeFenceFdOpenHarmony) gpa(device, "vkSetNativeFenceFdOpenHarmony"); - if (table->SetNativeFenceFdOpenHarmony == nullptr) { table->SetNativeFenceFdOpenHarmony = (PFN_vkSetNativeFenceFdOpenHarmony)StubSetNativeFenceFdOpenHarmony; } -#endif // VK_USE_PLATFORM_OHOS -#ifdef VK_USE_PLATFORM_OHOS - table->GetNativeFenceFdOpenHarmony = (PFN_vkGetNativeFenceFdOpenHarmony) gpa(device, "vkGetNativeFenceFdOpenHarmony"); - if (table->GetNativeFenceFdOpenHarmony == nullptr) { table->GetNativeFenceFdOpenHarmony = (PFN_vkGetNativeFenceFdOpenHarmony)StubGetNativeFenceFdOpenHarmony; } -#endif // VK_USE_PLATFORM_OHOS #ifdef VK_USE_PLATFORM_OHOS table->GetSwapchainGrallocUsageOHOS = (PFN_vkGetSwapchainGrallocUsageOHOS) gpa(device, "vkGetSwapchainGrallocUsageOHOS"); if (table->GetSwapchainGrallocUsageOHOS == nullptr) { table->GetSwapchainGrallocUsageOHOS = (PFN_vkGetSwapchainGrallocUsageOHOS)StubGetSwapchainGrallocUsageOHOS; } diff --git a/loader/generated/vk_layer_dispatch_table.h b/loader/generated/vk_layer_dispatch_table.h index 5fb0c84e..ee395095 100644 --- a/loader/generated/vk_layer_dispatch_table.h +++ b/loader/generated/vk_layer_dispatch_table.h @@ -1025,12 +1025,6 @@ typedef struct VkLayerDispatchTable_ { PFN_vkGetDynamicRenderingTilePropertiesQCOM GetDynamicRenderingTilePropertiesQCOM; // ---- VK_OHOS_native_buffer extension commands -#ifdef VK_USE_PLATFORM_OHOS - PFN_vkSetNativeFenceFdOpenHarmony SetNativeFenceFdOpenHarmony; -#endif // VK_USE_PLATFORM_OHOS -#ifdef VK_USE_PLATFORM_OHOS - PFN_vkGetNativeFenceFdOpenHarmony GetNativeFenceFdOpenHarmony; -#endif // VK_USE_PLATFORM_OHOS #ifdef VK_USE_PLATFORM_OHOS PFN_vkGetSwapchainGrallocUsageOHOS GetSwapchainGrallocUsageOHOS; #endif // VK_USE_PLATFORM_OHOS diff --git a/loader/generated/vk_loader_extensions.c b/loader/generated/vk_loader_extensions.c index ff5d8ec1..063d7ac0 100644 --- a/loader/generated/vk_loader_extensions.c +++ b/loader/generated/vk_loader_extensions.c @@ -1085,12 +1085,6 @@ VKAPI_ATTR void VKAPI_CALL loader_init_device_extension_dispatch_table(struct lo table->GetDynamicRenderingTilePropertiesQCOM = (PFN_vkGetDynamicRenderingTilePropertiesQCOM)gdpa(dev, "vkGetDynamicRenderingTilePropertiesQCOM"); // ---- VK_OHOS_native_buffer extension commands -#ifdef VK_USE_PLATFORM_OHOS - table->SetNativeFenceFdOpenHarmony = (PFN_vkSetNativeFenceFdOpenHarmony)gdpa(dev, "vkSetNativeFenceFdOpenHarmony"); -#endif // VK_USE_PLATFORM_OHOS -#ifdef VK_USE_PLATFORM_OHOS - table->GetNativeFenceFdOpenHarmony = (PFN_vkGetNativeFenceFdOpenHarmony)gdpa(dev, "vkGetNativeFenceFdOpenHarmony"); -#endif // VK_USE_PLATFORM_OHOS #ifdef VK_USE_PLATFORM_OHOS table->GetSwapchainGrallocUsageOHOS = (PFN_vkGetSwapchainGrallocUsageOHOS)gdpa(dev, "vkGetSwapchainGrallocUsageOHOS"); #endif // VK_USE_PLATFORM_OHOS @@ -2140,12 +2134,6 @@ VKAPI_ATTR void* VKAPI_CALL loader_lookup_device_dispatch_table(const VkLayerDis if (!strcmp(name, "GetDynamicRenderingTilePropertiesQCOM")) return (void *)table->GetDynamicRenderingTilePropertiesQCOM; // ---- VK_OHOS_native_buffer extension commands -#ifdef VK_USE_PLATFORM_OHOS - if (!strcmp(name, "SetNativeFenceFdOpenHarmony")) return (void *)table->SetNativeFenceFdOpenHarmony; -#endif // VK_USE_PLATFORM_OHOS -#ifdef VK_USE_PLATFORM_OHOS - if (!strcmp(name, "GetNativeFenceFdOpenHarmony")) return (void *)table->GetNativeFenceFdOpenHarmony; -#endif // VK_USE_PLATFORM_OHOS #ifdef VK_USE_PLATFORM_OHOS if (!strcmp(name, "GetSwapchainGrallocUsageOHOS")) return (void *)table->GetSwapchainGrallocUsageOHOS; #endif // VK_USE_PLATFORM_OHOS @@ -7449,41 +7437,6 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDynamicRenderingTilePropertiesQCOM( // ---- VK_OHOS_native_buffer extension trampoline/terminators -#ifdef VK_USE_PLATFORM_OHOS -VKAPI_ATTR VkResult VKAPI_CALL SetNativeFenceFdOpenHarmony( - VkDevice device, - int32_t nativeFenceFd, - VkSemaphore semaphore, - VkFence fence) { - const VkLayerDispatchTable *disp = loader_get_dispatch(device); - if (NULL == disp) { - loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0, - "vkSetNativeFenceFdOpenHarmony: Invalid device " - "[VUID-vkSetNativeFenceFdOpenHarmony-device-parameter]"); - abort(); /* Intentionally fail so user can correct issue. */ - } - return disp->SetNativeFenceFdOpenHarmony(device, nativeFenceFd, semaphore, fence); -} - -#endif // VK_USE_PLATFORM_OHOS -#ifdef VK_USE_PLATFORM_OHOS -VKAPI_ATTR VkResult VKAPI_CALL GetNativeFenceFdOpenHarmony( - VkQueue queue, - uint32_t waitSemaphoreCount, - const VkSemaphore* pWaitSemaphores, - VkImage image, - int32_t* pNativeFenceFd) { - const VkLayerDispatchTable *disp = loader_get_dispatch(queue); - if (NULL == disp) { - loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0, - "vkGetNativeFenceFdOpenHarmony: Invalid queue " - "[VUID-vkGetNativeFenceFdOpenHarmony-queue-parameter]"); - abort(); /* Intentionally fail so user can correct issue. */ - } - return disp->GetNativeFenceFdOpenHarmony(queue, waitSemaphoreCount, pWaitSemaphores, image, pNativeFenceFd); -} - -#endif // VK_USE_PLATFORM_OHOS #ifdef VK_USE_PLATFORM_OHOS VKAPI_ATTR VkResult VKAPI_CALL GetSwapchainGrallocUsageOHOS( VkDevice device, @@ -9563,18 +9516,6 @@ bool extension_instance_gpa(struct loader_instance *ptr_instance, const char *na } // ---- VK_OHOS_native_buffer extension commands -#ifdef VK_USE_PLATFORM_OHOS - if (!strcmp("vkSetNativeFenceFdOpenHarmony", name)) { - *addr = (void *)SetNativeFenceFdOpenHarmony; - return true; - } -#endif // VK_USE_PLATFORM_OHOS -#ifdef VK_USE_PLATFORM_OHOS - if (!strcmp("vkGetNativeFenceFdOpenHarmony", name)) { - *addr = (void *)GetNativeFenceFdOpenHarmony; - return true; - } -#endif // VK_USE_PLATFORM_OHOS #ifdef VK_USE_PLATFORM_OHOS if (!strcmp("vkGetSwapchainGrallocUsageOHOS", name)) { *addr = (void *)GetSwapchainGrallocUsageOHOS; -- Gitee