Skip to content
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

[DRAFT] Add external texture support (Vulkan) #97163

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dsnopek
Copy link
Contributor

@dsnopek dsnopek commented Sep 18, 2024

This builds on top of PR #96982 to add external texture support for Vulkan.

This is an unfinished work-in-progress.

I ended up splitting this off into its own PR to finish later after I discovered that this will only work with Android API level 26 or higher. Presently, we have an API minimum of 21, which prevents this code from compiling.

So, I'll save this until after we increase the API minimum to 21 or higher. (Another option is including the code, but then requiring users to build with scons ndk_platform=android-26 in order to support this feature, but it wouldn't be included in official builds.)

@m4gr3d
Copy link
Contributor

m4gr3d commented Sep 19, 2024

According to https://composables.com/android-distribution-chart, we go from 99.7% to 95.4% coverage if we raise the min API from 21 to 26.

@akien-mga
Copy link
Member

akien-mga commented Sep 20, 2024

(Another option is including the code, but then requiring users to build with scons ndk_platform=android-26 in order to support this feature, but it wouldn't be included in official builds.)

I think we can do that, it might take a while for us to bump min version to android-26 I fear, given the current metrics. Phasing out old devices is taking a very long time, and a number of users would be upset if we cut off 5% of the addressable market.

We could alternatively consider bumping the current ndk_platform, but still keep support for android-21 when compiling custom export templates for users who want it.

A third option, but which requires more discussion and work, could be to provide separate export templates for OpenGL/Compatibility (with Vulkan/RD code removed, and supporting android-21) and for Vulkan (with min API on android-26). That would help reduce the binary size for users who want to target the lower end of the market, and probably help cull a lot of devices with completely broken Vulkan drivers for the Vulkan build.

@dsnopek
Copy link
Contributor Author

dsnopek commented Sep 20, 2024

I think we can do that, it might take a while for us to bump min version to android-26 I fear, given the current metrics. Phasing out old devices is taking a very long time, and a number of users would be upset if we cut off 5% of the addressable market.

That makes sense!

We discussed this at the XR team meeting last night (as the primary use case for this is ARCore support), and one solution we discussed was having the 'godot_arcore' project distribute its own Android export templates that were compiled with scons ndk_platform=android-26, since folks will already need to download the ARCore GDExtension from there.

I personally like this solution: it keeps Godot's base Android support widely compatible (which is what is needed by most people), while having all the tools for doing ARCore (which is a much less common use-case) easily available for those who need them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants