aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/texture_cache
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-04-15 23:49:14 -0400
committerLioncash <mathew1800@gmail.com>2020-04-15 23:50:46 -0400
commit61329ad0bee4396816d53cc8045394df3aaf0d98 (patch)
treee5ebc1a3d7a3476548ec2c037efec066508d3e7d /src/video_core/texture_cache
parentd06795c08ac9e5403f882af4737bfb6648998376 (diff)
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.
Diffstat (limited to 'src/video_core/texture_cache')
-rw-r--r--src/video_core/texture_cache/format_lookup_table.cpp6
1 files 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<std::size_t>(format);
const auto red_index = static_cast<std::size_t>(red_component);
- const auto green_index = static_cast<std::size_t>(red_component);
- const auto blue_index = static_cast<std::size_t>(red_component);
- const auto alpha_index = static_cast<std::size_t>(red_component);
+ const auto green_index = static_cast<std::size_t>(green_component);
+ const auto blue_index = static_cast<std::size_t>(blue_component);
+ const auto alpha_index = static_cast<std::size_t>(alpha_component);
const std::size_t srgb_index = is_srgb ? 1 : 0;
return format_index * PerFormat +