Skip to content

Commit 06f6335

Browse files
committed
layers: Fix checking device address commands copy overlap
1 parent 297055a commit 06f6335

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

layers/stateless/sl_cmd_buffer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,8 @@ bool Device::manual_PreCallValidateCmdCopyMemoryKHR(VkCommandBuffer commandBuffe
637637
vvl::range<VkDeviceAddress> next_dst_range = {other_region.dstRange.address,
638638
other_region.dstRange.address + other_region.dstRange.size};
639639

640-
if (j > 1 && region_src_range.intersects(next_src_range)) {
640+
// j > i so that the current src range is not compared to itself
641+
if (j > i && region_src_range.intersects(next_src_range)) {
641642
skip |= LogError("VUID-VkCopyDeviceMemoryInfoKHR-srcRange-13015", commandBuffer, region_loc.dot(Field::srcRange),
642643
"%s overlaps with pRegions[%" PRIu32 "].srcRange %s", string_range_hex(region_src_range).c_str(),
643644
j, string_range_hex(next_src_range).c_str());

0 commit comments

Comments
 (0)