video_core: Add ETC2 texture compression format support #80

Merged
Zephyron merged 1 commit from feature/etc2-texture-compression-support into main 2025-12-31 04:57:54 +00:00
Owner

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

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>
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>
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Citron/Emulator!80
No description provided.