Commit 4422d298 by Courtney Goeltzenleuchter Committed by Commit Bot

Vulkan: Must call vkFlush while memory is mapped

Update to Vulkan validation layers pointed out that vkFlushMappedMemoryRanges needs to be called when the memory is mapped. Bug: b:151820847 Change-Id: I3860306080bca435c063046f9ae20943a8601d17 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2108705Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com> Reviewed-by: 's avatarIan Elliott <ianelliott@google.com> Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
parent 4119f033
......@@ -440,7 +440,6 @@ angle::Result InitMappableDeviceMemory(Context *context,
uint8_t *mapPointer;
ANGLE_VK_TRY(context, deviceMemory->map(device, 0, VK_WHOLE_SIZE, 0, &mapPointer));
memset(mapPointer, value, static_cast<size_t>(size));
deviceMemory->unmap(device);
VkMappedMemoryRange mappedRange = {};
mappedRange.sType = VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE;
......@@ -448,6 +447,8 @@ angle::Result InitMappableDeviceMemory(Context *context,
mappedRange.size = VK_WHOLE_SIZE;
ANGLE_VK_TRY(context, vkFlushMappedMemoryRanges(device, 1, &mappedRange));
deviceMemory->unmap(device);
return angle::Result::Continue;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment