Somewhat fixed thread pool

This commit is contained in:
Dynamitos
2021-12-15 00:05:42 +01:00
parent f4ce5f9585
commit 8ccaa26223
8 changed files with 353 additions and 185 deletions
@@ -60,6 +60,7 @@ void CmdBuffer::end()
void CmdBuffer::beginRenderPass(PRenderPass newRenderPass, PFramebuffer newFramebuffer)
{
assert(state == State::InsideBegin);
std::unique_lock lock(handleLock);
renderPass = newRenderPass;
framebuffer = newFramebuffer;
@@ -87,6 +88,7 @@ void CmdBuffer::executeCommands(const Array<Gfx::PRenderCommand>& commands)
assert(state == State::RenderPassActive);
if(commands.size() == 0)
{
std::cout << "No commands!" << std::endl;
return;
}
std::unique_lock lock(handleLock);