sonyxperiadev / bug_tracker

Empty repository that is used as a bugtracker for Open Devices project
52 stars 13 forks source link

Vulkan support possibly broken on Android 10 builds #718

Closed mlehtima closed 2 years ago

mlehtima commented 2 years ago

Platform: Device: Xperia 10 II (pdx201/seine) Kernel version: 4.14 Android version: Android 10 Software binaries version:

While testing vulkan support on Sailfish OS I noticed that on Xperia 10 II built on top on Android 10 aosp base loading of vulkan.qcom.so does not work because it only tries to look for vulkan.pdx201.so, vulkan.XQ-AU52.so, vulkan.sm6125.so and vulkan.default.so. Even though there is a symlink https://github.com/sonyxperiadev/device-sony-common/blob/master/hardware/adreno/Android.mk#L31 to make it see the correct library and the vulkan.sm6125.so symlink is pointing to the correct library the loading fails because since Android 10 there is a check to make sure the file is really located in the same folder (https://android.googlesource.com/platform/hardware/libhardware.git/+/e448a05fecab601c59b89a2f948e1ad18050e40f%5E%21/#F0) which causes symlinks pointing to other folders be ignored. This issue can be worked around by setting Android property ro.hardware.vulkan with value "qcom" so it also looks for the correct file directly. Is someone able to reproduce the issue on aosp builds?

MarijnS95 commented 2 years ago

I'm fairly certain https://github.com/sonyxperiadev/device-sony-common/pull/642 / https://github.com/sonyxperiadev/device-sony-common/pull/642/commits/782f22da260d13af3df92b271668dc1dba490d1e got cherry-picked to replace the links with this property, unless that patch got lost again.

mlehtima commented 2 years ago

Interesting, I will have a look why it was not set in the build I use.

mlehtima commented 2 years ago

I don't see that fix in any of the branches, not even in master branch.

MarijnS95 commented 2 years ago

Maybe the commit was not picked or ultimately force-pushed off, I don't see it anywhere. I'll clean up the message and resubmit it later, the patch is sitting in my own tree and I'm most likely the only SODP user (using Vulkan).

jerpelea commented 2 years ago

@MarijnS95 I use SOD as DD but not vulkan :) I cherry-picked the patch

jerpelea commented 2 years ago

@mlehtima please sync and build

MarijnS95 commented 2 years ago

I cherry-picked the patch

The patch description is ~dirty~ wrong.

mlehtima commented 2 years ago

@jerpelea Could you also cherry-pick the commit to q-mr1 branch which is Android 10 and branch used in this report.

jerpelea commented 2 years ago

@mlehtima please post ls /odm/lib64/hw from your device

jerpelea commented 2 years ago

I cherry-picked the patch

The patch description is ~dirty~ wrong.

correct it and push it to q-mr1

mlehtima commented 2 years ago

@jerpelea android.hardware.bluetooth@1.0-impl-qti.so, android.hardware.gatekeeper@1.0-impl-qti.so, android.hardware.keymaster@3.0-impl-qti.so, vulkan.qcom.so

jerpelea commented 2 years ago

thanks @MarijnS95 will push the patch on q-mr1

MarijnS95 commented 2 years ago

@jerpelea You have the PR in https://github.com/sonyxperiadev/device-sony-common/pull/862 with a clean message - please rebase the rest afterwards.