mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Don't submit, signal, reset or wait on fences at all.
* There's no point passing a fence to vkQueueSubmit to be signalled as it might not be in the right state, and we don't have anything going to wait for it.
This commit is contained in:
@@ -190,7 +190,9 @@ bool WrappedVulkan::Serialise_vkQueueSubmit(
|
||||
|
||||
if(m_State == READING)
|
||||
{
|
||||
ObjDisp(queue)->QueueSubmit(Unwrap(queue), 1, &submitInfo, Unwrap(fence));
|
||||
// don't submit the fence, since we have nothing to wait on it being signalled, and we might
|
||||
// not have it correctly in the unsignalled state.
|
||||
ObjDisp(queue)->QueueSubmit(Unwrap(queue), 1, &submitInfo, VK_NULL_HANDLE);
|
||||
|
||||
for(uint32_t i=0; i < numCmds; i++)
|
||||
{
|
||||
@@ -280,7 +282,9 @@ bool WrappedVulkan::Serialise_vkQueueSubmit(
|
||||
|
||||
submitInfo.commandBufferCount = (uint32_t)rerecordedCmds.size();
|
||||
submitInfo.pCommandBuffers = &rerecordedCmds[0];
|
||||
ObjDisp(queue)->QueueSubmit(Unwrap(queue), 1, &submitInfo, Unwrap(fence));
|
||||
// don't submit the fence, since we have nothing to wait on it being signalled, and we might
|
||||
// not have it correctly in the unsignalled state.
|
||||
ObjDisp(queue)->QueueSubmit(Unwrap(queue), 1, &submitInfo, VK_NULL_HANDLE);
|
||||
}
|
||||
else if(m_LastEventID > startEID && m_LastEventID < m_RootEventID)
|
||||
{
|
||||
@@ -325,7 +329,9 @@ bool WrappedVulkan::Serialise_vkQueueSubmit(
|
||||
|
||||
submitInfo.commandBufferCount = (uint32_t)trimmedCmds.size();
|
||||
submitInfo.pCommandBuffers = &trimmedCmds[0];
|
||||
ObjDisp(queue)->QueueSubmit(Unwrap(queue), 1, &submitInfo, Unwrap(fence));
|
||||
// don't submit the fence, since we have nothing to wait on it being signalled, and we might
|
||||
// not have it correctly in the unsignalled state.
|
||||
ObjDisp(queue)->QueueSubmit(Unwrap(queue), 1, &submitInfo, VK_NULL_HANDLE);
|
||||
|
||||
for(uint32_t i=0; i < trimmedCmdIds.size(); i++)
|
||||
{
|
||||
@@ -336,8 +342,10 @@ bool WrappedVulkan::Serialise_vkQueueSubmit(
|
||||
else
|
||||
{
|
||||
RDCDEBUG("Queue Submit full replay %u >= %u", m_LastEventID, m_RootEventID);
|
||||
|
||||
ObjDisp(queue)->QueueSubmit(Unwrap(queue), 1, &submitInfo, Unwrap(fence));
|
||||
|
||||
// don't submit the fence, since we have nothing to wait on it being signalled, and we might
|
||||
// not have it correctly in the unsignalled state.
|
||||
ObjDisp(queue)->QueueSubmit(Unwrap(queue), 1, &submitInfo, VK_NULL_HANDLE);
|
||||
|
||||
for(uint32_t i=0; i < numCmds; i++)
|
||||
{
|
||||
@@ -714,8 +722,10 @@ bool WrappedVulkan::Serialise_vkQueueBindSparse(
|
||||
std::swap(im[i], im[noSemBindInfo.imageBindCount]);
|
||||
}
|
||||
}
|
||||
|
||||
ObjDisp(queue)->QueueBindSparse(Unwrap(queue), 1, &noSemBindInfo, fence);
|
||||
|
||||
// don't submit the fence, since we have nothing to wait on it being signalled, and we might
|
||||
// not have it correctly in the unsignalled state.
|
||||
ObjDisp(queue)->QueueBindSparse(Unwrap(queue), 1, &noSemBindInfo, VK_NULL_HANDLE);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -85,9 +85,9 @@ bool WrappedVulkan::Serialise_vkCreateFence(
|
||||
if(m_State == READING)
|
||||
{
|
||||
device = GetResourceManager()->GetLiveHandle<VkDevice>(devId);
|
||||
VkFence sem = VK_NULL_HANDLE;
|
||||
VkFence fence = VK_NULL_HANDLE;
|
||||
|
||||
VkResult ret = ObjDisp(device)->CreateFence(Unwrap(device), &info, NULL, &sem);
|
||||
VkResult ret = ObjDisp(device)->CreateFence(Unwrap(device), &info, NULL, &fence);
|
||||
|
||||
if(ret != VK_SUCCESS)
|
||||
{
|
||||
@@ -95,8 +95,8 @@ bool WrappedVulkan::Serialise_vkCreateFence(
|
||||
}
|
||||
else
|
||||
{
|
||||
ResourceId live = GetResourceManager()->WrapResource(Unwrap(device), sem);
|
||||
GetResourceManager()->AddLiveResource(id, sem);
|
||||
ResourceId live = GetResourceManager()->WrapResource(Unwrap(device), fence);
|
||||
GetResourceManager()->AddLiveResource(id, fence);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -203,12 +203,12 @@ bool WrappedVulkan::Serialise_vkResetFences(
|
||||
if(m_State < WRITING && !fences.empty())
|
||||
{
|
||||
// we don't care about fence states ourselves as we cannot record them perfectly and just
|
||||
// do full waitidle flushes. However if the fence is passed to vkQueueSubmit we need to
|
||||
// make sure it is correctly unsignalled.
|
||||
|
||||
// do full waitidle flushes.
|
||||
device = GetResourceManager()->GetLiveHandle<VkDevice>(id);
|
||||
|
||||
ObjDisp(device)->ResetFences(Unwrap(device), (uint32_t)fences.size(), &fences[0]);
|
||||
// since we don't have anything signalling or waiting on fences, don't bother to reset them
|
||||
// either
|
||||
//ObjDisp(device)->ResetFences(Unwrap(device), (uint32_t)fences.size(), &fences[0]);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user