Zorro666 / renderdoc

RenderDoc is a stand-alone graphics debugging tool.
https://renderdoc.org/builds
MIT License
3 stars 1 forks source link

Capture and serialise `MTLBuffer` contents #82

Closed Zorro666 closed 2 years ago

Zorro666 commented 2 years ago

Description

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:

image
Zorro666 commented 2 years ago

https://github.com/baldurk/renderdoc/pull/2666