5 Commits
Author SHA1 Message Date
Bo Hu 8bf5438d47 [vulkan snapshot]: remove duplicate api traces
Currently, when an api creates multiple handles
the api trace is saved and loaded multiple times.

It happended to work, likely due to the fact most
apis happen to create just 1 handle.
but is wrong. And it leads to crashes due to handle
messing up during load.
e.g., when creating descriptors, some could create
128 in one call.

Bug: 418814845

Change-Id: Ie5c153789dc62deb89414cf34adaa5355773181c
2025-05-19 14:31:49 -07:00
Bo Hu 6483057b40 [vulkan snapshot]: add dependency to VkPipeline
command buffer need this pipeline to be saved.

Bug: 417788798
Change-Id: I5e3736b292a43edf1242fa43487db9ef3ca57e5e
2025-05-14 14:27:52 -07:00
Bo Hu f1a77f537f [vulkan snapshot]: handle vkResetCommandPool
When this is called, the command buffers allocated
from this command pool should all reset their recording.

This call is equivalent to ask each command buffer from
this pool to do vkResetCommandBuffer.

Bug: 415349936
Change-Id: I7a9c76ab16463c16f48336fcef34f532410aac41
2025-05-07 14:41:34 -07:00
Bo Hu 8a413ae915 [vulkan snapshot]: save command recording
In common cases, command buffer is recorded
right before submission. re-submission of pre-recorded
command buffer multiple times is uncommon.

However, it is still a valid case that should be properly
handled by snapshot save and load.

This cl adds code inside SubDecoder to track the dependency
of each Cmd, and also snapshot save and load vkQueueFlushCommandsGOOGLE.

Bug: 415349936

Change-Id: I11b462203722518ea82609613c0874d07bf5be53
2025-05-05 16:46:19 -07:00
Bo Hu d76ee5f372 [vulkan snapshot] simplify dependency graph
This is an effort to simplify the dependency handling
in VkReconstruct.

A new DepGraph class is used to just record the
vk object dependency.

The save and load order is based on the time stamp,
not by topo order from dep graph anymore.

Bug: 407856927

Change-Id: Ibeb89dc01d9f1d007c3221b2dc1ce93957165df1
2025-04-08 12:47:31 -07:00