diff options
Diffstat (limited to 'src/gpu/vk/GrVkBuffer.cpp')
-rw-r--r-- | src/gpu/vk/GrVkBuffer.cpp | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/gpu/vk/GrVkBuffer.cpp b/src/gpu/vk/GrVkBuffer.cpp index 64f26309b7..5aa3fb0c15 100644 --- a/src/gpu/vk/GrVkBuffer.cpp +++ b/src/gpu/vk/GrVkBuffer.cpp @@ -169,21 +169,6 @@ void GrVkBuffer::internalMap(GrVkGpu* gpu, size_t size, bool* createdNewBuffer) if (fDesc.fDynamic) { const GrVkAlloc& alloc = this->alloc(); - SkASSERT(alloc.fSize > 0); - - // For Noncoherent buffers we want to make sure the range that we map, both offset and size, - // are aligned to the nonCoherentAtomSize limit. The offset should have been correctly - // aligned by our memory allocator. For size we pad out to make the range also aligned. - if (SkToBool(alloc.fFlags & GrVkAlloc::kNoncoherent_Flag)) { - // Currently we always have the internal offset as 0. - SkASSERT(0 == fOffset); - VkDeviceSize alignment = gpu->physicalDeviceProperties().limits.nonCoherentAtomSize; - SkASSERT(0 == (alloc.fOffset & (alignment - 1))); - - // Make size of the map aligned to nonCoherentAtomSize - size = (size + alignment - 1) & ~(alignment - 1); - } - SkASSERT(size + fOffset <= alloc.fSize); VkResult err = VK_CALL(gpu, MapMemory(gpu->device(), alloc.fMemory, alloc.fOffset + fOffset, size, 0, &fMapPtr)); |