maplibre / maplibre-native

MapLibre Native - Interactive vector tile maps for iOS, Android and other platforms.
https://maplibre.org
BSD 2-Clause "Simplified" License
1.07k stars 316 forks source link

Vulkan Early Access Testing (Android) #2787

Open louwers opened 2 months ago

louwers commented 2 months ago

We are looking for users interested in the upcoming Vulkan support for Android.

We will be releasing an 'early access' MapLibre Android version (a.k.a. pre-release) that will just support Vulkan in September 2024. This will give people an opportunity to test the new Vulkan backend on Android. Joining this effort will help the rendering team to ensure there are no regressions as well as with optimizing performance.

Edit: the first pre-release has been released!

Reporting Issues

When reporting an issue (here or in a separate issue), the following are required:

When available:

westnordost commented 2 months ago

I could create some alpha releases alongside the stable ones for StreetComplete (once the MapLibre migration has been stabilized in the first place) for people to try out.

Beyond detecting simple rendering issues, this only makes sense if there's a straightforward way for these users to make useful reports for crashes in native / Vulkan code. I understand that the logged crash trace is not that useful for you and digging out the tombstone seems to require root privileges on the phone and/or usage of developer tools (adb), plus some special build configuration (we haven't fully figured out yet) beforehand.

Also, how would you sell it to users so they want to be the first people to try it out? Is there anything to gain from that?

louwers commented 2 months ago

I could create some alpha releases alongside the stable ones for StreetComplete (once the MapLibre migration has been stabilized in the first place) for people to try out.

That would be amazing!

Also, how would you sell it to users so they want to be the first people to try it out? Is there anything to gain from that?

Being an early tester and testing it with your style and app means that any bugs or performance regressions you report will have the attention of the rendering team, and will probably be fixed by the time we make an official release.

mtpdog commented 2 months ago

I can take part too to test It in complex environment with many raster, vector and extruded layers. Btw, the latest 2 versions (both 11.1.0 and 11.2.0) have a regression with vector layers rendering. There are many distortions in label rendering. 11.0.2-pre0 is the latest stable version for now.

louwers commented 2 months ago

@mtpdog Please create a separate issue for the regressions you are seeing.

mtpdog commented 2 months ago

@mtpdog Please create a separate issue for the regressions you are seeing.

Sure. It is already described here: https://github.com/maplibre/maplibre-native/issues/2788

louwers commented 2 months ago

Labels are jittery with this style.

https://github.com/user-attachments/assets/8585965f-ead9-4e69-ad4e-9eabc948260c

Style - https://tiles.versatiles.org/assets/styles/colorful.json Lat / Long / Zoom - Try London Android version - 11 MapLibre Native version - android-v11.3.0-vulkan-pre0 Device - Samsung S10

mtpdog commented 1 month ago

According to my tests, this version (android-v11.3.0-vulkan-pre0) works mostly fine except for:

On the positive side it seems that this issue is fixed: https://github.com/maplibre/maplibre-native/issues/2788

louwers commented 1 month ago

@mtpdog I think the issue you are seeing may be fixed by #2842

westnordost commented 1 month ago

I tested android-v11.3.0-vulkan-pre0 with StreetComplete. I didn't find any issues. On the contrary, the following issues are not reproducible anymore with that version:

I didn't compare performance, but I didn't feel any difference.

louwers commented 1 month ago

I ran some benchmarks on AWS Device Farm with various devices. The results can be found here and in the diagram below.

image

We are a bit suspicious that the Pixel 7 Pro is comparable to the Pixel 4a in terms of performance. The results look promising though.

louwers commented 3 weeks ago

We did another extensive benchmark run comparing OpenGL (here indicated as Drawable) and Vulkan!

Note the y-axis on the plot below here is a version with equal y-axis range for all devices, but since there is quite a big difference in FPS between devices the differences can be hard to see on some devices.

plot_y_axis_different (1)

Raw data: https://docs.google.com/spreadsheets/d/1roKpT7BrLFErZE8r_-hd4uMk74znVbB-7Eo3JvPj8zE/edit?usp=sharing

louwers commented 3 days ago

We did a new run last week which moved slower from location to location. This is too prevent the situation where no data is loaded and the map is not rendering anything (resulting in very high but meaningless FPS in some runs). I think we can improve the benchmark by running it completely offline and starting the benchmark with a pre-loaded cache.

I have made a PR with some scripts to automate running the benchmarks, as well as for collecting and plotting the results. https://github.com/maplibre/maplibre-native/pull/2991

The results of the last run:

benchmark.csv

Plot:

image