From 8af82558bb25bb2ab46f3d750d3da55b82512e41 Mon Sep 17 00:00:00 2001 From: rdenno Date: Mon, 2 Nov 2026 06:51:36 -0500 Subject: texture_cache: look up X8Z24 with UNORM, UINT, UNORM, UNORM components X8Z24 was only known with UINT in the last three components. Mario Tennis Fever samples its depth buffer as X8Z24 with components UNORM, UINT, UNORM, UNORM (as S8Z24 already is in the table), which hit the "texture format=42" fallback to A8B8G8R8. The depth image was then copied into a colour image of the wrong format every frame (with "Unimplemented" layer-count asserts) and read as colour, and distant scenery around the court (the arch and the castle stadium) wasn't drawn. Map it to X8_D24_UNORM like the other X8Z24 entry. Assisted-by: Claude Opus 5.5 (diagnosis, fix and testing) --- src/video_core/texture_cache/format_lookup_table.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/video_core/texture_cache') diff --git a/src/video_core/texture_cache/format_lookup_table.cpp b/src/video_core/texture_cache/format_lookup_table.cpp index 20bb96aae3..18be2dcbf3 100644 --- a/src/video_core/texture_cache/format_lookup_table.cpp +++ b/src/video_core/texture_cache/format_lookup_table.cpp @@ -150,6 +150,7 @@ PixelFormat PixelFormatFromTextureInfo(TextureFormat format, ComponentType red, case Hash(TextureFormat::X8Z24, UNORM): return PixelFormat::X8_D24_UNORM; case Hash(TextureFormat::X8Z24, UNORM, UINT, UINT, UINT, LINEAR): + case Hash(TextureFormat::X8Z24, UNORM, UINT, UNORM, UNORM, LINEAR): return PixelFormat::X8_D24_UNORM; case Hash(TextureFormat::Z24S8, UINT, UNORM, UNORM, UNORM, LINEAR): return PixelFormat::S8_UINT_D24_UNORM; -- cgit v1.2.3