MTLBuffer initial state chunks and in-frame CPU modification of MTLBuffer data.
Support for buffers created with the following modesStorageModeShared, StorageModeManaged & StorageModePrivate.
The initial contents are serialized for all 3 buffer storage modes.
StorageModeShared buffers: when submitting the command buffer for all referenced buffers serialize the difference in the buffer contents compared to the buffer base snapshot as a MTLBuffer_InternalModifyCPUContents chunk in the command buffer record.
StorageModeManaged buffers: serialise didModifyRange chunks in the command buffer record
StorageModeManaged buffers: no in-frame serialization rely on the snapshot in initial contents.
An example of replaying a capture made from this branch of a test program uses all 3 storage modes:
Description
MTLBuffer
initial state chunks and in-frame CPU modification ofMTLBuffer
data. Support for buffers created with the following modesStorageModeShared
,StorageModeManaged
&StorageModePrivate
. The initial contents are serialized for all 3 buffer storage modes.StorageModeShared
buffers: when submitting the command buffer for all referenced buffers serialize the difference in the buffer contents compared to the buffer base snapshot as aMTLBuffer_InternalModifyCPUContents
chunk in the command buffer record.StorageModeManaged
buffers: serialisedidModifyRange
chunks in the command buffer recordStorageModeManaged
buffers: no in-frame serialization rely on the snapshot in initial contents.An example of replaying a capture made from this branch of a test program uses all 3 storage modes: