Closed ryancheung closed 2 years ago
Yeah. ASTC should be the mobile standard going forward. ASTC support should be added too.
According to the doc in Unity. ETC2 should have better device compability than ASTC. Apple devices support ETC/ETC2 formats starting with A7 chip (2013). For ASTC, A8 chip (2014) or above is required. Android devices support ETC2 with GLES 3.0+ GPU and ASTC with OpenGL 3.1+(or parts of 3.0) GPU.
At least for our purposes we only support A8 and above anyway, so that'd be no problem. Android by itself I'd be hesitant to add anything for because in general we stay as far away from it as possible.
If we had to factor it in I would base it on the Vulkan landscape rather than GLES - we could hypothetically check a database for OES_texture_compression_astc but odds are we'd get more realistic data from checking gpuinfo.org's Vulkan Android database for ASTC support. My guess is devices made within the last ~5 years will have it, and for Android that's a huge data set.
Not sure why I've not looked into this before... just checked Vulkan Android and ASTC is almost universally supported:
https://vulkan.gpuinfo.org/listoptimaltilingformats.php?platform=android
My guess is the remaining % is non-mobile.
Like Godot 4.0 do with Vulkan only in the beginning. So that means it is possbile now for us to add Android support with Vulkan in FNA?
Android support is off the table - always has been, always will be. But it's likely the support matrix for Android Vulkan will be similar to what comes after it, i.e. Fuchsia or alternatives like Plasma Mobile and Phosh.
As far as patches go this is very well-written! A new
FNA3D_SupportsETC2
would be needed to query support but other than that this makes sense to me.I'll defer to someone with more mobile experience for the actual content and functionality, since in my head I always thought ASTC was supposed to be the mobile standard going forward... but I have limited experience here.
We have a number of other texture extensions pending, so what I'll most likely do because this adds more than the other is try to merge them in the following order: