looks like command buffers need to be externally synchronized

This commit is contained in:
2021-11-14 20:36:53 +01:00
parent ad09492e3e
commit 42b0d5034c
29 changed files with 1121 additions and 1114 deletions
+2 -2
View File
@@ -38,6 +38,7 @@ ThreadPool::ThreadPool(uint32 threadCount)
ThreadPool::~ThreadPool()
{
running.store(false);
for(auto& thread : workers)
{
thread.join();
@@ -74,7 +75,7 @@ void ThreadPool::notify(Event* event)
{
std::unique_lock lock(jobQueueLock);
std::unique_lock lock2(waitingLock);
while(!waitingJobs.empty())
while(!waitingJobs[*event].empty())
{
//std::cout << "Waking up job " << job << std::endl;
jobQueue.add(std::move(waitingJobs[*event].retrieve()));
@@ -90,7 +91,6 @@ void ThreadPool::notify(Event* event)
mainJobCV.notify_one();
}
}
event->reset();
}
void ThreadPool::threadLoop(const bool mainThread)
{