From b2f1bf914a0e53dc361df6211ba6101626959bb4 Mon Sep 17 00:00:00 2001 From: DrChat Date: Wed, 28 Feb 2018 21:01:12 -0600 Subject: [PATCH] [Vulkan] Set proper aspect mask in depth uploads --- src/xenia/gpu/vulkan/texture_cache.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/xenia/gpu/vulkan/texture_cache.cc b/src/xenia/gpu/vulkan/texture_cache.cc index 2ea69875a..0cb9694c4 100644 --- a/src/xenia/gpu/vulkan/texture_cache.cc +++ b/src/xenia/gpu/vulkan/texture_cache.cc @@ -1272,6 +1272,12 @@ bool TextureCache::UploadTexture(VkCommandBuffer command_buffer, // Now move the converted texture into the destination. copy_region.bufferOffset = alloc->offset; copy_region.imageOffset = {0, 0, 0}; + if (dest->format == VK_FORMAT_D16_UNORM_S8_UINT || + dest->format == VK_FORMAT_D24_UNORM_S8_UINT || + dest->format == VK_FORMAT_D32_SFLOAT_S8_UINT) { + // Do just a depth upload (for now). + copy_region.imageSubresource.aspectMask = VK_IMAGE_ASPECT_DEPTH_BIT; + } vkCmdCopyBufferToImage(command_buffer, staging_buffer_.gpu_buffer(), dest->image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1, ©_region);