mirror of
https://git.eden-emu.dev/archive/citron
synced 2026-03-24 10:29:35 -04:00
Adds comprehensive support for ETC2 compressed texture formats (ETC2_RGB, ETC2_RGBA, ETC2_RGB_PTA) in both UNORM and SRGB variants. This addresses rendering issues in games like Hogwarts Legacy that use these formats. Changes: - Add ETC2 texture format enums (TextureFormat::ETC2_RGB_SRGB, ETC2_RGBA_SRGB) and component types (SNORM_FORCE_FP16, UNORM_FORCE_FP16) - Implement format lookup mappings for all ETC2 variants in format_lookup_table.cpp - Add PixelFormat enum values and block size tables for ETC2 formats - Integrate ETC2 support into Vulkan backend with proper VkFormat mappings - Add IsOptimalEtc2Supported() device capability check - Update texture cache to handle ETC2 format conversion when needed - Add ETC2 format cases to PixelFormat formatter for logging - Improve shader environment texture handle validation with graceful fallback for invalid handles Fixes assertion failures for texture formats 90 and 99, enabling proper rendering of ETC2 compressed textures using native Vulkan support. Signed-off-by: Zephyron <zephyron@citron-emu.org>