Unwrap vulkan fences in present fence information struct

This commit is contained in:
baldurk
2023-04-26 13:09:30 +01:00
parent 0e55a9c0e5
commit 9998714b50
@@ -819,18 +819,23 @@ VkResult WrappedVulkan::vkQueuePresentKHR(VkQueue queue, const VkPresentInfoKHR
m_LastSwap = ResourceId();
byte *tempMem = GetTempMemory(GetNextPatchSize(pPresentInfo->pNext));
if(pPresentInfo->swapchainCount == 1)
{
HandlePresent(queue, pPresentInfo, unwrappedWaitSems);
VkPresentInfoKHR mutableInfo = *pPresentInfo;
byte *mem = tempMem;
UnwrapNextChain(m_State, "VkPresentInfoKHR", mem, (VkBaseInStructure *)&mutableInfo);
HandlePresent(queue, &mutableInfo, unwrappedWaitSems);
}
else
{
VkPresentInfoKHR mutableInfo = *pPresentInfo;
{
byte *tempMem = GetTempMemory(GetNextPatchSize(mutableInfo.pNext));
CopyNextChainForPatching("VkPresentInfoKHR", tempMem, (VkBaseInStructure *)&mutableInfo);
}
byte *mem = tempMem;
UnwrapNextChain(m_State, "VkPresentInfoKHR", mem, (VkBaseInStructure *)&mutableInfo);
mutableInfo.swapchainCount = 1;
@@ -889,6 +894,8 @@ VkResult WrappedVulkan::vkQueuePresentKHR(VkQueue queue, const VkPresentInfoKHR
unwrappedInfo.pWaitSemaphores = unwrappedWaitSems.data();
unwrappedInfo.waitSemaphoreCount = (uint32_t)unwrappedWaitSems.size();
UnwrapNextChain(m_State, "VkPresentInfoKHR", tempMem, (VkBaseInStructure *)&unwrappedInfo);
VkResult vkr;
SERIALISE_TIME_CALL(vkr = ObjDisp(queue)->QueuePresentKHR(Unwrap(queue), &unwrappedInfo));