From eda3f66a6fe84d384ef83ca8d92cbeecdadf0c6e Mon Sep 17 00:00:00 2001 From: Tom Hochstein Date: Thu, 11 Sep 2025 13:38:53 -0500 Subject: vulkan-loader: Fix patch for non-GPU i.MX 8 Building for i.MX 8 without GPU results in a patching error: ``` ERROR: vulkan-loader-1.4.321.0-r0 do_patch: QA Issue: Fuzz detected: Applying patch 0001-LF-11869-change-mali-wsi-layer-activating-order.patch patching file loader/loader.c Hunk #1 succeeded at 3034 with fuzz 1 (offset 128 lines). Hunk #2 succeeded at 3101 (offset 135 lines). Hunk #3 succeeded at 3115 (offset 135 lines). The context lines in the patches can be updated with devtool: devtool modify vulkan-loader devtool finish --force-patch-refresh vulkan-loader Don't forget to review changes done by devtool! Patch log indicates that patches do not apply cleanly. [patch-fuzz] ``` The problem is i.MX 8 without GPU uses the latest Vulkan 1.4.321.0 and needs that version of the patch, but the recipe provides the older version of the patch for Vulkan 1.3.275.0.imx. Use version-specific folders to resolve the mismatch. Signed-off-by: Tom Hochstein (cherry picked from commit 8fa7e34f51b88110e54638028a4635f62e44cc0a) --- ...69-change-mali-wsi-layer-activating-order.patch | 52 ++++++++++++++++++++++ ...69-change-mali-wsi-layer-activating-order.patch | 49 ++++++++++++++++++++ ...69-change-mali-wsi-layer-activating-order.patch | 49 -------------------- ...69-change-mali-wsi-layer-activating-order.patch | 52 ---------------------- 4 files changed, 101 insertions(+), 101 deletions(-) create mode 100644 recipes-graphics/vulkan/vulkan-loader-1.3.275.0.imx/0001-LF-11869-change-mali-wsi-layer-activating-order.patch create mode 100644 recipes-graphics/vulkan/vulkan-loader-1.4.321.0/0001-LF-11869-change-mali-wsi-layer-activating-order.patch delete mode 100644 recipes-graphics/vulkan/vulkan-loader/0001-LF-11869-change-mali-wsi-layer-activating-order.patch delete mode 100644 recipes-graphics/vulkan/vulkan-loader/mx8-nxp-bsp/0001-LF-11869-change-mali-wsi-layer-activating-order.patch diff --git a/recipes-graphics/vulkan/vulkan-loader-1.3.275.0.imx/0001-LF-11869-change-mali-wsi-layer-activating-order.patch b/recipes-graphics/vulkan/vulkan-loader-1.3.275.0.imx/0001-LF-11869-change-mali-wsi-layer-activating-order.patch new file mode 100644 index 000000000..da738aabe --- /dev/null +++ b/recipes-graphics/vulkan/vulkan-loader-1.3.275.0.imx/0001-LF-11869-change-mali-wsi-layer-activating-order.patch @@ -0,0 +1,52 @@ +From 3448c245b15928aa5a5a3695d9271fb201eb2e3b Mon Sep 17 00:00:00 2001 +From: Yuan Tian +Date: Sat, 27 Apr 2024 06:06:54 +0800 +Subject: [PATCH] LF-11869 change mali wsi layer activating order + +Upstream-Status: Inappropriate [i.MX specific] + +Signed-off-by: Yuan Tian +--- + loader/loader.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/loader/loader.c b/loader/loader.c +index e646b28b4..55912c178 100644 +--- a/loader/loader.c ++++ b/loader/loader.c +@@ -2906,6 +2906,7 @@ VkResult add_data_files(const struct loader_instance *inst, char *search_path, s + #if !defined(_WIN32) + char temp_path[2048]; + #endif ++ bool has_wsi_layer = false; + + // Now, parse the paths + next_file = search_path; +@@ -2965,6 +2966,10 @@ VkResult add_data_files(const struct loader_instance *inst, char *search_path, s + name = full_path; + + VkResult local_res; ++ if(!strcmp(name,"/etc/vulkan/implicit_layer.d/VkLayer_window_system_integration.json")) { ++ has_wsi_layer = true; ++ continue; ++ } + local_res = add_if_manifest_file(inst, name, out_files); + + // Incomplete means this was not a valid data file. +@@ -2975,6 +2980,13 @@ VkResult add_data_files(const struct loader_instance *inst, char *search_path, s + break; + } + } ++ ++ if(has_wsi_layer) { ++ name = "/etc/vulkan/implicit_layer.d/VkLayer_window_system_integration.json"; ++ vk_result = add_if_manifest_file(inst, name, out_files); ++ has_wsi_layer = false; ++ } ++ + loader_closedir(inst, dir_stream); + if (vk_result != VK_SUCCESS) { + goto out; +-- +2.34.1 + diff --git a/recipes-graphics/vulkan/vulkan-loader-1.4.321.0/0001-LF-11869-change-mali-wsi-layer-activating-order.patch b/recipes-graphics/vulkan/vulkan-loader-1.4.321.0/0001-LF-11869-change-mali-wsi-layer-activating-order.patch new file mode 100644 index 000000000..f54919cd9 --- /dev/null +++ b/recipes-graphics/vulkan/vulkan-loader-1.4.321.0/0001-LF-11869-change-mali-wsi-layer-activating-order.patch @@ -0,0 +1,49 @@ +From 91aff12a127428ff558d57d93b91b0b909321c35 Mon Sep 17 00:00:00 2001 +From: Yuan Tian +Date: Sat, 27 Apr 2024 06:06:54 +0800 +Subject: [PATCH] LF-11869 change mali wsi layer activating order + +Upstream-Status: Inappropriate [i.MX specific] + +Signed-off-by: Yuan Tian +--- + loader/loader.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/loader/loader.c b/loader/loader.c +index 9064cd633..5b00870a4 100644 +--- a/loader/loader.c ++++ b/loader/loader.c +@@ -3034,6 +3034,7 @@ VkResult add_data_files(const struct loader_instance *inst, char *search_path, s + #if !defined(_WIN32) + char temp_path[2048]; + #endif ++ bool has_wsi_layer = false; + + // Now, parse the paths + char *next_file = search_path; +@@ -3100,6 +3101,10 @@ VkResult add_data_files(const struct loader_instance *inst, char *search_path, s + name = full_path; + + VkResult local_res; ++ if(!strcmp(name,"/etc/vulkan/implicit_layer.d/VkLayer_window_system_integration.json")) { ++ has_wsi_layer = true; ++ continue; ++ } + local_res = add_if_manifest_file(inst, name, out_files); + + // Incomplete means this was not a valid data file. +@@ -3110,6 +3115,13 @@ VkResult add_data_files(const struct loader_instance *inst, char *search_path, s + break; + } + } ++ ++ if(has_wsi_layer) { ++ name = "/etc/vulkan/implicit_layer.d/VkLayer_window_system_integration.json"; ++ vk_result = add_if_manifest_file(inst, name, out_files); ++ has_wsi_layer = false; ++ } ++ + loader_closedir(inst, dir_stream); + if (vk_result != VK_SUCCESS) { + goto out; diff --git a/recipes-graphics/vulkan/vulkan-loader/0001-LF-11869-change-mali-wsi-layer-activating-order.patch b/recipes-graphics/vulkan/vulkan-loader/0001-LF-11869-change-mali-wsi-layer-activating-order.patch deleted file mode 100644 index f54919cd9..000000000 --- a/recipes-graphics/vulkan/vulkan-loader/0001-LF-11869-change-mali-wsi-layer-activating-order.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 91aff12a127428ff558d57d93b91b0b909321c35 Mon Sep 17 00:00:00 2001 -From: Yuan Tian -Date: Sat, 27 Apr 2024 06:06:54 +0800 -Subject: [PATCH] LF-11869 change mali wsi layer activating order - -Upstream-Status: Inappropriate [i.MX specific] - -Signed-off-by: Yuan Tian ---- - loader/loader.c | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -diff --git a/loader/loader.c b/loader/loader.c -index 9064cd633..5b00870a4 100644 ---- a/loader/loader.c -+++ b/loader/loader.c -@@ -3034,6 +3034,7 @@ VkResult add_data_files(const struct loader_instance *inst, char *search_path, s - #if !defined(_WIN32) - char temp_path[2048]; - #endif -+ bool has_wsi_layer = false; - - // Now, parse the paths - char *next_file = search_path; -@@ -3100,6 +3101,10 @@ VkResult add_data_files(const struct loader_instance *inst, char *search_path, s - name = full_path; - - VkResult local_res; -+ if(!strcmp(name,"/etc/vulkan/implicit_layer.d/VkLayer_window_system_integration.json")) { -+ has_wsi_layer = true; -+ continue; -+ } - local_res = add_if_manifest_file(inst, name, out_files); - - // Incomplete means this was not a valid data file. -@@ -3110,6 +3115,13 @@ VkResult add_data_files(const struct loader_instance *inst, char *search_path, s - break; - } - } -+ -+ if(has_wsi_layer) { -+ name = "/etc/vulkan/implicit_layer.d/VkLayer_window_system_integration.json"; -+ vk_result = add_if_manifest_file(inst, name, out_files); -+ has_wsi_layer = false; -+ } -+ - loader_closedir(inst, dir_stream); - if (vk_result != VK_SUCCESS) { - goto out; diff --git a/recipes-graphics/vulkan/vulkan-loader/mx8-nxp-bsp/0001-LF-11869-change-mali-wsi-layer-activating-order.patch b/recipes-graphics/vulkan/vulkan-loader/mx8-nxp-bsp/0001-LF-11869-change-mali-wsi-layer-activating-order.patch deleted file mode 100644 index da738aabe..000000000 --- a/recipes-graphics/vulkan/vulkan-loader/mx8-nxp-bsp/0001-LF-11869-change-mali-wsi-layer-activating-order.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 3448c245b15928aa5a5a3695d9271fb201eb2e3b Mon Sep 17 00:00:00 2001 -From: Yuan Tian -Date: Sat, 27 Apr 2024 06:06:54 +0800 -Subject: [PATCH] LF-11869 change mali wsi layer activating order - -Upstream-Status: Inappropriate [i.MX specific] - -Signed-off-by: Yuan Tian ---- - loader/loader.c | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -diff --git a/loader/loader.c b/loader/loader.c -index e646b28b4..55912c178 100644 ---- a/loader/loader.c -+++ b/loader/loader.c -@@ -2906,6 +2906,7 @@ VkResult add_data_files(const struct loader_instance *inst, char *search_path, s - #if !defined(_WIN32) - char temp_path[2048]; - #endif -+ bool has_wsi_layer = false; - - // Now, parse the paths - next_file = search_path; -@@ -2965,6 +2966,10 @@ VkResult add_data_files(const struct loader_instance *inst, char *search_path, s - name = full_path; - - VkResult local_res; -+ if(!strcmp(name,"/etc/vulkan/implicit_layer.d/VkLayer_window_system_integration.json")) { -+ has_wsi_layer = true; -+ continue; -+ } - local_res = add_if_manifest_file(inst, name, out_files); - - // Incomplete means this was not a valid data file. -@@ -2975,6 +2980,13 @@ VkResult add_data_files(const struct loader_instance *inst, char *search_path, s - break; - } - } -+ -+ if(has_wsi_layer) { -+ name = "/etc/vulkan/implicit_layer.d/VkLayer_window_system_integration.json"; -+ vk_result = add_if_manifest_file(inst, name, out_files); -+ has_wsi_layer = false; -+ } -+ - loader_closedir(inst, dir_stream); - if (vk_result != VK_SUCCESS) { - goto out; --- -2.34.1 - -- cgit v1.2.3-54-g00ecf