crashinvaders / gdx-basis-universal

KTX2/Basis Universal supercompressed GPU textures for libGDX game framework.
17 stars 2 forks source link

UASTC to ASTC_4x4 transcoded textures appear to be black on old Android emulators #3

Open metaphore opened 6 months ago

metaphore commented 6 months ago

This only affects ASTC-transcoded textures. I tested and reproduced it on Android API 22 arm64 emulator and it can easily be the problem of the emulator itself.

The emulator reports support for all the ASTC formats though. Needs further investigation.

Supported OpenGL compress texture formats: [8d64, 9274, 9271, 9272, 9273, 9274, 9275, 9276, 9277, 9278, 9279, 9270, 93b0, 93b1, 93b2, 93b3, 93b4, 93b5, 93b6, 93b7, 93b8, 93b9, 93ba, 93bb, 93bc, 93bd, 93d0, 93d1, 93d2, 93d3, 93d4, 93d5, 93d6, 93d7, 93d8, 93d9, 93da, 93db, 93dc, 93dd]

image

UPD1: The issue was reproduced on all emulators up to API 27. On API 28-based emulators and up, ASTC textures work as intended. Here's the log error:

device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glCompressedTexImage2D:2583 GL error 0x500

UPD2: The test on an API 24 device shows no sign of the problem.

UPD3: I tested it on Nexus 5 with Android 6 (API 23) and there are no issues.