diff options
| author | Alex Smith <asmith@feralinteractive.com> | 2017-01-17 11:13:23 +0000 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2017-01-17 08:03:23 -0700 |
| commit | dcfd0c25c7fff1c8ae231b234870027e913c08bf (patch) | |
| tree | 0a23b0ca23802753cdfd46142b278a0543de38db /layers/image.cpp | |
| parent | dce5be40a905089308e62a36f82a37c4fd245d6f (diff) | |
| download | usermoji-dcfd0c25c7fff1c8ae231b234870027e913c08bf.tar.xz | |
layers: PR1381, Fix vkCmdCopyImage intersection check
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
Diffstat (limited to 'layers/image.cpp')
| -rw-r--r-- | layers/image.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/layers/image.cpp b/layers/image.cpp index 45786f8f..fd4e1338 100644 --- a/layers/image.cpp +++ b/layers/image.cpp @@ -526,11 +526,11 @@ static bool RangesIntersect(int32_t start, uint32_t start_offset, int32_t end, u // 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); |
