From 554d333299c9c1b09c05fc5e697711fb9d3d3abc Mon Sep 17 00:00:00 2001 From: DrChat Date: Thu, 21 Dec 2017 15:13:54 -0600 Subject: [PATCH] [Vulkan] Request depth/stencil attachment usage for textures that support it --- src/xenia/gpu/vulkan/texture_cache.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/xenia/gpu/vulkan/texture_cache.cc b/src/xenia/gpu/vulkan/texture_cache.cc index 537e7189f..a89fc38ad 100644 --- a/src/xenia/gpu/vulkan/texture_cache.cc +++ b/src/xenia/gpu/vulkan/texture_cache.cc @@ -285,6 +285,10 @@ TextureCache::Texture* TextureCache::AllocateTexture( props.optimalTilingFeatures & VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT) { // Add color attachment usage if it's supported. image_info.usage |= VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT; + } else if (props.optimalTilingFeatures & + VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT) { + // Add depth/stencil usage as well. + image_info.usage |= VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT; } if (props.optimalTilingFeatures & VK_FORMAT_FEATURE_BLIT_DST_BIT) {