Only create initial contents for memory that is initialisable

This commit is contained in:
baldurk
2025-09-18 10:05:06 +01:00
parent 998b1c7ee0
commit 101953be7a
+3 -1
View File
@@ -1786,8 +1786,10 @@ void WrappedVulkan::Create_InitialState(ResourceId id, WrappedVkRes *live, bool)
}
else if(type == eResDeviceMemory)
{
VkBuffer dstBuf = m_CreationInfo.m_Memory[id].wholeMemBuf;
// need to ensure there are initial contents to apply though we don't create any memory
GetResourceManager()->SetInitialContents(id, VkInitialContents(type, MemoryAllocation()));
if(dstBuf != VK_NULL_HANDLE)
GetResourceManager()->SetInitialContents(id, VkInitialContents(type, MemoryAllocation()));
}
else if(type == eResDeviceMemory || type == eResBuffer || type == eResAccelerationStructureKHR)
{