Hi,
I was looking at the documentation for Metal and saw there are 3 instance methods for creating a Metal buffer:
makeBuffer(length:)
makeBuffer(bytes:, length:)
makeBuffer(bytesNoCopy:, length:)
Though, I was wondering what the purpose is of using the bytes
alternative when the bytesNoCopy
method exists. Especially when working within the unified memory model of the iPhone and newer Mac models.
I would assume the noCopy method has less overhead since it just wraps an existing contiguous memory block, while the normal bytes version creates a full copy (and thus, more overhead?).
Is there a simple answer for them both existing, or could you point me to some documentation explaining their difference in greater detail than the Apple developer docs?
Thanks in advance!