Skip to content

Commit

Permalink
Ran clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
robertosfield committed Sep 13, 2024
1 parent a0edb47 commit 4479510
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion include/vsg/app/RecordAndSubmitTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ namespace vsg
CommandGraphs commandGraphs; // assign in application setup
Semaphores signalSemaphores; // connect to Presentation.waitSemaphores

Semaphores transientWaitSemaphores; // assign per frame and then cleared by finish(), assumed reference to semaphores assigned are retained elsewhere to pevert deletion while still in use.
Semaphores transientWaitSemaphores; // assign per frame and then cleared by finish(), assumed reference to semaphores assigned are retained elsewhere to pevert deletion while still in use.
Semaphores transientSignalSemaphores; // assign per frame and then cleared by finish(), assumed reference to semaphores assigned are retained elsewhere to pevert deletion while still in use.

ref_ptr<TransferTask> transferTask; // data is transferred for this frame
Expand Down
2 changes: 1 addition & 1 deletion include/vsg/app/TransferTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ namespace vsg
/// control for the level of debug infomation emitted by the TransferTask
Logger::Level level = Logger::LOGGER_DEBUG;

// protected:
// protected:
using OffsetBufferInfoMap = std::map<VkDeviceSize, ref_ptr<BufferInfo>>;
using BufferMap = std::map<ref_ptr<Buffer>, OffsetBufferInfoMap>;

Expand Down
2 changes: 1 addition & 1 deletion include/vsg/threading/DeleteQueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ namespace vsg
void add(T& objects)
{
std::scoped_lock lock(_mutex);
for(auto& object : objects)
for (auto& object : objects)
{
_objectsToDelete.emplace_back(ObectToDelete{frameCount + retainForFrameCount, object});
}
Expand Down
4 changes: 1 addition & 3 deletions src/vsg/app/RecordAndSubmitTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ VkResult RecordAndSubmitTask::finish(ref_ptr<RecordedCommandBuffers> recordedCom
auto transfer = transferTask->transferData(TransferTask::TRANSFER_AFTER_RECORD_TRAVERSAL);
transferTask->_lateDataToCopy.transferConsumerCompletedSemaphore.reset();

if ( transfer.result == VK_SUCCESS)
if (transfer.result == VK_SUCCESS)
{
if (transfer.dataTransferredSemaphore)
{
Expand All @@ -183,7 +183,6 @@ VkResult RecordAndSubmitTask::finish(ref_ptr<RecordedCommandBuffers> recordedCom
{
return transfer.result;
}

}

if (recordedCommandBuffers->empty())
Expand All @@ -208,7 +207,6 @@ VkResult RecordAndSubmitTask::finish(ref_ptr<RecordedCommandBuffers> recordedCom
current_fence->dependentCommandBuffers().emplace_back(commandBuffer);
}


for (auto& semaphore : transientWaitSemaphores)
{
//vsg::info(" wait semaphore", semaphore);
Expand Down
3 changes: 1 addition & 2 deletions src/vsg/app/TransferTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ TransferTask::TransferResult TransferTask::_transferData(DataToCopy& dataToCopy)
vk_waitSemaphores.emplace_back(dataToCopy.transferConsumerCompletedSemaphore->vk());
vk_waitStages.emplace_back(dataToCopy.transferConsumerCompletedSemaphore->pipelineStageFlags());

log(level, "TransferTask::_transferData( ",dataToCopy.name," ) submit dataToCopy.transferConsumerCompletedSemaphore = ", dataToCopy.transferConsumerCompletedSemaphore);
log(level, "TransferTask::_transferData( ", dataToCopy.name, " ) submit dataToCopy.transferConsumerCompletedSemaphore = ", dataToCopy.transferConsumerCompletedSemaphore);
}

// set up the vulkan signal semaphore
Expand All @@ -516,7 +516,6 @@ TransferTask::TransferResult TransferTask::_transferData(DataToCopy& dataToCopy)
log(level, " TransferTask submitInfo.waitSemaphoreCount = ", submitInfo.waitSemaphoreCount);
log(level, " TransferTask submitInfo.signalSemaphoreCount = ", submitInfo.signalSemaphoreCount);


result = transferQueue->submit(submitInfo);

if (result != VK_SUCCESS) return TransferResult{result, {}};
Expand Down
5 changes: 2 additions & 3 deletions src/vsg/threading/DeleteQueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
</editor-fold> */

#include <vsg/io/Options.h>
#include <vsg/ui/FrameStamp.h>
#include <vsg/threading/DeleteQueue.h>
#include <vsg/ui/FrameStamp.h>

using namespace vsg;

Expand Down Expand Up @@ -41,7 +41,6 @@ void DeleteQueue::advance(ref_ptr<FrameStamp> frameStamp)
}
}


void DeleteQueue::wait_then_clear()
{
ObjectsToDelete objectsToDelete;
Expand All @@ -53,7 +52,7 @@ void DeleteQueue::wait_then_clear()
uint64_t previous_frameCount = frameCount.load();

// wait until the conditional variable signals that an operation has been added
while ((_objectsToDelete.empty() || (frameCount.load()==previous_frameCount)) && _status->active())
while ((_objectsToDelete.empty() || (frameCount.load() == previous_frameCount)) && _status->active())
{
_cv.wait_for(lock, waitDuration);
}
Expand Down

0 comments on commit 4479510

Please sign in to comment.