Chip Davis b64485bf2a MVKDeviceMemory: Try creating an MTLBuffer before allocating heap memory.
If the device memory is subsequently bound to a `VkBuffer` after it has
been mapped, the heap memory will be freed, leaving dangling pointers in
the client. Instead, create an `MTLBuffer` right away--it is *device*
memory after all--and use its memory.

Another option might be to use `-[MTLDevice
newBufferWithBytesNoCopy:length:options:deallocator:]`, but that
requires that the entire allocation come from a single contiguous
virtual memory mapping, a requirement that is not necessarily satisfied
by `malloc(3)` memory.

Fixes #377.
2018-12-10 14:55:49 -06:00
..
2018-11-06 16:01:36 -05:00
iOS
2017-11-17 11:14:29 -05:00
2017-11-17 11:14:29 -05:00