From 40fd7d5558831fff073ddf291a5e8d20fe69b674 Mon Sep 17 00:00:00 2001 From: CamilleLaVey Date: Wed, 26 Nov 2025 10:28:49 -0400 Subject: [PATCH] Revert "[maxwell] Logging for HDR wrong convertions into depth formats" This reverts commit 66c26e39fe1e3122d2a891de04af4ea0089e29c6. --- .../texture_cache/format_lookup_table.cpp | 13 ++--- src/video_core/texture_cache/image_info.cpp | 53 ------------------- 2 files changed, 3 insertions(+), 63 deletions(-) diff --git a/src/video_core/texture_cache/format_lookup_table.cpp b/src/video_core/texture_cache/format_lookup_table.cpp index 86d8a5a98a..8c774f512c 100644 --- a/src/video_core/texture_cache/format_lookup_table.cpp +++ b/src/video_core/texture_cache/format_lookup_table.cpp @@ -1,6 +1,3 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project -// SPDX-License-Identifier: GPL-3.0-or-later - // SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -248,13 +245,9 @@ PixelFormat PixelFormatFromTextureInfo(TextureFormat format, ComponentType red, case Hash(TextureFormat::ASTC_2D_6X5, UNORM, SRGB): return PixelFormat::ASTC_2D_6X5_SRGB; } - const u32 hash_value = Hash(format, red, green, blue, alpha, is_srgb); - LOG_ERROR(Render_Vulkan, - "Unmapped texture format: format=0x{:02X} ({}) srgb={} " - "components={{r={} g={} b={} a={}}} hash=0x{:08X}", - static_cast(format), static_cast(format), is_srgb, - static_cast(red), static_cast(green), - static_cast(blue), static_cast(alpha), hash_value); + UNIMPLEMENTED_MSG("texture format={} srgb={} components={{{} {} {} {}}}", + static_cast(format), is_srgb, static_cast(red), + static_cast(green), static_cast(blue), static_cast(alpha)); return PixelFormat::A8B8G8R8_UNORM; } diff --git a/src/video_core/texture_cache/image_info.cpp b/src/video_core/texture_cache/image_info.cpp index e74d7aaf7d..a5bd4aa31b 100644 --- a/src/video_core/texture_cache/image_info.cpp +++ b/src/video_core/texture_cache/image_info.cpp @@ -31,62 +31,9 @@ constexpr u32 DownscaleHeightThreshold = 512; ImageInfo::ImageInfo(const TICEntry& config) noexcept { forced_flushed = config.IsPitchLinear() && !Settings::values.use_reactive_flushing.GetValue(); dma_downloaded = forced_flushed; - - // Validate component types match format expectations - const auto tex_format = config.format; - const bool is_depth_stencil = - tex_format == Tegra::Texture::TextureFormat::Z24S8 || - tex_format == Tegra::Texture::TextureFormat::S8Z24 || - tex_format == Tegra::Texture::TextureFormat::Z32 || - tex_format == Tegra::Texture::TextureFormat::Z16 || - tex_format == Tegra::Texture::TextureFormat::X8Z24 || - tex_format == Tegra::Texture::TextureFormat::Z32_X24S8; - - const bool is_hdr_float = - tex_format == Tegra::Texture::TextureFormat::B10G11R11 || - tex_format == Tegra::Texture::TextureFormat::E5B9G9R9; - - // Sanity check: HDR formats should use FLOAT components, depth should use UNORM/UINT - if (is_hdr_float && config.r_type != Tegra::Texture::ComponentType::FLOAT) { - LOG_WARNING(Render_Vulkan, - "HDR format 0x{:02X} has non-FLOAT components (r={} g={} b={} a={}), " - "possible register corruption", - static_cast(tex_format.Value()), - static_cast(config.r_type.Value()), static_cast(config.g_type.Value()), - static_cast(config.b_type.Value()), static_cast(config.a_type.Value())); - } - format = PixelFormatFromTextureInfo(config.format, config.r_type, config.g_type, config.b_type, config.a_type, config.srgb_conversion); - // Validate final format makes sense - const bool detected_as_depth = - format == PixelFormat::D32_FLOAT || format == PixelFormat::D16_UNORM || - format == PixelFormat::X8_D24_UNORM || format == PixelFormat::S8_UINT || - format == PixelFormat::S8_UINT_D24_UNORM || format == PixelFormat::D24_UNORM_S8_UINT || - format == PixelFormat::D32_FLOAT_S8_UINT; - - if (is_hdr_float && detected_as_depth) { - LOG_ERROR(Render_Vulkan, - "Format mismatch: HDR format 0x{:02X} mapped to depth/stencil {}. " - "TIC components: r={} g={} b={} a={} srgb={}", - static_cast(tex_format.Value()), format, - static_cast(config.r_type.Value()), static_cast(config.g_type.Value()), - static_cast(config.b_type.Value()), static_cast(config.a_type.Value()), - config.srgb_conversion); - } - - if (is_depth_stencil && !detected_as_depth && - format != PixelFormat::A8B8G8R8_UNORM) { // Allow fallback - LOG_ERROR(Render_Vulkan, - "Format mismatch: Depth/stencil format 0x{:02X} mapped to color {}. " - "TIC components: r={} g={} b={} a={} srgb={}", - static_cast(tex_format.Value()), format, - static_cast(config.r_type.Value()), static_cast(config.g_type.Value()), - static_cast(config.b_type.Value()), static_cast(config.a_type.Value()), - config.srgb_conversion); - } - num_samples = NumSamples(config.msaa_mode); resources.levels = config.max_mip_level + 1; if (config.IsPitchLinear()) {