VkQueryPool: Migrate from sw sync to marl

Removes the last use of sw::Event in Vulkan.

Bug: b/140546382
Change-Id: I5de63c52e35756dc6d7e4c6cbb77669ea3925d79
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38208
Tested-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Chris Forbes <chrisforbes@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
diff --git a/src/Vulkan/VkQueryPool.cpp b/src/Vulkan/VkQueryPool.cpp
index 7211d0d..5aa9b08 100644
--- a/src/Vulkan/VkQueryPool.cpp
+++ b/src/Vulkan/VkQueryPool.cpp
@@ -20,11 +20,10 @@
 
 namespace vk
 {
-	Query::Query() : finished(sw::Event::ClearMode::Manual), state(UNAVAILABLE), type(INVALID_TYPE), value(0) {}
+	Query::Query() : finished(marl::Event::Mode::Manual), state(UNAVAILABLE), type(INVALID_TYPE), value(0) {}
 
 	void Query::reset()
 	{
-		ASSERT(wg.count() == 0);
 		finished.clear();
 		auto prevState = state.exchange(UNAVAILABLE);
 		ASSERT(prevState != ACTIVE);
diff --git a/src/Vulkan/VkQueryPool.hpp b/src/Vulkan/VkQueryPool.hpp
index 45891b2..5ad3115 100644
--- a/src/Vulkan/VkQueryPool.hpp
+++ b/src/Vulkan/VkQueryPool.hpp
@@ -15,9 +15,11 @@
 #ifndef VK_QUERY_POOL_HPP_
 #define VK_QUERY_POOL_HPP_
 
-#include "System/Synchronization.hpp"
-
 #include "VkObject.hpp"
+
+#include "marl/event.h"
+#include "marl/waitgroup.h"
+
 #include <atomic>
 #include <condition_variable>
 #include <mutex>
@@ -81,8 +83,8 @@
 	void add(int64_t val);
 
 private:
-	sw::WaitGroup wg;
-	sw::Event finished;
+	marl::WaitGroup wg;
+	marl::Event finished;
 	std::atomic<State> state;
 	std::atomic<VkQueryType> type;
 	std::atomic<int64_t> value;