On 09/04/2017 08:37 AM, Tapani Pälli wrote:
On 09/02/2017 11:17 AM, Chad Versace wrote:
NOT FOR UPSTREAM.
To get the driver's build-id, anv_physical_device_init_uuids() searches
the current process for an ELF phdr for filename "libvulkan_intel.so".
However, Android requires that the library be named
"vulkan.${board}.so".
I don't think this requirement exists, we are using libvulkan_intel.so
on Android IA and running Vulkan aps. It's up to the HAL implementation
to choose what library it opens.
OK, now reading further I understand why. You are including HAL module
implementation in the driver itself and that is why the requirement.
That is quite a big difference between our implementations, do other
vendors include HAL in the driver?
Fix it with a quick #ifdef hack.
I have a plan to properly fix this by teaching src/util/build_id.c how
to filter ELF phdrs by symbol address instead of by filename.
---
src/intel/vulkan/anv_device.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/intel/vulkan/anv_device.c
b/src/intel/vulkan/anv_device.c
index 095e18ebb95..8cc760c3721 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -207,7 +207,17 @@ anv_physical_device_init_heaps(struct
anv_physical_device *device, int fd)
static VkResult
anv_physical_device_init_uuids(struct anv_physical_device *device)
{
- const struct build_id_note *note =
build_id_find_nhdr("libvulkan_intel.so");
+#ifdef ANDROID /* HACK(chadv) */
+ /* FINISHME(chadv): Stop searching for ELF headers based on
hard-coded
+ * library names. Intead, try comparing this function's address
against the
+ * virtual address ranges listed in the ELF header.
+ */
+ const char *lib_filename = "vulkan.cheets.so";
+#else
+ const char *lib_filename = "libvulkan_intel.so";
+#endif
+
+ const struct build_id_note *note = build_id_find_nhdr(lib_filename);
if (!note) {
return vk_errorf(VK_ERROR_INITIALIZATION_FAILED,
"Failed to find build-id");
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev