VkBufferImageCopy region = { };
region.bufferOffset = src_off;
- region.imageSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
+ region.imageSubresource.aspectMask = get_vulkan_aspect(get_components(storage_fmt));
region.imageSubresource.mipLevel = level;
region.imageSubresource.baseArrayLayer = 0;
region.imageSubresource.layerCount = 1;
VkBufferImageCopy region = { };
region.bufferOffset = src_off;
- region.imageSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
+ region.imageSubresource.aspectMask = get_vulkan_aspect(get_components(storage_fmt));
region.imageSubresource.mipLevel = level;
region.imageSubresource.baseArrayLayer = 0;
region.imageSubresource.layerCount = 1;
VkBufferImageCopy region = { };
region.bufferOffset = src_off;
- region.imageSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
+ region.imageSubresource.aspectMask = get_vulkan_aspect(get_components(storage_fmt));
region.imageSubresource.mipLevel = level;
region.imageSubresource.baseArrayLayer = (is_array() ? z : 0);
region.imageSubresource.layerCount = (is_array() ? dp : 1);
VkBufferImageCopy region = { };
region.bufferOffset = src_off;
- region.imageSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
+ region.imageSubresource.aspectMask = get_vulkan_aspect(get_components(storage_fmt));
region.imageSubresource.mipLevel = level;
region.imageSubresource.baseArrayLayer = face;
region.imageSubresource.layerCount = 1;