Jan Sikorski c9d425a37b MVKMTLBufferAllocator: Make sure temporary buffer data is not discarded while in use.
e1ac50c0 marks temporary buffers as volatile, but it only mlocks() them for the duration
of memcpy() of initial data, leaving Metal runtime a window to snatch it before the buffer
is no longer in use. Simply putting the munlock() in a completion handler raises questions
about possible edge cases where multiple, non page-aligned allocations are live.
This patch fixes it by keeping the whole buffer non-volatile while is supports any active
allocations.

Fixes rendering issues in Sekiro: Shadows Die Twice menus.
2021-06-11 16:31:28 +02:00
..