From 8784daf6bc49eb279060043ad8e8336902b18520 Mon Sep 17 00:00:00 2001 From: DrChat Date: Sat, 23 Dec 2017 21:02:33 -0600 Subject: [PATCH] [Vulkan] Don't allocate textures if we don't know the format. DTX5A = ATI1 --- src/xenia/gpu/vulkan/texture_cache.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/xenia/gpu/vulkan/texture_cache.cc b/src/xenia/gpu/vulkan/texture_cache.cc index a89fc38ad..3a684bb5e 100644 --- a/src/xenia/gpu/vulkan/texture_cache.cc +++ b/src/xenia/gpu/vulkan/texture_cache.cc @@ -106,7 +106,7 @@ static const TextureConfig texture_configs[64] = { /* k_11_11_10_AS_16_16_16_16 */ {VK_FORMAT_B10G11R11_UFLOAT_PACK32}, // ? /* k_32_32_32_FLOAT */ {VK_FORMAT_R32G32B32_SFLOAT}, /* k_DXT3A */ {VK_FORMAT_UNDEFINED}, - /* k_DXT5A */ {VK_FORMAT_UNDEFINED}, + /* k_DXT5A */ {VK_FORMAT_UNDEFINED}, // ATI1N // http://fileadmin.cs.lth.se/cs/Personal/Michael_Doggett/talks/unc-xenos-doggett.pdf /* k_CTX1 */ {VK_FORMAT_R8G8_UINT}, @@ -257,9 +257,8 @@ TextureCache::Texture* TextureCache::AllocateTexture( assert_not_null(texture_info.format_info()); auto& config = texture_configs[int(texture_info.format_info()->format)]; - VkFormat format = config.host_format != VK_FORMAT_UNDEFINED - ? config.host_format - : VK_FORMAT_R8G8B8A8_UNORM; + VkFormat format = config.host_format; + assert(format != VK_FORMAT_UNDEFINED); image_info.tiling = VK_IMAGE_TILING_OPTIMAL; image_info.usage =