forked from ShuriZma/suyu
1
0
Fork 0

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.
This commit is contained in:
Lioncash 2020-04-15 23:49:14 -04:00
parent e33196d4e7
commit 636c8ab85b
1 changed files with 3 additions and 3 deletions

View File

@ -196,9 +196,9 @@ std::size_t FormatLookupTable::CalculateIndex(TextureFormat format, bool is_srgb
ComponentType alpha_component) noexcept { ComponentType alpha_component) noexcept {
const auto format_index = static_cast<std::size_t>(format); const auto format_index = static_cast<std::size_t>(format);
const auto red_index = static_cast<std::size_t>(red_component); const auto red_index = static_cast<std::size_t>(red_component);
const auto green_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>(red_component); const auto blue_index = static_cast<std::size_t>(blue_component);
const auto alpha_index = static_cast<std::size_t>(red_component); const auto alpha_index = static_cast<std::size_t>(alpha_component);
const std::size_t srgb_index = is_srgb ? 1 : 0; const std::size_t srgb_index = is_srgb ? 1 : 0;
return format_index * PerFormat + return format_index * PerFormat +