Skip to content

Commit

Permalink
Reset initial contents after serialisation when softmem limit flushing
Browse files Browse the repository at this point in the history
If an initial content AS was destroyed during active capture then resetting before serialisation meant that VkInitialContents::Free() was called, deref-ing the AS info and causing it to be deleted.

So VkInitialContents is now reset after serialisation to ensure its lifetime.

Change-Id: I6a296bd96dd5b639f68347073298e5545e8f980d
  • Loading branch information
cmannett85-arm committed Oct 11, 2024
1 parent 253dd5a commit 97ac0f5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions renderdoc/driver/vulkan/vk_initstate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@ bool WrappedVulkan::Prepare_InitialState(WrappedVkRes *res)
{
VkInitialContents initData = GetResourceManager()->GetInitialContents(flushId);

GetResourceManager()->SetInitialContents(flushId, VkInitialContents());

uint64_t start = ser.GetWriter()->GetOffset();
{
uint64_t size = GetSize_InitialState(flushId, initData);
Expand All @@ -134,6 +132,7 @@ bool WrappedVulkan::Prepare_InitialState(WrappedVkRes *res)

// record is not needed on vulkan
Serialise_InitialState(ser, flushId, NULL, &initData);
GetResourceManager()->SetInitialContents(flushId, VkInitialContents());
}
uint64_t end = ser.GetWriter()->GetOffset();

Expand Down

0 comments on commit 97ac0f5

Please sign in to comment.