New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement loading custom drivers on Android #11867
Conversation
d7fca7c
to
623fd0a
Compare
db744b4
to
04212a2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Outside of my one minor nit. Graphics wise LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adrenotools continues on its plan for world domination
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should be most of my comments. Please let me know if anything looks wrong to you.
| @@ -122,7 +124,7 @@ android { | |||
| abiFilters "arm64-v8a", "x86_64" //, "armeabi-v7a", "x86" | |||
|
|
|||
| // Remove the line below if you want to build the C++ unit tests | |||
| targets "main" | |||
| //targets "main", "hook_impl", "main_hook", "gsl_alloc_hook", "file_redirect_hook" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this commented out? Is the comment above this true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh right. I forgot about this.
The problem is that some of those only build on ARM64 and they are necessary for the ARM64 build.
Do you perhaps know how to handle this in Gradle?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't know how to check for that, gradle is a mess. And are these necessary for the change? We could just hold off on it for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And are these necessary for the change?
Yes, they are part of adrenotools and necessary to load the actual drivers. The downside of removing the targets line is that it builds the unit tests which isn't too bad IMO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Building the unit tests increases the time it takes to make an incremental build by over a minute on my machine, due to the need to re-link all the unit test executables. But if we have no other option, I guess we have to do it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to fix it but I really don't know how.
...Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/StringSetting.kt
Outdated
Show resolved
Hide resolved
...Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsActivity.kt
Outdated
Show resolved
Hide resolved
...Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsActivity.kt
Outdated
Show resolved
Hide resolved
...pp/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsActivityPresenter.kt
Outdated
Show resolved
Hide resolved
Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/ZipUtils.kt
Outdated
Show resolved
Hide resolved
Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/GpuDriverHelper.kt
Outdated
Show resolved
Hide resolved
Source/Android/app/src/main/res/layout/activity_gpu_drivers.xml
Outdated
Show resolved
Hide resolved
Source/Android/app/src/main/res/layout/list_item_gpu_driver.xml
Outdated
Show resolved
Hide resolved
83e55a6
to
35aaf98
Compare
|
This is actually interesting on my Pixel 3a. Vulkan in general is just improved versus my default driver, but vs OpenGL it varies. I know that doesn't matter, but games like Super Mario Galaxy are just much faster, but some simpler games are still slower than OpenGL. The biggest benefit is just having a driver I kind of trust versus my default driver. |
|
@JMC47 OpenGL is not impacted at all. It only replaces the Vulkan driver. |
051659e
to
987a016
Compare
...Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/StringSetting.kt
Outdated
Show resolved
Hide resolved
Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/DirectoryInitialization.java
Outdated
Show resolved
Hide resolved
Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/DirectoryInitialization.java
Outdated
Show resolved
Hide resolved
Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/DriverPackageMetadata.kt
Outdated
Show resolved
Hide resolved
325915d
to
657e1df
Compare
7791474
to
a15e314
Compare
|
Go home FIFOCI, you're drunk. |
|
Tested and working, and has reviews. FifoCI is unrelated. |
088518b
to
61fcb58
Compare
This comment was marked as abuse.
This comment was marked as abuse.
|
@AlexS2412 There's nothing preventing this from working on Mali GPUs aside from the fact that nobody has written an open source Vulkan driver for those GPUs. Besides that, Mali GPUs are simply missing a lot of hardware and driver features that emulators need. |




I had experimented with this months ago but wasn't confident with shipping it.
Now that Yuzu has successfully demonstrated that shipping libadrenotools on the Play Store is fine, I decided to finish it.
The necessary changes to shared C++ code are thankfully fairly unintrusive.
The UI is heavily inspired by Yuzus implementation rather than the one in Skyline, simply because it's simpler and less work.

Big thanks to @bylaws.