From e790ec775fcc3a1c586cbdb62341dc4bee8a67d9 Mon Sep 17 00:00:00 2001 From: psucien Date: Fri, 7 Jun 2024 00:11:34 +0200 Subject: [PATCH] texture_cache: detiler: more verbosity in print --- src/video_core/amdgpu/resource.h | 16 ++++++++++++++++ src/video_core/texture_cache/tile_manager.cpp | 4 ++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/video_core/amdgpu/resource.h b/src/video_core/amdgpu/resource.h index e9b7a553..58e54118 100644 --- a/src/video_core/amdgpu/resource.h +++ b/src/video_core/amdgpu/resource.h @@ -86,11 +86,27 @@ constexpr std::string_view NameOf(ImageType type) { } enum class TilingMode : u32 { + Depth_MicroTiled = 0x5u, Display_Linear = 0x8u, Display_MacroTiled = 0xAu, Texture_MicroTiled = 0xDu, }; +constexpr std::string_view NameOf(TilingMode type) { + switch (type) { + case TilingMode::Depth_MicroTiled: + return "Depth_MicroTiled"; + case TilingMode::Display_Linear: + return "Display_Linear"; + case TilingMode::Display_MacroTiled: + return "Display_MacroTiled"; + case TilingMode::Texture_MicroTiled: + return "Texture_MicroTiled"; + default: + return "Unknown"; + } +} + struct Image { union { BitField<0, 38, u64> base_address; diff --git a/src/video_core/texture_cache/tile_manager.cpp b/src/video_core/texture_cache/tile_manager.cpp index 54cbc5da..b588f894 100644 --- a/src/video_core/texture_cache/tile_manager.cpp +++ b/src/video_core/texture_cache/tile_manager.cpp @@ -299,8 +299,8 @@ bool TileManager::TryDetile(Image& image) { const auto* detiler = GetDetiler(image); if (!detiler) { - LOG_ERROR(Render_Vulkan, "Unsupported tiled image: {} {}", - vk::to_string(image.info.pixel_format), static_cast(image.info.tiling_mode)); + LOG_ERROR(Render_Vulkan, "Unsupported tiled image: {} ({})", + vk::to_string(image.info.pixel_format), NameOf(image.info.tiling_mode)); return false; }