diff --git a/src/xenia/gpu/vulkan/texture_cache.cc b/src/xenia/gpu/vulkan/texture_cache.cc index b6ddc1530..661971ce7 100644 --- a/src/xenia/gpu/vulkan/texture_cache.cc +++ b/src/xenia/gpu/vulkan/texture_cache.cc @@ -353,10 +353,16 @@ TextureCache::Texture* TextureCache::DemandResolveTexture( } } + VkFormatFeatureFlags required_flags = VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT; + if (texture_info.texture_format == TextureFormat::k_24_8 || + texture_info.texture_format == TextureFormat::k_24_8_FLOAT) { + required_flags |= VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT; + } else { + required_flags |= VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT; + } + // No texture at this location. Make a new one. - auto texture = - AllocateTexture(texture_info, VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT | - VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT); + auto texture = AllocateTexture(texture_info, required_flags); // Setup a debug name for the texture. device_->DbgSetObjectName(