feat(video_core): add native ASTC texture cache optimization for Adreno 740+

- Add AndroidAstcMode enum to settings_enums.h (Auto/Native/Decompress)
- Add android_astc_mode setting to settings.h
- Add Adreno 7xx+ GPU detection in vulkan_device (IsAdrenoGpu, IsAdreno7xxOrNewer, SupportsNativeAstc)
- Add compressed_size_bytes field to ImageBase for accurate ASTC VRAM tracking
- Add use_compressed_eviction flag to texture cache for Android-optimized eviction
- Increase VRAM budget to 90% for Android devices with native ASTC support
- Add SupportsNativeAstc() to Vulkan and OpenGL texture cache runtimes

This improves performance on high-end Android devices by allowing more ASTC
textures to be cached when using compressed size for eviction calculations.

Co-Authored-By: FDT <fdt@citron-emu.org>
This commit is contained in:
Zephyron
2026-02-03 18:40:18 +10:00
parent 544456b8be
commit 82fd6778ab
10 changed files with 138 additions and 5 deletions

View File

@@ -560,6 +560,16 @@ struct Values {
SwitchableSetting<bool> log_vram_usage{linkage, false, "log_vram_usage",
Category::RendererAdvanced};
// FIXED: Android Adreno 740 native ASTC eviction
// Controls texture cache eviction strategy on Android devices with native ASTC support
// Auto = detect based on GPU, Native = use compressed size, Decompress = use decompressed size
SwitchableSetting<AndroidAstcMode, true> android_astc_mode{linkage,
AndroidAstcMode::Auto,
AndroidAstcMode::Auto,
AndroidAstcMode::Decompress,
"android_astc_mode",
Category::RendererAdvanced};
SwitchableSetting<bool> async_presentation{linkage,
#ifdef ANDROID
true,

View File

@@ -896,6 +896,28 @@ inline u32 EnumMetadata<GCAggressiveness>::Index() {
return 27;
}
// FIXED: Android Adreno 740 native ASTC eviction
// Controls texture cache eviction strategy on Android devices with native ASTC support
enum class AndroidAstcMode : u32 {
Auto = 0, // Auto-detect based on GPU capabilities (recommended)
Native = 1, // Force native ASTC - use compressed size for eviction
Decompress = 2, // Force decompression - use decompressed size (PC-style eviction)
};
template <>
inline std::vector<std::pair<std::string, AndroidAstcMode>>
EnumMetadata<AndroidAstcMode>::Canonicalizations() {
return {
{"Auto", AndroidAstcMode::Auto},
{"Native", AndroidAstcMode::Native},
{"Decompress", AndroidAstcMode::Decompress},
};
}
template <>
inline u32 EnumMetadata<AndroidAstcMode>::Index() {
return 28;
}
template <typename Type>
inline std::string CanonicalizeEnum(Type id) {