Adjust vulkan memory allocation block size knobs to better match the type of draws we do.

We were allocating blocks significantly larger than the amount of memory we actually using
which caused us to end up wasting a lot of unused memory. This brings our allocation
sizes more inline with our uses.

Change-Id: I1b00670cfdfdb21884a4a203a1c35e183d83dbcf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209402
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/vk/GrVkAMDMemoryAllocator.cpp b/src/gpu/vk/GrVkAMDMemoryAllocator.cpp
index ebecbad..4ee457f 100644
--- a/src/gpu/vk/GrVkAMDMemoryAllocator.cpp
+++ b/src/gpu/vk/GrVkAMDMemoryAllocator.cpp
@@ -46,7 +46,7 @@
     // Manually testing runs of dm using 64 here instead of the default 256 shows less memory usage
     // on average. Also dm seems to run faster using 64 so it doesn't seem to be trading off speed
     // for memory.
-    info.preferredLargeHeapBlockSize = 64*1024*1024;
+    info.preferredLargeHeapBlockSize = 4*1024*1024;
     info.pAllocationCallbacks = nullptr;
     info.pDeviceMemoryCallbacks = nullptr;
     info.frameInUseCount = 0;
diff --git a/src/gpu/vk/GrVkMemory.cpp b/src/gpu/vk/GrVkMemory.cpp
index 546e8d7..ea6e97c 100644
--- a/src/gpu/vk/GrVkMemory.cpp
+++ b/src/gpu/vk/GrVkMemory.cpp
@@ -84,7 +84,7 @@
     }
 }
 
-const VkDeviceSize kMaxSmallImageSize = 16 * 1024;
+const VkDeviceSize kMaxSmallImageSize = 256 * 1024;
 
 bool GrVkMemory::AllocAndBindImageMemory(const GrVkGpu* gpu,
                                          VkImage image,