Reputation: 567
Are there any benefits to using a single vkMapMemory
, a memset
s for each write, and a single vkUnmapMemory
as opposed to using a vkMapMemory
, memset
, and vkUnmapMemory
for each write to a buffer?
Upvotes: 0
Views: 850
Reputation: 13246
Yes, it is beneficial to map only once. vkMapMemory
likely needs to do some system calls, so it is not free.
Authoritative quote, e.g. https://developer.samsung.com/game/usage#buffermanagement:
Frequent Map/Unmap calls should be avoided.
Upvotes: 4