Skip to content

Commit

Permalink
Moved the semaphore reset to fix waiting of data transfer submission.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertosfield committed Sep 14, 2024
1 parent fb6bc64 commit 5c342c6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/vsg/app/RecordAndSubmitTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ VkResult RecordAndSubmitTask::submit(ref_ptr<FrameStamp> frameStamp)

if (transferTask)
{
transferTask->_earlyDataToCopy.transferConsumerCompletedSemaphore.reset();
if (auto transfer = transferTask->transferData(TransferTask::TRANSFER_BEFORE_RECORD_TRAVERSAL); transfer.result == VK_SUCCESS)
{
if (transfer.dataTransferredSemaphore)
Expand Down Expand Up @@ -168,7 +167,6 @@ VkResult RecordAndSubmitTask::finish(ref_ptr<RecordedCommandBuffers> recordedCom
if (transferTask)
{
auto transfer = transferTask->transferData(TransferTask::TRANSFER_AFTER_RECORD_TRAVERSAL);
transferTask->_lateDataToCopy.transferConsumerCompletedSemaphore.reset();

if (transfer.result == VK_SUCCESS)
{
Expand Down
2 changes: 2 additions & 0 deletions src/vsg/app/TransferTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,8 @@ TransferTask::TransferResult TransferTask::_transferData(DataToCopy& dataToCopy)

result = transferQueue->submit(submitInfo);

dataToCopy.transferConsumerCompletedSemaphore.reset();

if (result != VK_SUCCESS) return TransferResult{result, {}};

return TransferResult{VK_SUCCESS, newSignalSemaphore};
Expand Down

0 comments on commit 5c342c6

Please sign in to comment.