Module: Mesa
Branch: main
Commit: a19a37e8d7d494919c8182320af2064808c3706f
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=a19a37e8d7d494919c8182320af2064808c3706f

Author: Eric Engestrom <[email protected]>
Date:   Wed Mar  1 17:15:26 2023 +0000

vk: be stricter about symbols check between android and other platforms

Don't allow HMI on non-Android, don't allow non-HMI on Android, and
don't allow missing HMI on Android.

Signed-off-by: Eric Engestrom <[email protected]>
Reviewed-by: Faith Ekstrand <[email protected]>
Reviewed-by: Yiwei Zhang <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21631>

---

 src/vulkan/meson.build                    | 3 ++-
 src/vulkan/vulkan-icd-android-symbols.txt | 4 ++++
 src/vulkan/vulkan-icd-symbols.txt         | 5 -----
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/vulkan/meson.build b/src/vulkan/meson.build
index 799f15e19ef..eaa44547273 100644
--- a/src/vulkan/meson.build
+++ b/src/vulkan/meson.build
@@ -19,17 +19,18 @@
 # SOFTWARE.
 
 vk_api_xml = files('registry/vk.xml')
-vulkan_icd_symbols = files('vulkan-icd-symbols.txt')
 
 vulkan_icd_link_args = []
 vulkan_icd_link_depends = []
 
 if with_platform_android
+  vulkan_icd_symbols = files('vulkan-icd-android-symbols.txt')
   if with_ld_version_script
     vulkan_icd_link_args += ['-Wl,--version-script', 
join_paths(meson.current_source_dir(), 'vulkan-android.sym')]
     vulkan_icd_link_depends += files('vulkan-android.sym')
   endif
 else
+  vulkan_icd_symbols = files('vulkan-icd-symbols.txt')
   if with_ld_version_script
     vulkan_icd_link_args += ['-Wl,--version-script', 
join_paths(meson.current_source_dir(), 'vulkan.sym')]
     vulkan_icd_link_depends += files('vulkan.sym')
diff --git a/src/vulkan/vulkan-icd-android-symbols.txt 
b/src/vulkan/vulkan-icd-android-symbols.txt
new file mode 100644
index 00000000000..7e547aa5f8a
--- /dev/null
+++ b/src/vulkan/vulkan-icd-android-symbols.txt
@@ -0,0 +1,4 @@
+# Android looks for this global in HAL modules. In the source it occurs
+# as HAL_MODULE_INFO_SYM (which is just a #define for HMI) and it's an
+# instance of struct hwvulkan_module_t.
+HMI
diff --git a/src/vulkan/vulkan-icd-symbols.txt 
b/src/vulkan/vulkan-icd-symbols.txt
index b463ca83ae6..feca419c0ca 100644
--- a/src/vulkan/vulkan-icd-symbols.txt
+++ b/src/vulkan/vulkan-icd-symbols.txt
@@ -12,8 +12,3 @@ vk_icdNegotiateLoaderICDInterfaceVersion
 # Version 4 - Add unknown physical device extension querying via
 #             vk_icdGetPhysicalDeviceProcAddr.
 (optional) vk_icdGetPhysicalDeviceProcAddr
-
-# Andoid looks for this global in HAL modules. In the source it occurs
-# as HAL_MODULE_INFO_SYM (which is just a #define for HMI) and it's an
-# instance of struct hwvulkan_module_t.
-(optional) HMI

Reply via email to