mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 01:20:42 +00:00
cc8aa679e9
This change reduces the amount of data copied into VkDeviceMemory resources in `Apply_InitialState`; this uses the new (interval-based) reference tracking. On a large capture from a recent game, this change reduces the amount of copied data from 2.2GB to 720MB (plus 100MB cleared to 0). This reduces the time spent in `ApplyInitialContents` from 1800ms to 1500ms. Ranges of memory are initialized/reset by either clearing to 0, or copying in the initial state data, according to the `FrameRefType`, as follows: - Read-only (`eFrameRef_Read`) regions of memory are initialized by copying once, before the first replay. - Read-before-write (`eFrameRef_ReadBeforeWrite`) regions of memory are reset by copying before each replay. - Write-only (`eFrameRef_PartialWrite` and `eFrameRef_CompleteWrite`) regions of memory are cleared to 0 before each replay. This is intended to avoid possible user confusion when inspecting these regions of memory, as they might otherwise show data written later in the frame. - Unused (`eFrameRef_None`) regions of memory are cleared to 0 once, before the first replay.