Platform: Android
Mapbox SDK version: 5.1.0


It seems to be due to the tilt maxed out at 60 degrees.
cc/ @cammace
For reference, this is wider spread than just a Pixel XL. I see this every day on my Nexus 5x running Android 7.
cc @kkaefer
Can reproduce on my OnePlus 3T, Android 7.1.1



@ericrwolfe, @daniel-j-h Can you please report the exact device models? You can find it by going to Settings app, "About phone" (or similar), typically at the bottom. Look for something like "Model number". Sometimes it's also hidden in submenus like "Regulatory information".
Knowing the exact model (not serial) is important because some phones that are marketed under the same name use different chips internally, e.g. there are ~10 different versions of the Samsung Galaxy S3 that use vastly different chips by different manufacturers.
Model Number
ONEPLUS A3003
There's no model number in the regular settings for the Nexus 5X, it just says:
Model: Nexus 5x
Android version: 7.1.2
However, tapping on regulatory labels it lists:
Model: LG-H790
Seeing this on @danesfeder's Nexus 6P (Android O).
@cammace and @danesfeder say that this is a problem on every Android device they've used so far.
As a workaround in the drop-in navigation SDK UI, we've tried reducing the pitch to 50° and 45°, and while the issue becomes less frequent at a lower pitch, it still occurs in regular driving.
I've added a new branch https://github.com/mapbox/mapbox-gl-native/tree/android-v5.1.0-route-demo which consist of android-v5.1.0 tag + my cherry-picked commit ce8d4651fd0243486f886123b32a1fb91abc025f which adds a simple demo route to the GLFW app. It turns out that the demo route (with tilt set to 60 degrees) doesn't show the rendering artifacts seen above.
This leads me to believe it is either an issue on the Android-to-GL-Native code or a device-specific issue.
This issue is the same as #962 and #4442: We're exhausting the 8 bit stencil buffer when assigning clipping IDs. We don't normally run into this issue, but using the navigation SDK exacerbates this bug in the following way:
When following the strategies outlined above, it's possible to reproduce this bug on desktop as well:

There are a few mitigation strategies that we could use:
Most helpful comment
This issue is the same as #962 and #4442: We're exhausting the 8 bit stencil buffer when assigning clipping IDs. We don't normally run into this issue, but using the navigation SDK exacerbates this bug in the following way:
When following the strategies outlined above, it's possible to reproduce this bug on desktop as well:
There are a few mitigation strategies that we could use:
We could change this so that we only generate annotation tiles from z0–16. Using z16 is sufficient precision for annotations. However, there's no guarantee that the other tile layers are also going to z16. With a tile source that only goes to z15 for example, we'd still see the same effect. This means limiting the annotation tile source to z16 is only a temporary workaround. Ticketed in https://github.com/mapbox/mapbox-gl-native/issues/10197.