Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Unified Diff: src/gpu/vk/GrVkBuffer.cpp

Issue 2348523002: Support use of non-coherent memory allocations in Vulkan. (Closed)
Patch Set: Fix viewer init Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/gpu/vk/GrVkBuffer.cpp
diff --git a/src/gpu/vk/GrVkBuffer.cpp b/src/gpu/vk/GrVkBuffer.cpp
index a03ea0cc41ef43ba0c4f71b7b4eaa9054409c27f..b16251c14da83afaeaaa63f771e88f7f95aec186 100644
--- a/src/gpu/vk/GrVkBuffer.cpp
+++ b/src/gpu/vk/GrVkBuffer.cpp
@@ -151,6 +151,7 @@ void GrVkBuffer::vkUnmap(GrVkGpu* gpu) {
SkASSERT(this->vkIsMapped());
if (fDesc.fDynamic) {
+ GrVkMemory::FlushMappedAlloc(gpu, this->alloc());
VK_CALL(gpu, UnmapMemory(gpu->device(), this->alloc().fMemory));
} else {
gpu->updateBuffer(this, fMapPtr, this->offset(), this->size());
@@ -199,6 +200,7 @@ bool GrVkBuffer::vkUpdateData(GrVkGpu* gpu, const void* src, size_t srcSizeInByt
memcpy(mapPtr, src, srcSizeInBytes);
+ GrVkMemory::FlushMappedAlloc(gpu, this->alloc());
VK_CALL(gpu, UnmapMemory(gpu->device(), alloc.fMemory));
return true;
« no previous file with comments | « include/gpu/vk/GrVkTypes.h ('k') | src/gpu/vk/GrVkGpu.cpp » ('j') | src/gpu/vk/GrVkMemory.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698