From 636c8ab85b55b8ce510ef5a251fe66142d667e46 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 15 Apr 2020 23:49:14 -0400 Subject: [PATCH] texture_cache/format_lookup_table: Fix incorrect green, blue, and alpha indices Previously these were all using the red component to derive the indices, which is definitely not intentional. --- src/video_core/texture_cache/format_lookup_table.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/video_core/texture_cache/format_lookup_table.cpp b/src/video_core/texture_cache/format_lookup_table.cpp index e151c26c48..25d2ee2e85 100644 --- a/src/video_core/texture_cache/format_lookup_table.cpp +++ b/src/video_core/texture_cache/format_lookup_table.cpp @@ -196,9 +196,9 @@ std::size_t FormatLookupTable::CalculateIndex(TextureFormat format, bool is_srgb ComponentType alpha_component) noexcept { const auto format_index = static_cast(format); const auto red_index = static_cast(red_component); - const auto green_index = static_cast(red_component); - const auto blue_index = static_cast(red_component); - const auto alpha_index = static_cast(red_component); + const auto green_index = static_cast(green_component); + const auto blue_index = static_cast(blue_component); + const auto alpha_index = static_cast(alpha_component); const std::size_t srgb_index = is_srgb ? 1 : 0; return format_index * PerFormat +