From ac1d11402ec01e7a81abe849f95ae0866f8dcdb2 Mon Sep 17 00:00:00 2001 From: Dynamitos Date: Mon, 18 Dec 2023 13:03:03 +0100 Subject: [PATCH] Its maybe not a race condition? --- src/Engine/Graphics/RenderPass/BasePass.cpp | 1 + tests/Engine/ThreadPool.cpp | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Engine/Graphics/RenderPass/BasePass.cpp b/src/Engine/Graphics/RenderPass/BasePass.cpp index 9aaaa5e..a2ea5cf 100644 --- a/src/Engine/Graphics/RenderPass/BasePass.cpp +++ b/src/Engine/Graphics/RenderPass/BasePass.cpp @@ -157,6 +157,7 @@ void BasePass::render() command->bindDescriptor(descriptorSets); if (graphics->supportMeshShading()) { + std::cout << "Num Meshes: " << instance.meshes.size() << std::endl; command->dispatch(instance.meshes.size(), 1, 1); } else diff --git a/tests/Engine/ThreadPool.cpp b/tests/Engine/ThreadPool.cpp index 2d7792f..d61f90f 100644 --- a/tests/Engine/ThreadPool.cpp +++ b/tests/Engine/ThreadPool.cpp @@ -7,15 +7,14 @@ TEST(ThreadPool, RunBatch) ThreadPool t(10); uint32 test = 20; std::mutex m; - List work; + List> work; for (uint32 i = 0; i < 400; ++i) { - work.add([&]() -> Task { + work.add([&]() { std::unique_lock l(m); std::this_thread::sleep_for(std::chrono::milliseconds(10)); test++; - co_return; - }()); + }); } t.runAndWait(std::move(work)); ASSERT_EQ(test, 420);