diff options
| author | Tobin Ehlis <tobine@google.com> | 2016-10-05 07:50:25 -0600 |
|---|---|---|
| committer | Tobin Ehlis <tobine@google.com> | 2016-10-05 14:56:01 -0600 |
| commit | af9e373c49efaeb87c5bc54d31385e788508e461 (patch) | |
| tree | 0bd6ead5c7da95ebe89ddea3d81e4cdd07c37993 /layers/core_validation.cpp | |
| parent | b27bac4c62d9ac8c26748716b1f217671cfc1e4b (diff) | |
| download | usermoji-af9e373c49efaeb87c5bc54d31385e788508e461.tar.xz | |
layers: Fix state tracking for vkFlushMappedMemoryRanges()
Checks for underflow and overflow when flushing mapped memory where using the
flush offset instead of the original mapped region offset to determine size of
total mapped region.
Diffstat (limited to 'layers/core_validation.cpp')
| -rw-r--r-- | layers/core_validation.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 112a7b58..d89daab1 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -10872,7 +10872,7 @@ static bool ValidateAndCopyNoncoherentMemoryToDriver(layer_data *dev_data, uint3 if (mem_info->shadow_copy) { VkDeviceSize size = (mem_info->mem_range.size != VK_WHOLE_SIZE) ? mem_info->mem_range.size - : (mem_info->alloc_info.allocationSize - pMemRanges[i].offset); + : (mem_info->alloc_info.allocationSize - mem_info->mem_range.offset); char *data = static_cast<char *>(mem_info->shadow_copy); for (uint64_t j = 0; j < mem_info->shadow_pad_size; ++j) { if (data[j] != NoncoherentMemoryFillValue) { |
