mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 04:22:34 +00:00
- the semaphore should never be added when its the last submit before waiting
This commit is contained in:
parent
401a4944b4
commit
a3587009e7
2 changed files with 7 additions and 7 deletions
|
@ -193,7 +193,7 @@ void VulkanFrameBuffer::DeleteFrameObjects()
|
|||
FrameDeleteList.CommandBuffers.clear();
|
||||
}
|
||||
|
||||
void VulkanFrameBuffer::FlushCommands(VulkanCommandBuffer **commands, size_t count, bool finish)
|
||||
void VulkanFrameBuffer::FlushCommands(VulkanCommandBuffer **commands, size_t count, bool finish, bool lastsubmit)
|
||||
{
|
||||
int currentIndex = mNextSubmit % maxConcurrentSubmitCount;
|
||||
|
||||
|
@ -217,14 +217,14 @@ void VulkanFrameBuffer::FlushCommands(VulkanCommandBuffer **commands, size_t cou
|
|||
submit.addSignal(mRenderFinishedSemaphore.get());
|
||||
}
|
||||
|
||||
if (!finish)
|
||||
if (!lastsubmit)
|
||||
submit.addSignal(mSubmitSemaphore[currentIndex].get());
|
||||
|
||||
submit.execute(device, device->graphicsQueue, mSubmitFence[currentIndex].get());
|
||||
mNextSubmit++;
|
||||
}
|
||||
|
||||
void VulkanFrameBuffer::FlushCommands(bool finish)
|
||||
void VulkanFrameBuffer::FlushCommands(bool finish, bool lastsubmit)
|
||||
{
|
||||
if (mDrawCommands || mTransferCommands)
|
||||
{
|
||||
|
@ -245,7 +245,7 @@ void VulkanFrameBuffer::FlushCommands(bool finish)
|
|||
FrameDeleteList.CommandBuffers.push_back(std::move(mDrawCommands));
|
||||
}
|
||||
|
||||
FlushCommands(commands, count, finish);
|
||||
FlushCommands(commands, count, finish, lastsubmit);
|
||||
|
||||
current_rendered_commandbuffers += (int)count;
|
||||
}
|
||||
|
@ -263,7 +263,7 @@ void VulkanFrameBuffer::WaitForCommands(bool finish)
|
|||
mPostprocess->DrawPresentTexture(mOutputLetterbox, true, true);
|
||||
}
|
||||
|
||||
FlushCommands(finish);
|
||||
FlushCommands(finish, true);
|
||||
|
||||
if (finish)
|
||||
{
|
||||
|
|
|
@ -34,7 +34,7 @@ public:
|
|||
VkPostprocess *GetPostprocess() { return mPostprocess.get(); }
|
||||
VkRenderBuffers *GetBuffers() { return mActiveRenderBuffers; }
|
||||
|
||||
void FlushCommands(bool finish);
|
||||
void FlushCommands(bool finish, bool lastsubmit = false);
|
||||
|
||||
unsigned int GetLightBufferBlockSize() const;
|
||||
|
||||
|
@ -111,7 +111,7 @@ private:
|
|||
void CopyScreenToBuffer(int w, int h, void *data);
|
||||
void UpdateShadowMap();
|
||||
void DeleteFrameObjects();
|
||||
void FlushCommands(VulkanCommandBuffer **commands, size_t count, bool finish);
|
||||
void FlushCommands(VulkanCommandBuffer **commands, size_t count, bool finish, bool lastsubmit);
|
||||
|
||||
std::unique_ptr<VkShaderManager> mShaderManager;
|
||||
std::unique_ptr<VkSamplerManager> mSamplerManager;
|
||||
|
|
Loading…
Reference in a new issue