diff options
| author | iwubcode <iwubcode@users.noreply.github.com> | 2023-01-27 18:41:52 -0600 |
|---|---|---|
| committer | iwubcode <iwubcode@users.noreply.github.com> | 2023-01-27 18:41:52 -0600 |
| commit | 271c60781bdf608959873097ca52df5d20f640be (patch) | |
| tree | bd8747ce7a8698f374d3c75876d32643f3b863fd /Source | |
| parent | 41272dc5f1b62f4a5a0562cc29eb3e83367d0f14 (diff) | |
VideoBackends: update Vulkan's 'CopyRectangleFromTexture' to copy one layer, copying more than one layer doesn't make sense given that we provide both the source/destination layer
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/VideoBackends/Vulkan/VKTexture.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/VKTexture.cpp b/Source/Core/VideoBackends/Vulkan/VKTexture.cpp index 412deaf5f9..11c51f4ffc 100644 --- a/Source/Core/VideoBackends/Vulkan/VKTexture.cpp +++ b/Source/Core/VideoBackends/Vulkan/VKTexture.cpp @@ -265,10 +265,12 @@ void VKTexture::CopyRectangleFromTexture(const AbstractTexture* src, static_cast<u32>(dst_rect.GetHeight()) <= m_config.height, "Dest rect is too large for CopyRectangleFromTexture"); + const u32 copy_layer_count = 1; + VkImageCopy image_copy = { - {VK_IMAGE_ASPECT_COLOR_BIT, src_level, src_layer, src_texture->GetLayers()}, + {VK_IMAGE_ASPECT_COLOR_BIT, src_level, src_layer, copy_layer_count}, {src_rect.left, src_rect.top, 0}, - {VK_IMAGE_ASPECT_COLOR_BIT, dst_level, dst_layer, m_config.layers}, + {VK_IMAGE_ASPECT_COLOR_BIT, dst_level, dst_layer, copy_layer_count}, {dst_rect.left, dst_rect.top, 0}, {static_cast<uint32_t>(src_rect.GetWidth()), static_cast<uint32_t>(src_rect.GetHeight()), 1}}; |
