Reland "Use GrVkMemoryAllocator for vulkan memory allocations in ganesh."
This is a reland of 331c266ed716526478a10885aff66181cec64486
Original change's description:
> Use GrVkMemoryAllocator for vulkan memory allocations in ganesh.
>
> Besides using the new allocator, the big logical change is that map
> and unmap calls form GrVkMemory are specc'd to map the entire GrVkAlloc
> instead of a specific offset and size as they did before. As a
> consequence of this, we move the handling of non-coherent alignment
> for flush/invalidate calls to GrVkMemory instead of the callers.
>
> Bug: skia:
> Change-Id: I794d713106602f27aa7e808c306bbb69fd2b67be
> Reviewed-on: https://skia-review.googlesource.com/130021
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
Bug: skia:
Change-Id: Ia9a4192d344449fb444d2adaa1d62ff1ede4b21d
Reviewed-on: https://skia-review.googlesource.com/131083
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/vk/GrVkBuffer.h b/src/gpu/vk/GrVkBuffer.h
index 8d116a4..6d0c1fd 100644
--- a/src/gpu/vk/GrVkBuffer.h
+++ b/src/gpu/vk/GrVkBuffer.h
@@ -82,7 +82,7 @@
const Desc& descriptor);
GrVkBuffer(const Desc& desc, const GrVkBuffer::Resource* resource)
- : fDesc(desc), fResource(resource), fOffset(0), fMapPtr(nullptr), fMappedSize(0) {
+ : fDesc(desc), fResource(resource), fOffset(0), fMapPtr(nullptr) {
}
void* vkMap(GrVkGpu* gpu) {
@@ -115,9 +115,6 @@
const Resource* fResource;
VkDeviceSize fOffset;
void* fMapPtr;
- // On certain Intel devices/drivers there is a bug if we try to flush non-coherent memory and
- // pass in VK_WHOLE_SIZE. Thus we track our mapped size and explicitly set it when calling flush
- VkDeviceSize fMappedSize;
typedef SkNoncopyable INHERITED;
};