summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrChat <arkolbed@gmail.com>2017-12-21 15:13:54 -0600
committerDrChat <arkolbed@gmail.com>2017-12-21 15:13:54 -0600
commit554d333299c9c1b09c05fc5e697711fb9d3d3abc (patch)
treec99f3a609cbca932ef0dd7cb74cda0eba8aac1d6
parentab7dce53ec70669ac9469a276434fa61d2050008 (diff)
[Vulkan] Request depth/stencil attachment usage for textures that support it
-rw-r--r--src/xenia/gpu/vulkan/texture_cache.cc4
1 files changed, 4 insertions, 0 deletions
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) {