Merge pull request #502 from sg-brcm/bufferflushfix

Add missing flush in one of the buffer creation helpers.
This commit is contained in:
Sascha Willems 2018-07-14 10:20:40 +02:00 committed by GitHub
commit 61524026d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -414,6 +414,9 @@ namespace vks
{
VK_CHECK_RESULT(buffer->map());
memcpy(buffer->mapped, data, size);
if ((memoryPropertyFlags & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT) == 0)
buffer->flush();
buffer->unmap();
}