[D3D12] Remove 6_5_5 textures temporarily because they need custom untililng

This commit is contained in:
Triang3l 2018-09-06 23:14:26 +03:00
parent e2d60a4708
commit 4212d2296a
1 changed files with 2 additions and 8 deletions

View File

@ -49,7 +49,7 @@ const TextureCache::HostFormat TextureCache::host_formats_[64] = {
// k_5_6_5
{DXGI_FORMAT_B5G6R5_UNORM, LoadMode::k16bpb, TileMode::kUnknown},
// k_6_5_5
{DXGI_FORMAT_B5G6R5_UNORM, LoadMode::k16bpb, TileMode::kUnknown},
{DXGI_FORMAT_UNKNOWN, LoadMode::kUnknown, TileMode::kUnknown},
// k_8_8_8_8
{DXGI_FORMAT_R8G8B8A8_UNORM, LoadMode::k32bpb, TileMode::k32bpp},
// k_2_10_10_10
@ -727,16 +727,10 @@ void TextureCache::TextureKeyFromFetchConstant(
swizzle &= ~(swizzle_constant >> 1);
// Remap the swizzle according to the texture format.
if (format == TextureFormat::k_1_5_5_5 || format == TextureFormat::k_5_6_5 ||
format == TextureFormat::k_6_5_5 || format == TextureFormat::k_4_4_4_4) {
format == TextureFormat::k_4_4_4_4) {
// Swap red and blue.
swizzle ^= ((~swizzle & (1 | (1 << 3) | (1 << 6) | (1 << 9))) << 1) &
(swizzle_not_constant >> 1);
if (format == TextureFormat::k_6_5_5) {
// R6G5B5 is emulated with B5G6R5, but it's already swizzled to R5G6B5.
// Swap red and green.
swizzle ^= ((~swizzle & (2 | (2 << 3) | (2 << 6) | (2 << 9))) >> 1) &
(swizzle_not_constant >> 2);
}
} else if (format == TextureFormat::k_DXT3A) {
// DXT3A is emulated as DXT3 with zero color, but the alpha should be
// replicated into all channels.