From 8683037a2ea9d75d1aea8915bf8acdc9cc6f4d24 Mon Sep 17 00:00:00 2001 From: Greg Daniel Date: Fri, 1 Jun 2018 13:35:16 -0400 Subject: Always keep buffers in vulkan persistently mapped. This should hopefully fix (and possibly even improve) some of the perf regressions we had form switching the memory allocator which were caused by us now mapping and unmapping the entire VkDeviceMemory instead of just subsets. Bug: skia: Change-Id: Ia8232594f33003e88969bf16febea4e4eec0ac95 Reviewed-on: https://skia-review.googlesource.com/131443 Commit-Queue: Greg Daniel Reviewed-by: Jim Van Verth --- src/gpu/vk/GrVkAMDMemoryAllocator.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/gpu/vk/GrVkAMDMemoryAllocator.cpp') diff --git a/src/gpu/vk/GrVkAMDMemoryAllocator.cpp b/src/gpu/vk/GrVkAMDMemoryAllocator.cpp index 53703a2149..21a35bc0e5 100644 --- a/src/gpu/vk/GrVkAMDMemoryAllocator.cpp +++ b/src/gpu/vk/GrVkAMDMemoryAllocator.cpp @@ -130,7 +130,8 @@ bool GrVkAMDMemoryAllocator::allocateMemoryForBuffer(VkBuffer buffer, BufferUsag info.preferredFlags |= VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT; } - if ((AllocationPropertyFlags::kPersistentlyMapped & flags) && BufferUsage::kGpuOnly != usage) { + if (AllocationPropertyFlags::kPersistentlyMapped & flags) { + SkASSERT(BufferUsage::kGpuOnly != usage); info.flags |= VMA_ALLOCATION_CREATE_MAPPED_BIT; } -- cgit v1.2.3