RegionIntersects would return true if the source and destination array
layers and mip level did *not* overlap, resulting in a spurious
validation error when trying to copy between different array layers or
mip levels of the same image.
Change-Id: I2e5675f703a4f5e2e7cbfd1d038bd38c7d7dafe0
// Returns true if two VkImageCopy structures overlap
static bool RegionIntersects(const VkImageCopy *src, const VkImageCopy *dst, VkImageType type) {
- bool result = true;
+ bool result = false;
if ((src->srcSubresource.mipLevel == dst->dstSubresource.mipLevel) &&
(RangesIntersect(src->srcSubresource.baseArrayLayer, src->srcSubresource.layerCount, dst->dstSubresource.baseArrayLayer,
dst->dstSubresource.layerCount))) {
-
+ result = true;
switch (type) {
case VK_IMAGE_TYPE_3D:
result &= RangesIntersect(src->srcOffset.z, src->extent.depth, dst->dstOffset.z, dst->extent.depth);